安装Oracle数据库

我正在尝试安装一个Oracle数据库。

我的想法是从我的Inno Setup安装程序调用DataBase Configuration Assistant,我需要知道这个创build过程的结果代码是否等于0。

但是Oracle安装程序调用了一个.bat文件,它调用了大量的.jar文件,并没有调用.exes文件。

有没有办法知道我的数据库实例是否真的创build?

尝试从命令行使用sql连接到它。

  • 设置环境
  • sqlplus / nolog
  • sys sysdba
  • 显示表格

查看Windows的安装指南(如您提到的.exe和.bat),有关于无提示安装ORACLE_HOME(OUI – setup.exe),监听器(netca)和数据库(dbca)的一章,您可能会发现有用:

http://download.oracle.com/docs/cd/B28359_01/install.111/b32006/gblsupp.htm

故障排除章节只是告诉您检查清单目录中的日志文件,不是很有用:

http://download.oracle.com/docs/cd/B28359_01/install.111/b32006/ts.htm#i1090449

在Windows上安装之前,您可能需要validation两件事情:

  • 您正在安装的驱动器上有足够的空闲磁盘。
  • 以pipe理员身份运行安装。

另外,正如kmarsh所build议的那样,你可以检查你安装的组件是否有响应,例如在运行netca之后执行一个t and并在创build它之后连接到数据库。

另一种select,而不是安装是克隆一个Oracle Home(例如11.1.0.7与最新的补丁),恢复一个种子数据库(与您所有的模式,表),并添加与netca + oradim.exe的Windows服务。 第一步是在这里:

http://download.oracle.com/docs/cd/B28359_01/em.111/b31207/oui6_cloning.htm#CEGFGIDH

有同样的问题,愚蠢的甲骨文:-(

无法在Oracle静默安装批处理脚本中绕过它,所以我创build了一个辅助VBscript,等待Oracle安装程序进程退出,然后再继续。 此外,因为一个单独的进程产生,我不认为有办法得到退出代码,看看它是成功还是失败。 可能还有其他的事情,你可以检查,看它是否成功或失败后,它完成安装。

以静默方式调用Oracle通用安装程序:

setup.exe -silent -nowelcome -force -responseFile“”“”“C:\ response \ oracle11g.rsp”“”“

然后调用vbscript:

cscript.exe // nologo“C:\ waitfororacle.vbs”

这里是waitfororacle.vbs脚本:

Option Explicit ' Synopsys - ' This script is needed because of the way the Oracle Installer processes run. ' Setup.exe calls OUI.exe. The actual installation runs with java.exe, however ' java.exe does not run under the same process tree, so there is no way in the ' batch file to wait for the install to finish. To resolve this problem this ' script will look for the instance of java.exe that is running the Oracle install ' and waits for it to finish. Dim oProcess Dim oProcess2 Dim oWMI Dim colProcesses Dim strWQL Set oWMI = GetObject("winmgmts:\\.\root\cimv2") strWQL = "Select ExecutablePath from Win32_Process Where ExecutablePath Like '%OraInstall%'" Do Set colProcesses = oWMI.ExecQuery(strWQL) For Each oProcess2 in colProcesses Set oProcess = oProcess2 Next Wscript.Sleep 1000 Loop While IsEmpty(oProcess) Do Set colProcesses = oWMI.ExecQuery(strWQL) Wscript.Sleep 3000 Loop Until colProcesses.Count = 0