ITPub博客

首页 > 数据库 > Oracle > Oracle xe 手工创建新数据库后,更改启动停止脚本,监听 for windows

Oracle xe 手工创建新数据库后,更改启动停止脚本,监听 for windows

原创 Oracle 作者:spectre2 时间:2011-03-25 23:13:15 0 删除 编辑

更改监听:

在D:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN下

listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\app\oracle\product\10.2.0\server)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\oracle\app\oracle\product\10.2.0\server)
      (PROGRAM = extproc)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_ora10g))
      (ADDRESS = (PROTOCOL = TCP)(HOST = ssjwork)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (ora10g)

tnsnames.ora

ORA10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ssjwork)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = dedicated)
      (SERVICE_NAME = ora10g)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_ora10g))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_ora10g))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

更改启动停止脚本:

在D:\oraclexe\app\oracle\product\10.2.0\server\BIN\下

StartDB.bat

net start OracleXETNSListener
net start OracleServiceORA10G
@oradim -startup -sid ora10g -starttype inst > nul 2>&1

cleanup.bat

@echo off
D:\oraclexe\app\oracle\product\10.2.0\server\bin\lsnrctl stop LISTENER > nul 2>&1
D:\oraclexe\app\oracle\product\10.2.0\server\bin\oradim -SHUTDOWN -SID ORA10G -SHUTTYPE SRVC,INST -SHUTMODE ABORT > nul 2>&1
D:\oraclexe\app\oracle\product\10.2.0\server\bin\oradim -DELETE -SID ORA10G > nul 2>&1
数据库停止脚本是Stop.bat,不需要修改。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14184018/viewspace-690534/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-02-27

  • 博文量
    196
  • 访问量
    1868748