数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

10gRAC系列之使用srvctl管理RAC数据库


发布日期:2022年08月24日
 
10gRAC系列之使用srvctl管理RAC数据库

srvctl即Server Control是一个命令行工具用以管理Oracle的RAC环境srvctl在Oraclei中引入Oracleg对其功能进行了大大增强

在命令行下使用h参数可以察看srvctl支持的命令及参数:

bash$ srvctl h

Usage: srvctl [V]

Usage: srvctl add asm n i o [p ]

Usage: srvctl config database

Usage: srvctl config database d [a] [t]

Usage: srvctl config service d [s ] [a] [S ]

Usage: srvctl config nodeapps n [a] [g] [o] [s] [l]

Usage: srvctl config asm n

Usage: srvctl config listener n

Usage: srvctl disable database d

常用的命令主要如下:

使用srvctl status查看数据库及实例状态

查看数据库的状态

bash$ srvctl status database d eygle

Instance eygle is running on node dbrac

Instance eygle is running on node dbrac

查看数据库实例的状态

bash$ srvctl status instance d eygle i eygleeygle

Instance eygle is running on node dbrac

Instance eygle is running on node dbrac

使用srvctl stop停止数据库或实例

停止实例使用srvctl stop instance命令:

bash$ srvctl stop instance

PRKO : Invalid command line syntax

bash$ srvctl stop instance h

Usage: srvctl stop instance d i [o ] [c | q]

d Unique name for the database

i Comma separated instance names

o Options to shutdown command (eg 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 latch see 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

Thread closed 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 database d [o ] [c | q]

d Unique name for the database

o Options to shutdown command (eg 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 latch see PMON dump

PMON failed to acquire latch see PMON dump

PMON failed to acquire latch see PMON dump

Thu Dec ::

PMON failed to acquire latch see 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

Thread closed 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命令启动数据库或实例

使用srvctl start database可以启动数据库的所有实例:

bash$ srvctl start database d eygle

在第一个节点警告日志记录了如下启动过程

Thu Dec ::

Starting ORACLE instance (normal)

LICENSE_MAX_SESSION =

LICENSE_SESSIONS_WARNING =

Interface type bge configured from OCR for use as a cluster interconnect

Interface type bge configured from OCR for use as a cluster interconnect

Interface type bge 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 event prior 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 Vendor proto

DIAG started with pid= OS id=

PMON started with pid= OS id=

PSP started 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 upto MB

Please make sure the kernel parameterwhich limits SO_RCVBUF value set by

applications is atleast MB

LMD started with pid= OS id=

LMS started with pid= OS id=

LMS started with pid= OS id=

MMAN started with pid= OS id=

DBW started 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=

CJQ started with pid= OS id=

MMON started with pid= OS id=

MMNL started with pid= OS id=

Thu Dec ::

lmon registered with NM instance id (internal mem no )

Thu Dec ::

Reconfiguration started (old inc new inc )

List of nodes:

Global Resource Directory frozen

* allocate domain invalid = 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

LCK started 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 thread with 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 ::

Thread advanced to log sequence

Thread opened 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 type bge configured from OCR for use as a cluster interconnect

Interface type bge configured from OCR for use as a cluster interconnect

Interface type bge 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 event prior 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 Vendor proto

PMON started with pid= OS id=

DIAG started with pid= OS id=

PSP started 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 upto MB

Please make sure the kernel parameterwhich limits SO_RCVBUF value set by

applications is atleast MB

LMD started with pid= OS id=

LMS started with pid= OS id=

LMS started with pid= OS id=

MMAN started with pid= OS id=

DBW started 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=

CJQ started with pid= OS id=

MMON started with pid= OS id=

MMNL started with pid= OS id=

Thu Dec ::

lmon registered with NM instance id (internal mem no )

Thu Dec ::

Reconfiguration started (old inc new inc )

List of nodes:

Global Resource Directory frozen

* allocate domain invalid = 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 start st 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 start st pass IR

Fix write in gcs resources

Reconfiguration complete

LCK started with pid= OS id=

Thu Dec ::

ALTER DATABASE MOUNT

Thu Dec ::

Setting recovery target incarnation to

Thu Dec ::

Successful mount of redo thread with 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 ::

Thread opened 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

The End

               

上一篇:oracle管理PPT深入分析

下一篇:Oracle转型云服务替代软件许可