Oracle's simplest Automatic startup with the System
Oracle is the simplest way to automatically start with the system. As the saying goes, the user is God. Sometimes, they ask a very simple question. They only need one sentence and one minute to complete the process. But when we get the DBA, it may take at least half an hour or even half a month to satisfy his sentence. Is there a better and faster way;
For example, users usually need to automatically start the database with the system for simple maintenance, however, it takes at least half an hour for the DBA to configure and implement this function. Now, after reading this document, you can complete the self-startup configuration without having finished speaking about it, which is very simple.
I. Automatic Configuration
1. Add a startup Item [root @ db01 ~] # Cat>/etc/rc. d/rc. local <EOFsu-oracle-c "lsnrctl start" su-oracle-c "sqlplus sys/oracle as sysdba @/home/oracle /. script /. startup "su-oracle-c" emctl start dbconsole "EOF2. Create and edit the startup File [root @ db01 ~] # Su-oracle [root @ db01 ~] # Mkdir-p/home/oracle/. script/[root @ db01 ~] # Cat>/home/oracle/. script/. startup <EOFstartup; alter system register; exit 0EOF
Ii. Restart Verification:
3. Check whether the database, EM, and listener are connected.
### Listener status [oracle @ db01 ~] $ Lsnrctl statusLSNRCTL for Linux: Version 11.2.0.3.0-Production on 03-OCT-2014 07: 26: 22 Copyright (c) 1991,201 1, Oracle. all rights reserved. connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521) STATUS of the LISTENER ------------------------ Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.3.0-ProductionStart Date 03-OCT-2014 07: 13: 54 Uptime 0 days 0 hr. 12 min. 28 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File/DBSoft/Product/11.2.3/db_1/network/admin/listener. oraListener Log File/DBSoft/diag/tnslsnr/db01/listener/alert/log. xmlListening Endpoints Summary... (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521) (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = db01) (PORT = 1521) Services Summary... service "woo" has 1 instance (s ). ins Tance "woo", status READY, has 1 handler (s) for this service... service "wooXDB" has 1 instance (s ). instance "woo", status READY, has 1 handler (s) for this service... the command completed successfully ### database status SQL> select instance_name, host_name, status from v $ instance; INSTANCE_N HOST_NAME STATUS ---------- ------------ woo db01 OPEN ### em status [oracle @ db01 ~] $ Emctl status dbconsoleOracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 Copyright (c) 1996,201 1 Oracle Corporation. All rights reserved. https://db01:1158/em/console/aboutApplicationOracle Enterprise Manager 11g is running. ---------------------------------------------------------------- Logs are generated in directory/DBSoft/Product/11.2.3/db_1/db01_woo/sysman/log
Now we have confirmed that the database can be configured to start automatically, which is easier than the old method recommended by Oralce. For the old method, see the following link:
Oracle is automatically started and shut down with the system in Linux (old method)