获取实例名
ps -ef |grep ora_smon | grep -v "grep o" | awk '{print $8}'|awk -F '_' '{print $3}'
实例如下:
su - oracle -c 'export ORACLE_SID=test;echo "show parameter local_l" | sqlplus -s / as sysdba'
ps -ef |grep ora_smon | grep -v "grep o" | awk '{print $8}'|awk -F '_' '{print $3}'
实例如下:
su - oracle -c 'export ORACLE_SID=test;echo "show parameter local_l" | sqlplus -s / as sysdba'
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29802484/viewspace-2135087/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29802484/viewspace-2135087/