检测安装的所有 Oracle 版本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20868030/
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
Detect all Oracle versions installed
提问by Epligam
How can I check all oracle versions
and platforms that installed on windows
machine from a command line
or byscript
?
Till now I was using tnsping
and check for the output but it only show the first version according to the path environment variable.
Is there a way to get this info from the registry and without actually connect to DB
?
如何从 a或 by检查机器oracle versions
上安装的所有平台?到目前为止,我一直在使用并检查输出,但它仅根据路径环境变量显示第一个版本。有没有办法从注册表中获取此信息而无需实际连接?windows
command line
script
tnsping
DB
回答by San
Simplest method is to run command prompt and type sqlplus it will show you the oracle version without actually logging into it.
最简单的方法是运行命令提示符并键入 sqlplus 它会向您显示 oracle 版本,而无需实际登录。
Example: Run -> cmd
示例:运行 -> cmd
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。版权所有。
C:\Users\xyz>sqlplus
C:\用户\xyz> sqlplus
SQL*Plus: Release 11.2.0.1.0 Productionon Wed Jan 1 16:46:40 2014
SQL*Plus:2014 年 1 月 1 日星期三 16:46:40发布 11.2.0.1.0 生产版
Copyright (c) 1982, 2010, Oracle. All rights reserved.
版权所有 (c) 1982, 2010,甲骨文。版权所有。
Enter user-name:
输入用户名:
回答by Simon
You'll want to query the Oracle Inventory.
您需要查询Oracle Inventory。
For every Oracle installation, there is an entry in the "Oracle inventory". By default, the Oracle inventory is located under "C:\Program Files\Oracle\Inventory". However, this location can be changed.
对于每个 Oracle 安装,“Oracle 清单”中都有一个条目。默认情况下,Oracle 清单位于“C:\Program Files\Oracle\Inventory”下。但是,此位置可以更改。
In the Registry, the location of the Oracle inventory is in "HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE", where you'll find the key "inst_loc". There, you'll find an XML file containing all installed versions (inventory.xml). See the Oracle documentationfor an example.
在注册表中,Oracle 清单的位置在“HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE”中,您可以在其中找到键“inst_loc”。在那里,您会找到一个包含所有已安装版本的 XML 文件 (inventory.xml)。有关示例,请参阅 Oracle 文档。