Oracle多实例配置

在安装oracle的时候创建了默认的数据库实例orcl,后来想创建一个恢复目录数据库,有创建了一个实例:catalog。


1.oracle服务端的配置

listener.ora文件

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
      (SID_NAME = orcl)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = CATALOG)
      (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
      (SID_NAME = catalog)
    )
  )


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = llj)(PORT = 1521))
    )
  (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = llj)(PORT = 1522))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

 

tnsnames.ora文件

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = llj)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )

CATALOG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = llj)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = CATALOG)
    )
  )


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

 

修改好之后的效果如下:

一个侦听器侦听多个数据库,如下配置,数据库名和SID分别是orclcatalog

 

(3).在oracle\product\10.2.0\db_1\BIN里面运行LSNRCTL.EXE,先执行stop,再执行start。用status查看监听器的状态。

 

 

2.Oracle客户端的配置

tnsnames.ora文件要增加如下内容:

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = llj)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = orcl)
      (SERVER = DEDICATED)
    )
  )


CATALOG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = llj)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SID = catalog)
      (SERVER = DEDICATED)
    )
  )
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值