文章版权所有 Jusin Hao(luckyfriends) ,支持原创,转载请注明
@echo off
cd c:\
md Oracle
"C:\Program Files (x86)\WinRAR\winrar.exe" x C:\win64_11gR1_database.zip C:\Oracle
copy /y c:\refhost.xml c:\Oracle\database\stage\prereq\db
echo wait.........
echo %date% %time%
echo "start setup Oracle..." >>LogInfo.txt
cd c:\Oracle\database
setup.exe -silent -force -waitforcompletion -responseFile c:\installOracle.rsp -nowait
if %ERRORLEVEL% == 0 echo "oracle setup COMPLETE" >>LogInfo.txt
echo %date% %time% >>LogInfo.txt
rem delay....
echo "oracle start linsenning.." >>LogInfo.txt
@set OH=C:\app\Administrator\product\11.1.0\db_1
@set PATH=%OH%\BIN;%PATH%
REM echo %PATH%
call %OH%\BIN\netca /silent /responseFile c:\netca.rsp
if %ERRORLEVEL% == 0 echo "netcaSUCCESS!" >>LogInfo.txt
if %ERRORLEVEL% == 1 echo "netcaFAIL!" >>LogInfo.txt
echo %date% %time% >>LogInfo.txt
echo "oracle start set ORCL..." >>LogInfo.txt
call %OH%\BIN\dbca -silent -createDatabase -templateName c:\orcl.dbc -gdbname "orcl" -sid "orcl" -emConfiguration LOCAL -sysPassword "Huawei@123" -systemPassword "Huawei@123" -DBSNMPPASSWORD "Huawei@123" -SYSMANPASSWORD "Huawei@123"
if %ERRORLEVEL% == 0 echo "oracleORCL_SUCCESS!" >>LogInfo.txt
if %ERRORLEVEL% == 1 echo "oracleORCL_FAIL!" >>LogInfo.txt
echo %date% %time% >>LogInfo.txt
exit 0
网页题目:windows静默安装Oracle11G脚本
文章路径:
http://cdxtjz.cn/article/pipehh.html