In order to save system resources, we plan to enable only the instance yznc at ordinary times and start zycw only when necessary. After each system restart, the system automatically restarts the instance zycw.
In order to save system resources, we plan to enable only the instance yznc at ordinary times and start zycw only when necessary. After each system restart, the system automatically restarts the instance zycw.
An interesting question about Oracle databases:
COSCO created an oracle instance zycw before the disk array was added, and a new instance zync was created after the disk array was added.
In order to save system resources, we plan to enable only the instance yznc at ordinary times and start zycw only when necessary. After each system restart, the system automatically restarts instances zycw, rc. d. No script for automatically restarting the database is found, and no listener is found in ORACL_HOME/network/admin. ora file (the parameter file for which the listener service reads data at system startup is not clear yet ).
Later, the system added a line of startdb: 2345678: wait:/etc/rc. startdb to the inittab file to call/etc/rc. startdb to start oracle. The following describes the auto-start mode of Oracle in detail:
1. Edit and modify the character after the instance to be started in the/etc/oratab file to Y. Text Example:
#
# 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.
##
*:/Home/oracle: N
# *:/U2/oracle/product/9.2.0.2.0: N
Zycw:/u2/oracle/product/9.2.0.2.0: N
*:/U2/oracle/product/9.2.0.2.0: N
Zync:/u2/oracle/product/9.2.0.2.0: Y
#
2. Configure the Startup File: Create the file rc. startdb under/etc. The script is as follows: (you can directly call the startup script of the oracle system or write the startup script yourself)
Su-oracle "-c/u2/oracle/product/9.2.0.2.0/bin/dbstart"
3. Put the startup information in the/etc/inittab and add a line startdb: 2345678: wait:/etc/rc. startdb. A text example is as follows:
: @ (#) 49 1.28.2.9 src/bos/etc/inittab, cmdoper, bos520 8/23/00 19:50:13
: IBM_PROLOG_BEGIN_TAG
: This is an automatically generated prolog.
:
: Bos520 src/bos/etc/inittab 1.28.2.9
:
: Licensed Materials-Property of IBM
:
: (C) COPYRIGHT International Business Machines Corp. 1989,1993
: All Rights Reserved
:
: US Government Users Restricted Rights-Use, duplication or
: Disclosure restricted by gsa adp Schedule Contract with IBM Corp.
:
: IBM_PROLOG_END_TAG
:
: COMPONENT_NAME: CMDOPER
:
: ORIGINS: 3, 27
:
: (C) COPYRIGHT International Business Machines Corp. 1989,199 3
: All Rights Reserved
: Licensed Materials-Property of IBM
:
: US Government Users Restricted Rights-Use, duplication or
: Disclosure restricted by gsa adp Schedule Contract with IBM Corp.
:
: Note-initdefault and sysinit shoshould be the first and second entry.
:
Init: 2: initdefault:
Brc: sysinit:/sbin/rc. boot 3>/dev/console 2> & 1 # Phase 3 of system boot
Powerfail:/etc/rc. powerfail 2> & 1 | alog-tboot>/dev/console # Power Failure Detection
Mkatmpvc: 2: once:/usr/sbin/mkatmpvc>/dev/console 2> & 1
Atmsvcd: 2: once:/usr/sbin/atmsvcd>/dev/console 2> & 1
Load64bit: 2: wait:/etc/methods 64>/dev/console 2> & 1 # Enable 64-bit execs
Tunables: 23456789: wait:/usr/sbin/tunrestore-R>/dev/console 2> & 1 # Set tunables
Rc: 23456789: wait:/etc/rc 2> & 1 | alog-tboot>/dev/console # Multi-User checks
Fbcheck: 23456789: wait:/usr/sbin/fbcheck 2> & 1 | alog-tboot>/dev/console # run/etc/firstboot
Srcmstr: 23456789: respawn:/usr/sbin/srcmstr # System Resource Controller
Rctcpip: 23456789: wait:/etc/rc. tcpip>/dev/console 2> & 1 # Start TCP/IP daemons
Sniinst: 2: wait:/var/adm/sni/sniprei>/dev/console 2> & 1
Rcnfs: 23456789: wait:/etc/rc. nfs>/dev/console 2> & 1 # Start NFS Daemons
Cron: 23456789: respawn:/usr/sbin/cron
Piobe: 2: wait:/usr/lib/lpd/pio/etc/pioinit>/dev/null 2> & 1 # pb cleanup
Qdaemon: 23456789: wait:/usr/bin/startsrc-sqdaemon
Writesrv: 23456789: wait:/usr/bin/startsrc-swritesrv
Uprintfd: 23456789: respawn:/usr/sbin/uprintfd
Shdaemon: 2: off:/usr/sbin/shdaemon>/dev/console 2> & 1 # High availability daemon
L2: 2: wait:/etc/rc. d/rc 2
L3: 3: wait:/etc/rc. d/rc 3
L4: 4: wait:/etc/rc. d/rc 4
L5: 5: wait:/etc/rc. d/rc 5
L6: 6: wait:/etc/rc. d/rc 6
L7: 7: wait:/etc/rc. d/rc 7
L8: 8: wait:/etc/rc. d/rc 8
9: 9: wait:/etc/rc. d/rc 9
Naudio: boot:/usr/sbin/naudio>/dev/null
Logsymp: 2: once:/usr/lib/ras/logsymptom # for system dumps
Diagd: 2: once:/usr/lpp/diagnostics/bin/diagd>/dev/console 2> & 1
Ctrmc: 2: once:/usr/bin/startsrc-s ctrmc>/dev/console 2> & 1
Dt: 2: wait:/etc/rc. dt
Cons: 0123456789: respawn:/usr/sbin/getty/dev/console
Ha_star: h2: once:/etc/rc. ha_star>/dev/console 2> & 1
Ntbl_reset: 2: once:/usr/bin/ntbl_reset_datafiles
Rcrf: 2: once:/usr/sni/aix52/rc. ml>/dev/console 2> & 1
Tty0: 2: off:/usr/sbin/getty/dev/tty0
Tty1: 2: off:/usr/sbin/getty/dev/tty1
Tty2: 2: off:/usr/sbin/getty/dev/tty2
Startdb: 2345678: wait:/etc/rc. startdb
Documentation on oracle Database restart settings under AIX:
Automatic Database Startup for AIX (Optional)
Oracle Corporation recommends that you configure your system to automatically
Start Oracle databases when your system starts up, and to shut down Oracle
Databases when your system shuts down. Automatic database startup and
Shutdown protects against improper shutdown of the database.
Automatic Database Startup
Perform the following tasks to set up the dbstart and dbshut scripts so that they
Are called at system startup. This process must be completed for every new
Database that you want to configure for Automatic startup:
1. Edit the/etc/oratab file.
Configuration Tasks to Perform as the root User
Database entries in the oratab file appears in the following format:
ORACLE_SID: ORACLE_HOME: {Y | N}
In the preceding command, Y or N specifies whether you want the dbstart
And dbshut scripts to start up and shut down the database.
For Oracle Real Application Clusters installation, this entry appears in
Following format:
DB_NAME: ORACLE_HOME: {Y | N}
In the preceding command, DB_NAME is the cluster database name. Y or N
Specifies whether you want the dbstart and dbshut scripts to start up and
Shut down the database.
2. For each database that you want to start up, find the ORACLE_SID entry
Identified by the sid in the first field. Change the last field for each to Y.
3. Add the dbstart script to the/etc/inittab file:
# Mkitab "oradb: 2: wait:/bin/su oradb-c |/$ ORACLE_HOMES/bin/dbstart"
In the preceding command, oradb is the identifier of the oracle user
Which you want to start the database.