Oracle standalone environment enables automatic database startup upon startup
In both Windows and Unix environments, Oracle databases can be automatically started.
In Windows:
The experiment method is relatively simple. It can be implemented by modifying the registry or using the oradim command:
Oradim-edit <SID>-startmode [auto | manual]-shutmode [nomal | immediate | abort]
In Unix:
Experiment with the dbstart command that comes with the database.
Command: dbstart + {full path of ORACLE_HOME}
Principle:
1. When the operating system is started, read the/etc/oratab file to determine whether any database needs to be started automatically (N indicates that the database is not started automatically, and Y indicates that the database is started automatically)
Ora10g:/u01/app/oracle/product/10.2.0: Y <automatically start
Catdb:/u01/app/oracle/product/10.2.0: N <not started automatically
2. Call the dbstart command to start listeners and databases.
Check that the full path of the script is $ ORACLE_HOME/bin/dbstart. Note:
Listener startup is affected by the Environment Variable ORACLE_HOME_LISTNER.
Take the LINUX environment as an example:
1. Edit the/etc/oratab file as follows:
[Oracle @ ora10g bdump] $ cat/etc/oratab
# This file is used by ORACLE utilities. & nbsp; It is created by root. sh
# And updated by the Database Configuration Assistant when creating
# A database. </span> </p> <span style = "font-size: 14px;"> # A colon, ':', is used as the field terminator. & nbsp; A new line terminates
# The entry. & nbsp; Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# & Nbsp; $ ORACLE_SID: $ ORACLE_HOME: <N | Y>:
#
# The first and second fields are the system identifier and home
# Directory of the database respectively. & nbsp; The third filed indicates
# To the dbstart utility that the database shocould, "Y", or shocould not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ ORACLE_SID are not allowed.
#
#
Ora10g:/u01/app/oracle/product/10.2.0: Y <
Catdb:/u01/app/oracle/product/10.2.0: N
Note: The database instance is ora10g and its installation directory is/u01/app/oracle/product/10.2.0. The account is automatically started.
2. Add the dbstart command to rc. local. as follows:
[Oracle @ ora10g bdump] $ cat/etc/rc. local
#! /Bin/sh
#
# This script will be executed * after * all the other init scripts.
# You can put your own initialization stuff in here if you don't
# Want to do the full Sys V style init stuff.
Touch/var/lock/subsys/local
Su-oracle-c "dbstart/u01/app/oracle/product/10.2.0" <all the Path depends on your actual situation.
Now, the Automatic startup environment is ready. You can use dbstart + {full path of database installation directory} for testing or restart verification...