Oracle's simplest Automatic startup with the System
As the saying goes, users are God. Sometimes it is very simple to ask a question. It takes only 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 <EOF
Su-Oracle-c "lsnrctl start"
Su-oracle-c "sqlplus sys/oracle as sysdba @/home/oracle/. script/. startup"
Su-oracle-c "emctl start dbconsole"
EOF
2. Create and edit the Startup File
[Root @ db01 ~] # Su-oracle
[Root @ db01 ~] # Mkdir-p/home/oracle/. script/
[Root @ db01 ~] # Cat>/home/oracle/. script/. startup <EOF
Startup;
Alter system register;
Exit 0
EOF
Ii. Restart Verification:
3. Check whether the database, EM, and listener are connected.
### Listener status
[Oracle @ db01 ~] $ Lsnrctl status
LSNRCTL 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 LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0-Production
Start Date 03-OCT-2014 07:13:54
Uptime 0 days 0 hr. 12 min. 28 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/DBSoft/Product/11.2.3/db_1/network/admin/listener. ora
Listener Log File/DBSoft/diag/tnslsnr/db01/listener/alert/log. xml
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = db01) (PORT = 1521 )))
Services Summary...
Service "woo" has 1 instance (s ).
Instance "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 dbconsole
Oracle 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/aboutApplication
Oracle 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)
Oracle 11g installation manual on RedHat Linux 5.8 _ x64 Platform
Installing Oracle 12C in Linux-6-64
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian