ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 11gR2和10gR2中crsctl/srvctl的区别

11gR2和10gR2中crsctl/srvctl的区别

原创 Linux操作系统 作者:lwitpub 时间:2012-04-12 14:59:29 0 删除 编辑
Oracle RAC版本,11gR2中crsctl命令有所增加:

dukerac02 | CBABDB2 | /home/oracle > crsctl
Usage: crsctl []
    command: enable|disable|config|start|stop|relocate|replace|stat|add|delete|modify|getperm|setperm|check|set|get|unset|debug|lsmodules|query|pin|unpin
For complete usage, use:
    crsctl [-h | --help]
For detailed help on each command and object and its options use:
    crsctl -h  e.g. crsctl relocate resource -h

dukerac02 | CBABDB2 | /home/oracle > crsctl add resource --help
Usage:
  crsctl add resource -type [[-file ] | [-attr "[,...]"]] [-f] [-i]
     :   {= | @=}
        :   {@SERVERNAME()[@DEGREEID()] |
                       @CARDINALITYID()[@DEGREEID()] }
where
     resName         Add named resource
     typeName        Resource type
     filePath        Attribute file
     attrName        Attribute name
     value           Attribute value
     server          Server name
     cid             Resource cardinality ID
     did             Resource degree ID
     -f              Force option
     -i              Fail if request cannot be processed immediately

例如,我想把Procwatcher这个oracle tool增加到oracle clusterware中。
注:Procwatcher功能非常的强悍,大概有如下方面的功能:
1. 收集cluster等后台进程信息
2. session process的call stack等
3. 还可以收集session的wait,lock等信息,具体可以参考其prw.sh脚本,通过修改其中的一些参数进行控制。

Run the following command if on 11.2+ (run this command as the user you want Procwatcher to run as):
dukerac02 | CBABDB2 | /home/oracle > crsctl add resource procwatcher -type application -attr "ACTION_SCRIPT=/home/oracle/prw.sh,START_DEPENDENCIES=hard(ora.racdb.db),AUTO_START=always,STOP_TIMEOUT=15"
Note: Clusterware log info in: /log//agent/crsd/application_oracle

If on 10g or 11.1 run the following as root:
./crs_profile -create procwatcher -t application -a -r -o as=always,pt=15

Example:
./crs_profile -create procwatcher -t application -a /home/oracle/prw.sh -r ora.racdb.racdb1.inst -o as=always,pt=15
 Note: Clusterware log info in:
/log//agent/crsd/application_oracle

Then register the resource:
./crs_register procwatcher

If you intend to run procwatcher as a user other than root, change the permissions:
./crs_setperm procwatcher -u user:oracle:r-x
./crs_setperm procwatcher -o oracle
Note: Refer to the crsd.log to get information about procwatcher monitoring via the clusterware.

11gR2:
dukerac02 | CBABDB2 | /home/oracle > srvctl
Usage: srvctl []
    commands: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config
    objects: database|instance|service|nodeapps|vip|asm|diskgroup|listener|srvpool|server|scan|scan_listener|oc4j|home|filesystem|gns
For detailed help on each command and object and its options use:
  srvctl -h or
  srvctl -h

10gR2:
[oracle@rh4racdb01 ~]$ srvctl
Usage: srvctl []
    command: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config
    objects: database|instance|service|nodeapps|asm|listener
For detailed help on each command and object and its options use:
    srvctl -h

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/628922/viewspace-720982/,如需转载,请注明出处,否则将追究法律责任。

上一篇: ORA-01152 故障解决
请登录后发表评论 登录
全部评论