windows下oracle启停脚本-摘

针对不同版本的数据库需注释相关命令行。

  启动数据库脚本:dbstart.cmd

  @echo off

  REM  ------ Common Commands -------

  set ORAHOME="ORACLE_HOME_NAME"

  set ORASID="ORACLE_SID"

  net start Oracle%ORAHOME%TNSListener

  net start OracleService%ORASID%

  REM  ------ Commands For Oracle 8.x - 9.2 --------

  REM net start Oracle%ORAHOME%HTTPServer

  REM net start Oracle%ORAHOME%ClientCache

  REM net start Oracle%ORAHOME%Agent

  REM net start Oracle%ORAHOME%SNMPPeerEncapsulator

  REM net start Oracle%ORAHOME%SNMPPeerMasterAgent

  REM net start Oracle%ORAHOME%PagingServer

  REM net start OracleMTSRecoverService

  REM  ------ Commands For Oracle 10.x --------

  REM net start OracleDBConsole%ORASID%

  REM net start OracleJobScheduler%ORASID%

  REM net start Oracle%ORAHOME%iSQL*Plus

  REM  ------ Commands For Oracle 11.x --------

  REM net start OracleDBConsole%ORASID%

  REM net start OracleJobScheduler%ORASID%

  关闭数据库脚本: dbshut.cmd@echo off

  REM  ------ Common Commands -------

  set ORAHOME="ORACLE_HOME_NAME"

  set ORASID="ORACLE_SID"

  net stop Oracle%ORAHOME%TNSListener

  net stop OracleService%ORASID%

  REM  ------ Commands For Oracle 8.x - 9.2 --------

  REM net stop Oracle%ORAHOME%HTTPServer

  REM net stop Oracle%ORAHOME%ClientCache

  REM net stop Oracle%ORAHOME%Agent

  REM net stop Oracle%ORAHOME%SNMPPeerEncapsulator

  REM net stop Oracle%ORAHOME%SNMPPeerMasterAgent

  REM net stop Oracle%ORAHOME%PagingServer

  REM net stop OracleMTSRecoverService

  REM  ------ Commands For Oracle 10.x --------

  REM net stop OracleDBConsole%ORASID%

  REM net stop OracleJobScheduler%ORASID%

  REM net stop Oracle%ORAHOME%iSQL*Plus

  REM  ------ Commands For Oracle 11.x --------

  REM net stop OracleDBConsole%ORASID%

  REM net stop OracleJobScheduler%ORASID%注:

  ORACLE_HOME_NAME:

  系统注册表HKLM\SOFTWARE\ORACLE\…下ORACLE_HOME_NAME键值。(9i为\HOME0, 10g为\KEY_OraDb10g_home1,11g为\KEY_OraDb11g_home1)

  ORALCLE_SID:

  为Oracle系统标识符。

你可能感兴趣的:(数据库启停脚本)