Srvctl命令详解(10g)(二)

2015-07-24 09:18:33 · 作者: · 浏览: 4
2 bin]#?

[root@felix2 bin]# ./srvctl config database -dfelix

felix1 felix1 /u01/oracle/10.2.0/db_1

felix2 felix2 /u01/oracle/10.2.0/db_1

[root@felix2 bin]#

[root@felix2 bin]# ./srvctl config database -dfelix -a

felix1 felix1 /u01/oracle/10.2.0/db_1

felix2 felix2 /u01/oracle/10.2.0/db_1

DB_UNIQUE_NAME: felix

DB_NAME: null

ORACLE_HOME: /u01/oracle/10.2.0/db_1

SPFILE: +DATA/felix/spfilefelix.ora

DOMAIN: null

DB_ROLE: null

START_OPTIONS: null

POLICY: AUTOMATIC

ENABLE FLAG: DB ENABLED

[root@felix2 bin]#

2.查看node Application的配置

[root@felix2 bin]# ./srvctl config nodeapps -nfelix

PRKC-1056 : Failed to get the hostname for nodefelix

PRKH-1001 : HASContext Internal Error

[OCRError(Native: getHostName:[21])]

[root@felix2 bin]# ./srvctl config nodeapps -nfelix1

felix1 felix1 /u01/oracle/10.2.0/db_1

[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -h

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

-n Node name

-a Display VIP configuration

-g Display GSD configuration

-s Display ONS daemonconfiguration

-l Display listenerconfiguration

-h Print usage

[root@felix2 bin]#

[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -a

VIP exists.:/felix1-vip/192.168.10.111/255.255.255.0/eth0

[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -g

GSD exists.

[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -s

ONS daemon exists.

[root@felix2 bin]# ./srvctl config nodeapps -nfelix1 -l

Listener exists.

3.产看监听状态

[root@felix2 bin]# ./srvctl config listener -nfelix1

felix1 LISTENER_FELIX1

4.查看ASM

[root@felix2 bin]# ./srvctl config asm -n felix2

+ASM2 /u01/oracle/10.2.0/db_1

[root@felix2 bin]#

5.查看service

[root@felix2 bin]# ./srvctl config service -h

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

-d Unique name forthe database

-s Service name

-a Additional attributes

-S Additional information for EM Console

-h Print usage

[root@felix2 bin]#

使用add添加对象:

一般情况下,应用层的资源都是在图形化界面的帮助下注册到OCR中,比如VIP、ONS是在安装最后阶段创建的,而数据库、ASM是在执行DBCA的过程中自动注册到OCR中,LISTENER是通过NETCA工具。有写时候需要手工把资源注册到OCR中,这事就用到了add命令。

[root@felix1 bin]# ./srvctl -h

Usage: srvctl [-V]

Usage: srvctl add database -d -o [-m ] [-p ] [-A/netmask] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}][-s ] [-n ] [-y {AUTOMATIC | MANUAL}]

Usage: srvctl add instance -d -i -n

Usage: srvctl add service -d -s -r "" [-a""] [-P ]

Usage: srvctl add service -d -s -u {-r "" | -a""}

Usage: srvctl add nodeapps -n -o -A /netmask[/if1[|if2|...]]

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] [-s] [-l]

Usage: srvctl config asm -n

Usage: srvctl config listener -n

Usage: srvctl disable database -d

Usage: srvctl disable instance -d -i""

Usage: srvctl disable service -d -s"" [-i ]

Usage: srvctl disable asm -n [-i]

Usage: srvctl enable database -d

Usage: srvctl enable instance -d -i""

Usage: srvctl enable service -d -s"" [-i ]

Usage: srvctl enable asm -n [-i]

Usage: srvctl getenv database -d [-t""]

Usage: srvctl getenv instance -d -i [-t ""]

Usage: srvctl getenv service -d -s [-t ""]

Usage: srvctl getenv nodeapps -n [-t ""]

Usage: srvctl modify database -d [-n] [-m ] [-p ] [-r {PRIMARY | PHYSICAL_STANDBY |LOGICAL_STANDBY}] [-s ] [-y {AUTOMATIC | MANUAL}]

Usage: srvctl modify instance -d -i -n

Usage: srvctl modify instance -d -i {-s | -r}

Usage: srvctl m