In both Windows and Unix environments, Oracle databases can be automatically started.
In both Windows and Unix environments, Oracle databases can be automatically started.
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 -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 < <自动启动
Catdb:/u01/app/oracle/product/10.2.0: N < <不自动启动< p>
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. It is created by root. sh
# And updated by the Database Configuration Assistant when creating
# A database.
# A colon, ':', is used as the field terminator. A new line terminates
# The entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ ORACLE_SID: $ ORACLE_HOME: :
#
# The first and second fields are the system identifier and home
# Directory of the database respectively. 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" < <全路径根据你的实际情况来定< p>
Now, the Automatic startup environment is ready. You can use dbstart + {full path of database installation directory} for testing or restart verification...
,