Oracle automatically activated under linux and stop
/ etc / oratab format: SID: ORACLE_HOME: AUTO
AUTO field is set to the Y (upper case), the only way, oracle and dbstart own dbshut be able to play a role. I am for:
$ ORACLE_SID: $ ORACLE_HOME: Y
ORACLE_SID and ORACLE_HOME here is under the oracle user environment variables, in different computers have different values. When you open the / etc / oratab time, changed a bit on the list.
Services in the preparation of the script / etc / rc.d / init.d directory oracle file created as a startup script, which reads as follows:
#! / bin / bash
# chkconfig: 2345 50 10
# description: Start and stop Oracle Database and monitoring procedures
# / Etc / rc.d / init.d / oracle
# Check how to implement the script file
case "$ 1" in
start)
echo-n "Starting Oracle Databases:"
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Starting Oracle Databases as part of system up.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
su - ora-c dbstart>> / var / log / oracle
echo "Done."
echo-n "Starting Oracle Listeners:"
su - ora-c "lsnrctl start">> / var / log / oracle
# su - oracle "sqlplus / nolog" <
# connect / as sysdba
# startup
# exit
echo "Done."
echo ""
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Finished.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
touch / var / lock / subsys / oracle
;;
stop)
echo-n "Shutting Down Oracle Listeners:"
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Shutting Down Oracle Databases as part of system down.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
su - ora-c "lsnrctl stop">> / var / log / oracle
echo "Done."
rm-f / var / lock / subsys / oracle
echo-n "Shutting Down Oracle Databases:"
su - ora-c dbshut>> / var / log / oracle
echo "Done."
echo ""
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Finished.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
;;
restart)
echo-n "Restarting Oracle Databases:"
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Restarting Oracle Databases as part of system up.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
su - ora-c dbstop>> / var / log / oracle
su - ora-c dbstart>> / var / log / oracle
echo "Done."
echo-n "Restarting Oracle Listeners:" # $ 0 stop
su - ora-c "lsnrctl stop">> / var / log / oracle # $ 0 start
su - ora-c "lsnrctl start">> / var / log / oracle
echo "Done."
echo ""
echo "------------------------------------------------ ----">> / var / log / oracle
date + "!% T% a% D: Finished.">> / var / log / oracle
echo "------------------------------------------------ ----">> / var / log / oracle
touch / var / lock / subsys / oracle
;;
*)
echo "Usage: oracle (start | stop | restart)"
exit 1
esac
In the oracle user, enter the contents of As, and then save out as a result of the startup script, the need for the implementation of authority; the implementation of the command chmod a + x oracle grant execute permissions oracle.
The establishment of service connection
ln-s / etc / rc.d / init.d / oracle / etc/rc.d/rc2.d/S50oracle
ln-s / etc / rc.d / init.d / oracle / etc/rc.d/rc3.d/S50oracle
ln-s / etc / rc.d / init.d / oracle / etc/rc.d/rc5.d/S50oracle
ln-s / etc / rc.d / init.d / oracle / etc/rc.d/rc0.d/K10oracle
ln-s / etc / rc.d / init.d / oracle / etc/rc.d/rc6.d/K10oracle
chkconfig - add oracle (added to the system services)
chkconfig - levle 2345 oracle on (with the system to start)
Test
Run. / Oracle start (service oracle start) command to see if can start the database, if not, view the log, find out the reasons when I have encountered in the implementation of the following error message may
Can''t find init file for Database "linuxdb".
Database "linuxdb" NOT started.
By looking at $ (ORACLE_HOME) / bin / dbstart the script, based on erroneous information to find the statement, that the system lacked a
$ (ORACLE_HOME) / dbs / init $ (ORACLE_SID). Ora profile solution
sqlplus "/ as sysdba"
create pfile from spfile;
And then on the successful implementation.
Linux restart the host to see whether the database automatically activated.
Note: oracle scripts dbstart own Listeners contains scripts to start, so I think that should be above the startup script to remove the phrase listeners, otherwise they will be in error, but this error does not affect the start.
Related Posts of Oracle automatically activated under linux and stop
-
ORACLE10G full version centos5 installed (the installation has passed)
ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...
-
SGA extended the principle of 32bit oracle
SGA extended the principle of 32bit oracle From: http://www.itpub.net/247048.html Because the median 32bitrnoracle restrictions can only visit the oracle process 4g (2 of 32 power) following virtual memory address, the time at a lot of people this is ...
-
AX3.0 + Oracle 10G RAC installation
During these two days, you installed RAC, in a virtual machine inside, with a full day, there have been some questions on his way. Now have their own solution. In fact, it is loaded, it is easy, as long as planned, carefully point on OK, the trouble ...
-
High Availability Oracle Flashback
Brief introduction Flashback Database is a point in time (PIT) restore the database approach. This incomplete recovery strategy can be used to restore the logic because of human error cause damage to the database. At the introduction of 10g, it is de ...
-
An example of the use of TKPROF
First, view and edit parameters SQL> show parameter max_dump_file_size NAME TYPE VALUE ------------------------------------ ----------- --- --------------------------- max_dump_file_size string UNLIMITED SQL> show parameter user_dump_dest NAME TYPE
-
Diagnosis and principles of order
SQL> select disk.value "Disk", mem.value "Mem", 2 (disk.value / mem.value) * 100 "Ratio" 3 from v $ sysstat mem, v $ sysstat disk 4 where mem.name = 'sorts (memory)' 5 and disk.name = 'sorts (disk)'; D ...
-
ORACLE 10G dataguard configuration Step by Step
oracle dataguard













Leave a Reply