这是一个9i的RAC数据库,用的oracm做的cluster,现在已经完全过时,估计已经很少有环境还在用了。
在这里小记一把启动步骤,以备今后,或者和我有类似环境的朋友查验。
1.启动oracm进程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
以root用户执行: export ORACLE_HOME=/u01/app/oracle/product/9.2.0 lxrptrdb007:~ # /u01/app/oracle/product/9.2.0/oracm/bin/ocmstart.sh oracm </dev/null 2>&1 >/u01/app/oracle/product/9.2.0/oracm/log/cm.out & 启动后,将出现oracm的进程: oracle@lxrptrdb007:~> ps -ef |grep oracm root 16052 1 0 14:02 ? 00:00:00 oracm root 16054 16052 0 14:02 ? 00:00:00 oracm root 16055 16054 0 14:02 ? 00:00:00 oracm root 16056 16054 0 14:02 ? 00:00:00 oracm root 16057 16054 0 14:02 ? 00:00:05 oracm root 16058 16054 0 14:02 ? 00:00:00 oracm root 16059 16054 0 14:02 ? 00:00:00 oracm root 16060 16054 0 14:02 ? 00:00:00 oracm root 16061 16054 0 14:02 ? 00:00:00 oracm root 16072 16054 0 14:02 ? 00:00:00 oracm oracle 25283 25250 0 19:13 pts/0 00:00:00 grep oracm oracle@lxrptrdb007:~> |
2.启动gsd进程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
以oracle用户: oracle@lxrptrdb007:~> gsdctl start Successfully started GSD on local node 启动后将出现gsd的进程: oracle@lxrptrdb007:~> ps -ef |grep gsd oracle 25874 1 1 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25899 25874 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25900 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25901 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25902 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25903 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25904 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25905 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25914 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25916 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25917 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25918 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25920 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25921 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25922 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25923 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25924 25899 0 19:14 pts/0 00:00:00 /u01/app/oracle/jre/1.1.8/bin/../bin/i686/native_threads/jre -DPROGRAM=gsd -classpath /u01/app/oracle/product/9.2.0/jlib/netcfg.jar:/u01/app/oracle/product/9.2.0/JRE/lib/rt.jar:/u01/app/oracle/product/9.2.0/jlib/srvm.jar oracle.ops.mgmt.daemon.OPSMDaemon /u01/app/oracle/product/9.2.0 oracle 25948 25250 0 19:14 pts/0 00:00:00 grep gsd oracle@lxrptrdb007:~> |
3.启动数据库:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
在启动gsd之后,我们已经能用srvctl查看cluster情况: oracle@lxrptrdb007:~> srvctl status database -d RAPTEP Instance RAPTEP1 is not running on node lxrptrdb001 Instance RAPTEP2 is running on node lxrptrdb002 Instance RAPTEP3 is running on node lxrptrdb003 Instance RAPTEP4 is running on node lxrptrdb004 Instance RAPTEP5 is running on node lxrptrdb005 Instance RAPTEP6 is running on node lxrptrdb006 Instance RAPTEP7 is not running on node lxrptrdb007 Instance RAPTEP8 is running on node lxrptrdb008 Instance RAPTEP9 is running on node lxrptrdb009 Instance RAPTEP10 is not running on node lxrptrdb010 oracle@lxrptrdb007:~> 我们现在来启动第七个节点: srvctl start instance -d RAPTEP -i RAPTEP7 启动后检查进程: oracle@lxrptrdb007:~> ps -ef |grep ora_ oracle 26383 1 0 19:15 ? 00:00:00 ora_pmon_RAPTEP7 oracle 26385 1 0 19:15 ? 00:00:00 ora_diag_RAPTEP7 oracle 26387 1 0 19:15 ? 00:00:01 ora_lmon_RAPTEP7 oracle 26391 1 1 19:15 ? 00:00:01 ora_lmd0_RAPTEP7 oracle 26393 1 0 19:15 ? 00:00:00 ora_lms0_RAPTEP7 oracle 26395 1 0 19:15 ? 00:00:00 ora_lms1_RAPTEP7 oracle 26397 1 2 19:15 ? 00:00:02 ora_dbw0_RAPTEP7 oracle 26399 1 0 19:15 ? 00:00:00 ora_lgwr_RAPTEP7 oracle 26401 1 0 19:15 ? 00:00:00 ora_ckpt_RAPTEP7 oracle 26403 1 1 19:15 ? 00:00:01 ora_smon_RAPTEP7 oracle 26405 1 0 19:15 ? 00:00:00 ora_reco_RAPTEP7 oracle 26407 1 0 19:15 ? 00:00:00 ora_cjq0_RAPTEP7 oracle 26409 1 0 19:15 ? 00:00:00 ora_arc0_RAPTEP7 oracle 26411 1 0 19:15 ? 00:00:00 ora_arc1_RAPTEP7 oracle 26413 1 0 19:15 ? 00:00:00 ora_arc2_RAPTEP7 oracle 26415 1 0 19:15 ? 00:00:00 ora_arc3_RAPTEP7 oracle 26486 1 0 19:15 ? 00:00:00 ora_lck0_RAPTEP7 oracle 26501 1 0 19:15 ? 00:00:00 ora_p000_RAPTEP7 oracle 26503 1 0 19:15 ? 00:00:00 ora_p001_RAPTEP7 oracle 26505 1 0 19:15 ? 00:00:00 ora_p002_RAPTEP7 oracle 26507 1 0 19:15 ? 00:00:00 ora_p003_RAPTEP7 oracle 26509 1 0 19:15 ? 00:00:00 ora_p004_RAPTEP7 oracle 26511 1 0 19:15 ? 00:00:00 ora_p005_RAPTEP7 oracle 26513 1 0 19:15 ? 00:00:00 ora_p006_RAPTEP7 oracle 26515 1 0 19:15 ? 00:00:00 ora_p007_RAPTEP7 oracle 26517 1 7 19:15 ? 00:00:07 ora_p008_RAPTEP7 oracle 26519 1 7 19:15 ? 00:00:07 ora_p009_RAPTEP7 oracle 26521 1 7 19:15 ? 00:00:07 ora_p010_RAPTEP7 oracle 26527 1 7 19:15 ? 00:00:07 ora_p011_RAPTEP7 oracle 26529 1 7 19:15 ? 00:00:07 ora_p012_RAPTEP7 oracle 26531 1 7 19:15 ? 00:00:07 ora_p013_RAPTEP7 oracle 26533 1 6 19:15 ? 00:00:06 ora_p014_RAPTEP7 oracle 26535 1 7 19:15 ? 00:00:07 ora_p015_RAPTEP7 oracle 26537 1 0 19:15 ? 00:00:00 ora_p016_RAPTEP7 oracle 26539 1 0 19:15 ? 00:00:00 ora_p017_RAPTEP7 oracle 26541 1 0 19:15 ? 00:00:00 ora_p018_RAPTEP7 oracle 26543 1 0 19:15 ? 00:00:00 ora_p019_RAPTEP7 oracle 26545 1 0 19:15 ? 00:00:00 ora_p020_RAPTEP7 oracle 26547 1 0 19:15 ? 00:00:00 ora_p021_RAPTEP7 oracle 26549 1 0 19:15 ? 00:00:00 ora_p022_RAPTEP7 oracle 26551 1 0 19:15 ? 00:00:00 ora_p023_RAPTEP7 oracle 26553 1 0 19:15 ? 00:00:00 ora_p024_RAPTEP7 oracle 26555 1 0 19:15 ? 00:00:00 ora_p025_RAPTEP7 oracle 26557 1 0 19:15 ? 00:00:00 ora_p026_RAPTEP7 oracle 26559 1 0 19:15 ? 00:00:00 ora_p027_RAPTEP7 oracle 26562 1 0 19:15 ? 00:00:00 ora_p028_RAPTEP7 oracle 26564 1 0 19:15 ? 00:00:00 ora_p029_RAPTEP7 oracle 26566 1 0 19:15 ? 00:00:00 ora_p030_RAPTEP7 oracle 26568 1 0 19:15 ? 00:00:00 ora_p031_RAPTEP7 oracle 26570 1 0 19:15 ? 00:00:00 ora_p032_RAPTEP7 oracle 26572 1 0 19:15 ? 00:00:00 ora_p033_RAPTEP7 oracle 26574 1 0 19:15 ? 00:00:00 ora_p034_RAPTEP7 oracle 26576 1 0 19:15 ? 00:00:00 ora_p035_RAPTEP7 oracle 26578 1 0 19:15 ? 00:00:00 ora_p036_RAPTEP7 oracle 26580 1 0 19:15 ? 00:00:00 ora_p037_RAPTEP7 oracle 26582 1 0 19:15 ? 00:00:00 ora_p038_RAPTEP7 oracle 26584 1 0 19:15 ? 00:00:00 ora_p039_RAPTEP7 oracle 27080 25250 0 19:17 pts/0 00:00:00 grep ora_ oracle@lxrptrdb007:~> |
注:srvctl start instance -d [db_name] -i [instance_name]时,可能会遇到:
1 |
PRKP-1008 : Failed to start listeners associated with instance [instance_name] on node [host_name] |
这估计是listerner设置不正确,请查阅metalink ID 177254.1(见下方);或者是因为listener设置了密码(9i环境listener安全要求高的话,都会加密码),此时手工启动listener即可。
附:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
PRKP-1011 PRKO-2038 PRKP-1009 PRKO-2032 PRK0-2028 when starting lsnr from srvctl [ID 177254.1] Modified 10-JUN-2012 Type PROBLEM Status ARCHIVED PROBLEM DESCRIPTION ===================== You are receiving one or more of the following errors when you try to start/stop or check the status of the listener on one or more nodes using SRVCTL utility: PRKP-1008 "Failed to start listeners associated with instance {0} on node {1}" PRKO-2038 "Startup of listeners failed on node: " PRKP-1009 "Failed to stop all the listeners associated with all the instances of cluster database {0}" PRKP-1010 "Failed to stop all the listeners associated with instance {0} on {1}" PRKO-2032 "Shutdown of listeners failed on node: " PRKP-1011 "Failed to get status of all the listeners associated with instance {0} on node {1}" PRKO-2028 "Error in checking condition of listener on node: " PROBLEM SOLUTION ================== (1) Make sure that you are able to start/stop or check the status of the listener manually from each node. If you are not able to do this, problem is not with the srvctl utility but with listener setup. Please fix this and then use srvctl utility to administer listeners thru srvctl. lsnrctl start/stop/status (2) Make sure that SID_LIST is set in the LISTENER.ORA. Example: ========= The listener.ora is configured as such: LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = hprac-25)(PORT = 1521)) ) ) ) #SID_LIST_LISTENER = # (SID_LIST = # (SID_DESC = # (SID_NAME = PLSExtProc) # (ORACLE_HOME = /oracle/9iship/rac901) # (PROGRAM = extproc) # ) # (SID_DESC = # (ORACLE_HOME = /oracle/9iship/rac901) # (SID_NAME = rac4) # ) # ) This will generate the following errors: $ srvctl start|stop -p <db_name> -s lsnr PRKP-1011 : Failed to get status of the listeners associated with instance rac4 on nodehprac-25 PRKO-2038 : Startup of listeners failed on node: hprac-25 If we uncomment the sid_list_listener paragraph in the listener SRVCTL works fine. (3) If you are encountering these errors after changing your host name, reconfigure your srvctl configuration by deleting the database and re-adding it $ srvctl remove database -d <db_name> $ srvctl add database -d <db_name> -o <oracle_home> $ srvctl add instance -d <db_name> -i <instance_name> -n <node1> $ srvctl add instance -d <db_name> -i <instance_name> -n <node2> $ srvctl config -p <db_name> Note: srvctl syntax used here is for 92. Check the manuals for 901 syntax. (4) If you are using listener.ora file in $ORACLE_HOME/network/admin or $TNS_ADMIN pointing to a different location, make sure that there is no listener.ora present in other defailt locations like /etc or /var/opt/oracle. (5) Since GSD starts/stops or checks status of the listener, make sure that GSD is being started as proper user who has access to do so and also, GSD owner should have write access to the listener.log file. Check Bug:2243507 for more details. (6) Please create a new listener.ora file preferably using 'netmgr' since it creates the file in proper format with proper entries. (7) If none of the above suggestions work, please turn on gsd tracing on all nodes, as mentioned in Note:178683.1,and send $ORACLE_HOME/srvm/log/gsdaemon*.log from all nodes. NOTE: In 9i RAC SRVCTL has replaced OPSTCTL References ---------- Additional Search Words ----------------------- PRKP-1011 prkp-1011 PRKO-2038 prko-2038 srvctl SRVCTL lsnr LSNR PRKR PRK0 PRKP 1009 1010 1011 2028 1008 Related Products Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition Errors PRKO-2038; PRKP-1011 |