其实srvctl应该是在/u01/oracle/product/10.2.0/crs_1/bin目录下的。但是因为我们~/.bash_profile 内 PATH的顺序问题。所以修改
1、解决目录问题
[ora@rac1-21 bin]$ srvctl
/u01/oracle/product/10.2.0/db_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: no such file or directory
[ora@rac1-21 bin]$ which srvctl
/u01/oracle/product/10.2.0/db_1/bin/srvctl
[ora@rac1-21 bin]$ echo $path
/u01/oracle/product/10.2.0/db_1/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/ora/bin:/u01/oracle/product/10.2.0/crs_1/bin
其实srvctl应该是在/u01/oracle/product/10.2.0/crs_1/bin目录下的。但是因为我们~/.bash_profile 内 path的顺序问题。所以修改了一下
export path=.:${path}:$home/bin:$ora_crs_home/bin:$oracle_home/bin
这里也提示我们path是有顺序更好。
2、解决bug问题
接着使用srvctl 还是报错。想想我们vipca前,,添加了unset 这里,我们需要编辑srvctl注释
#remove this workaround when the bug 3937317 is fixed
#ld_assume_kernel=2.4.19
#export ld_assume_kernel
[ora@rac2-22 ~]$ srvctl --help
用法: srvctl []
命令: enable|disable|start|stop|relocate|status|add|remove|modify|getenv|setenv|unsetenv|config
对象: database|instance|service|nodeapps|asm|listener
有关各个命令和对象的详细帮助, 请使用:
srvctl -h











