ORACLE数据库DG备库配置,配置DG物理备库

$ORACLE_HOME/network/admin路径下配置

tnsnames.ora里面的service_name需要与initdg.ora(参数文件)中的DB_UNIQUE_NAME参数保持一致

启动监听lsnrctl start

配置完后,可以使用tnsping来判断是否配置正确

例主库上:tnsping dg22tnsping dg24

备库上:tnsping dg22tnsping dg24

或启动主库到open状态

主库上:sqlplus system/oracle@dg22

备库上:sqlplus system/oracle@dg22

主库:

listener.ora

# listener.ora Network Configuration File: /opt/oracle/10g/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /opt/oracle/10g)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = pri.localdomain)(PORT = 1521))

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

)

)

tnsnames.ora

# tnsnames.ora Network Configuration File: /opt/oracle/10g/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

dg24=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.24)(PORT = 1521))

(LOAD_BALANCE = on)

)

(CONNECT_DATA =

(SERVICE_NAME = dg24)

(FAILOVER_MODE =

(TYPE = SELECT)

(METHOD = BASIC)

(RETRIES = 180)

(DELAY = 5)

)

)

)

dg22=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.22)(PORT = 1521))

(LOAD_BALANCE = on)

)

(CONNECT_DATA =

(SERVICE_NAME = dg22)

(FAILOVER_MODE =

(TYPE = SELECT)

(METHOD = BASIC)

(RETRIES = 180)

(DELAY = 5)

)

)

)

备库:

listener.ora

# listener.ora Network Configuration File: /opt/oracle/10g/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /opt/oracle/10g)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = std.localdomain)(PORT = 1521))

)

)

tnsnames.ora

# tnsnames.ora Network Configuration File: /opt/oracle/10g/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

dg24=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.24)(PORT = 1521))

(LOAD_BALANCE = on)

)

(CONNECT_DATA =

(SERVICE_NAME = dg24)

(FAILOVER_MODE =

(TYPE = SELECT)

(METHOD = BASIC)

(RETRIES = 180)

(DELAY = 5)

)

)

)

dg22=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.22)(PORT = 1521))

(LOAD_BALANCE = on)

)

(CONNECT_DATA =

(SERVICE_NAME = dg22)

(FAILOVER_MODE =

(TYPE = SELECT)

(METHOD = BASIC)

(RETRIES = 180)

(DELAY = 5)

)

)

)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值