有没有办法找到安装在 UNIX 服务器上的 Oracle DB 列表?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10294688/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there any way to find the list of Oracle DBs installed on a UNIX server?
提问by Vivek
I know there are Oracle DBs installed on my UNIX server. Is there any way to get those DB names? I'm using Sun OS.
我知道我的 UNIX 服务器上安装了 Oracle DB。有没有办法获得这些数据库名称?我正在使用 Sun 操作系统。
回答by MichaelN
You can also try ps -ef | grep -i pmon
. Each running pmon
process would be for one DB and base on the pmon
name your database would be ora_pmon_<db sid>
. There could be additional DBs that are not running currently but this would give you the active running database on a Sun box. Also check the /var/opt/oracle/oratab
as mention above for the listing of the DBs if the DB admin is keeping the DB properly listed in oratab
.
你也可以试试ps -ef | grep -i pmon
。每个正在运行的pmon
进程都将用于一个数据库,并基于pmon
您的数据库的名称ora_pmon_<db sid>
。可能还有其他数据库当前未运行,但这将为您提供 Sun 机器上正在运行的活动数据库。另外,还要检查/var/opt/oracle/oratab
如上面提到的,如果DB管理是保持DB中正确列出的DB的上市oratab
。
回答by Satya
cat /etc/oratab|grep -v "^#"|grep -v "N$"|cut -f1 -d: -s