srvctl即Server Control
在命令行下
bash$ srvctl h
Usage: srvctl [V]
Usage: srvctl add asmn i o [ p ]
Usage: srvctl config database
Usage: srvctl config databased [ a] [ t]
Usage: srvctl config serviced [ s ] [ a] [ S ]
Usage: srvctl config nodeappsn [ a] [ g] [ o] [ s] [ l]
Usage: srvctl config asmn
Usage: srvctl config listenern
Usage: srvctl disable databased
常用的命令主要如下:
查看數據庫的狀態
bash$ srvctl status database d eygle
Instance eygleis running on node db rac
Instance eygleis running on node db rac
查看數據庫實例的狀態
bash$ srvctl status instance d eygle i eygle eygle
Instance eygleis running on node db rac
Instance eygleis running on node db rac
停止實例使用srvctl stop instance命令:
bash$ srvctl stop instance
PRKO: Invalid command line syntax
bash$ srvctl stop instance h
Usage: srvctl stop instanced i [ o ] [ c | q] d Unique name for the database i Comma separated instance names o Options to shutdown command (e g normal transactional immediate or abort) c Connect string (default: / as sysdba) q Query connect string from standard input h Print usage
在命令行發出如下命令
bash$ srvctl stop instance d eygle i eygle
在該節點的警告日志文件中就可以看到如下關閉信息:
Thu Dec: :
Shutting down instance: further logons disabled
Thu Dec: :
Stopping background process QMNC
Thu Dec: :
Stopping background process CJQ
Thu Dec: :
Stopping background process MMNL
Thu Dec: :
Stopping background process MMON
Thu Dec: :
Shutting down instance (immediate)
License high water mark =
Thu Dec: :
Stopping Job queue slave processes
Thu Dec: :
Job queue slave processes stopped
Thu Dec: :
PMON failed to acquire latchsee PMON dump
Thu Dec: :
ALTER DATABASE CLOSE NORMAL
Thu Dec: :
SMON: disabling tx recovery
SMON: disabling cache recovery
Thu Dec: :
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided:active
Threadclosed at log sequence
Successful close of redo thread
Thu Dec: :
Completed: ALTER DATABASE CLOSE NORMAL
Thu Dec: :
ALTER DATABASE DISMOUNT
Completed: ALTER DATABASE DISMOUNT
ARCH: Archival disabled due to shutdown:
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided:active
ARCH: Archival disabled due to shutdown:
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided:active
Thu Dec: :
freeing rdom
停止數據庫使用srvctl stop database命令
bash$ srvctl stop database h
Usage: srvctl stop databased [ o ] [ c | q] d Unique name for the database o Options to shutdown command (e g normal transactional immediate or abort) c Connect string (default: / as sysdba) q Query connect string from standard input h Print usage
發出如下命令後
bash$ srvctl stop database d eygle
日志文件記錄如下過程:
Thu Dec: :
Shutting down instance: further logons disabled
Thu Dec: :
Stopping background process CJQ
Thu Dec: :
Stopping background process QMNC
Thu Dec: :
Stopping background process MMNL
Thu Dec: :
Stopping background process MMON
Thu Dec: :
Shutting down instance (immediate)
License high water mark =
Thu Dec: :
Stopping Job queue slave processes
Thu Dec: :
Job queue slave processes stopped
Thu Dec: :
PMON failed to acquire latchsee PMON dump
PMON failed to acquire latchsee PMON dump
PMON failed to acquire latchsee PMON dump
Thu Dec: :
PMON failed to acquire latchsee PMON dump
Thu Dec: :
ALTER DATABASE CLOSE NORMAL
Thu Dec: :
SMON: disabling tx recovery
SMON: disabling cache recovery
Thu Dec: :
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided:active
Threadclosed at log sequence
Successful close of redo thread
Thu Dec: :
Completed: ALTER DATABASE CLOSE NORMAL
Thu Dec: :
ALTER DATABASE DISMOUNT
Completed: ALTER DATABASE DISMOUNT
ARCH: Archival disabled due to shutdown:
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided:active
ARCH: Archival disabled due to shutdown:
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided:active
Thu Dec: :
freeing rdom
使用srvctl start database可以啟動數據庫的所有實例:
bash$ srvctl start database d eygle
在第一個節點
Thu Dec: :
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION =
LICENSE_SESSIONS_WARNING =
Interface typebge configured from OCR for use as a cluster interconnect
Interface typebge configured from OCR for use as a cluster interconnect
Interface typebge configured from OCR for use as a public interface
Picked latchfree SCN scheme
Using LOG_ARCHIVE_DEST_parameter default value as /opt/oracle/product/ /db/dbs/arch
Autotune of undo retention is turned on
LICENSE_MAX_USERS =
SYS auditing is disabled
ksdpec: called for eventprior to event group initialization
Starting up ORACLE RDBMS Version:
System parameters with nondefault values:
processes =
__shared_pool_size =
__large_pool_size =
__java_pool_size =
__streams_pool_size =
spfile = /dev/vx/rdsk/xxfdg/spfile
sga_target =
control_files = /dev/vx/rdsk/xxfdg/ctlfile/dev/vx/rdsk/xxfdg/ctlfile
db_block_size =
__db_cache_size =
compatible =
db_file_multiblock_read_count=
cluster_database = TRUE
cluster_database_instances=
thread =
instance_number =
undo_management = AUTO
undo_tablespace = UNDOTBS
remote_login_passwordfile= EXCLUSIVE
db_domain =
remote_listener = LISTENERS_EYGLE
job_queue_processes =
background_dump_dest = /opt/oracle/admin/eygle/bdump
user_dump_dest = /opt/oracle/admin/eygle/udump
core_dump_dest = /opt/oracle/admin/eygle/cdump
audit_file_dest = /opt/oracle/admin/eygle/adump
db_name = eygle
open_cursors =
pga_aggregate_target =
Cluster communication is configured to use the following interface(s) for this instance
Thu Dec: :
cluster interconnect IPC version:Oracle UDP/IP
IPC Vendorproto
DIAG started with pid=OS id=
PMON started with pid=OS id=
PSPstarted with pid= OS id=
LMON started with pid=OS id=
Thu Dec: :
WARNING: Failed to set buffer limit on IPC interconnect socket
Oracle requires that the SocketReceive buffer size be tunable uptoMB
Please make sure the kernel parameterwhich limits SO_RCVBUF value set by
applications is atleastMB
LMDstarted with pid= OS id=
LMSstarted with pid= OS id=
LMSstarted with pid= OS id=
MMAN started with pid=OS id=
DBWstarted with pid= OS id=
LGWR started with pid=OS id=
CKPT started with pid=OS id=
SMON started with pid=OS id=
RECO started with pid=OS id=
CJQstarted with pid= OS id=
MMON started with pid=OS id=
MMNL started with pid=OS id=
Thu Dec: :
lmon registered with NMinstance id (internal mem no )
Thu Dec: :
Reconfiguration started (old incnew inc )
List of nodes:
Global Resource Directory frozen
* allocate domaininvalid = TRUE
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Nonlocal Process blocks cleaned out
Thu Dec: :
LMS: GCS shadows cancelled closed
Thu Dec: :
LMS: GCS shadows cancelled closed
Set master node info
Submitted all remoteenqueue requests
Dwncvts replayed VALBLKs dubious
All grantable enqueues granted
Thu Dec: :
LMS: GCS shadows traversed replayed
Thu Dec: :
LMS: GCS shadows traversed replayed
Thu Dec: :
Submitted all GCS remotecache requests
Fix write in gcs resources
Reconfiguration complete
LCKstarted with pid= OS id=
Thu Dec: :
ALTER DATABASE MOUNT
Thu Dec: :
This instance was first to mount
Setting recovery target incarnation to
Thu Dec: :
Successful mount of redo threadwith mount id
Thu Dec: :
Database mounted in Shared Mode (CLUSTER_DATABASE=TRUE)
Completed: ALTER DATABASE MOUNT
Thu Dec: :
ALTER DATABASE OPEN
This instance was first to open
Picked broadcast on commit scheme to generate SCNs
Thu Dec: :
Threadadvanced to log sequence
Threadopened at log sequence
Current log#seq# mem# : /dev/vx/rdsk/xxfdg/redo
Successful open of redo thread
Thu Dec: :
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Thu Dec: :
SMON: enabling cache recovery
Thu Dec: :
Instance recovery: looking for dead threads
Instance recovery: lock domain invalid but no dead threads
Thu Dec: :
Successfully onlined Undo Tablespace
Thu Dec: :
SMON: enabling tx recovery
Thu Dec: :
Database Characterset is ZHSGBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=OS id=
Thu Dec: :
Completed: ALTER DATABASE OPEN
節點
Thu Dec: :
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION =
LICENSE_SESSIONS_WARNING =
Interface typebge configured from OCR for use as a cluster interconnect
Interface typebge configured from OCR for use as a cluster interconnect
Interface typebge configured from OCR for use as a public interface
Picked latchfree SCN scheme
Using LOG_ARCHIVE_DEST_parameter default value as /opt/oracle/product/ /db/dbs/arch
Autotune of undo retention is turned on
LICENSE_MAX_USERS =
SYS auditing is disabled
ksdpec: called for eventprior to event group initialization
Starting up ORACLE RDBMS Version:
System parameters with nondefault values:
processes =
__shared_pool_size =
__large_pool_size =
__java_pool_size =
__streams_pool_size =
spfile = /dev/vx/rdsk/xxfdg/spfile
sga_target =
control_files = /dev/vx/rdsk/xxfdg/ctlfile/dev/vx/rdsk/xxfdg/ctlfile
db_block_size =
__db_cache_size =
compatible =
db_file_multiblock_read_count=
cluster_database = TRUE
cluster_database_instances=
thread =
instance_number =
undo_management = AUTO
undo_tablespace = UNDOTBS
remote_login_passwordfile= EXCLUSIVE
db_domain =
remote_listener = LISTENERS_EYGLE
job_queue_processes =
background_dump_dest = /opt/oracle/admin/eygle/bdump
user_dump_dest = /opt/oracle/admin/eygle/udump
core_dump_dest = /opt/oracle/admin/eygle/cdump
audit_file_dest = /opt/oracle/admin/eygle/adump
db_name = eygle
open_cursors =
pga_aggregate_target =
Cluster communication is configured to use the following interface(s) for this instance
Thu Dec: :
cluster interconnect IPC version:Oracle UDP/IP
IPC Vendorproto
PMON started with pid=OS id=
DIAG started with pid=OS id=
PSPstarted with pid= OS id=
LMON started with pid=OS id=
Thu Dec: :
WARNING: Failed to set buffer limit on IPC interconnect socket
Oracle requires that the SocketReceive buffer size be tunable uptoMB
Please make sure the kernel parameterwhich limits SO_RCVBUF value set by
applications is atleastMB
LMDstarted with pid= OS id=
LMSstarted with pid= OS id=
LMSstarted with pid= OS id=
MMAN started with pid=OS id=
DBWstarted with pid= OS id=
LGWR started with pid=OS id=
CKPT started with pid=OS id=
SMON started with pid=OS id=
RECO started with pid=OS id=
CJQstarted with pid= OS id=
MMON started with pid=OS id=
MMNL started with pid=OS id=
Thu Dec: :
lmon registered with NMinstance id (internal mem no )
Thu Dec: :
Reconfiguration started (old incnew inc )
List of nodes:
Global Resource Directory frozen
* allocate domaininvalid = TRUE
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Nonlocal Process blocks cleaned out
Thu Dec: :
LMS: GCS shadows cancelled closed
Thu Dec: :
LMS: GCS shadows cancelled closed
Set master node info
Submitted all remoteenqueue requests
Dwncvts replayed VALBLKs dubious
All grantable enqueues granted
Post SMON to startst pass IR
Thu Dec: :
LMS: GCS shadows traversed replayed
Thu Dec: :
LMS: GCS shadows traversed replayed
Thu Dec: :
Submitted all GCS remotecache requests
Post SMON to startst pass IR
Fix write in gcs resources
Reconfiguration complete
LCKstarted with pid= OS id=
Thu Dec: :
ALTER DATABASE MOUNT
Thu Dec: :
Setting recovery target incarnation to
Thu Dec: :
Successful mount of redo threadwith mount id
Thu Dec: :
Database mounted in Shared Mode (CLUSTER_DATABASE=TRUE)
Completed: ALTER DATABASE MOUNT
Thu Dec: :
ALTER DATABASE OPEN
Picked broadcast on commit scheme to generate SCNs
Thu Dec: :
Threadopened at log sequence
Current log#seq# mem# : /dev/vx/rdsk/xxfdg/redo
Successful open of redo thread
Thu Dec: :
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Thu Dec: :
SMON: enabling cache recovery
Thu Dec: :
Successfully onlined Undo Tablespace
Thu Dec: :
SMON: enabling tx recovery
Thu Dec: :
Database Characterset is ZHSGBK
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
QMNC started with pid=OS id=
Thu Dec: :
Completed: ALTER DATABASE OPEN
From:http://tw.wingwit.com/Article/program/Oracle/201311/18569.html