Linux database instance startup settings 1. Modify/oratab
[Root @ org54 ~] # Vi/etc/oratab -- change N to Y, as shown below:
# This file is used by ORACLEutilities. It is created by root. sh
# And updated by the Database ConfigurationAssistant when creating
# A database.
# A colon, ':', is used as the fieldterminator. A new line terminates
# The entry. Lines beginning with a pound sign, '#', arecomments.
#
# Entries are of the form:
# $ ORACLE_SID: $ ORACLE_HOME: <N | Y>:
#
# The first and second fields are thesystem identifier and home
# Directory of the databaserespectively. The third filed indicates
# To the dbstart utility that the databaseshocould, "Y", or shocould not,
# "N", be brought up at systemboot time.
#
# Multiple entries with the same $ ORACLE_SID are not allowed.
#
#
# Game:/u01/app/oracle/product/10.2.0/db_1: N -- default information registered when dbca creates a database
-- Format: $ ORACLE_SID: $ ORACLE_HOME: <N | Y>
-- <N | Y> indicates whether to enable automatic startup.
Game:/u01/app/oracle/product/10.2.0/db_1: Y
~
~
~
~
2. Edit/dbstart
[Oracle @ org54 bin] $ cd $ ORACLE_HOME/bin
[Oracle @ org54 bin] $ ls-ll | grep dbstart
-Rwxr-xr-x 1 oracle oinstall 10415 Jan 1 2000 dbstart
[Oracle @ org54 bin] $ vidbstart
-- Dbstart is the Automatic startup script for the system to execute the dbstart script file when the system is started. It reads the oratab file and reads Y to automatically start the corresponding instance.
-- Adjust or confirm the listening path, for example, ORACLE_HOME_LISTNER =/ade/vikrkuma_new/oracle or ORACLE_HOME_LISTNER = $ ORACLE_HOME
3. Edit/rc. local
[Root @ org54 ~] # Vi/etc/rc. d/rc. local -- Add the following two lines to start the instance and listener
#! /Bin/sh
#
# This script will be executed * after * allthe other init scripts.
# You can put your own initialization stuffin here if you don't
# Want to do the full Sys V style initstuff.
Touch/var/lock/subsys/local
Modprobe hangcheck-timer hangcheck_tick = 30hangcheck_margin = 180
Su-oracle-c "/u01/app/oracle/product/10.2.0/db_1/bin/dbstart"
Su-oracle-c "/u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start"
-- In the command, "-c" indicates that the script is executed, the instance to be started is specified in the script dbstart, And the listener to start the configuration in the script lsnrctl.
4. Restart Verification
# Reboot
[Oracle @ org54 ~] $ Sqlplus '/as sysdba'
SQL * Plus: Release 10.2.0.1.0-Productionon Fri Jul 4 10:40:57 2014
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0-Production
With the Partitioning, OLAP and Data Miningoptions
SQL> selectstatus, instance_name from v $ instance;
STATUS INSTANCE_NAME
----------------------------
OPEN game
Summary:
In linux, configure the script for Automatic startup of an instance:
Oratab: indicates whether the instance is automatically registered.
Dbstart: the startup script file reads the oratab information.
Rc. local: the file to be prepared immediately after startup