最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501
当前位置: 首页 - 科技 - 知识百科 - 正文

azure云上oracle11.2.0.4里dataguard归档日志传输1034问题详

来源:懂视网 责编:小采 时间:2020-11-09 16:29:10
文档

azure云上oracle11.2.0.4里dataguard归档日志传输1034问题详

azure云上oracle11.2.0.4里dataguard归档日志传输1034问题详:1 , dataguard 搭建好后,归档日志传输不过去 去查看master库上面的日志 tail –f /data/oracle/diag/rdbms/test_m1/powerdes/trace/alert_powerdes.log,显示信息如下: Sun May 08 00:34:17 2016 Error 1034 rec
推荐度:
导读azure云上oracle11.2.0.4里dataguard归档日志传输1034问题详:1 , dataguard 搭建好后,归档日志传输不过去 去查看master库上面的日志 tail –f /data/oracle/diag/rdbms/test_m1/powerdes/trace/alert_powerdes.log,显示信息如下: Sun May 08 00:34:17 2016 Error 1034 rec

1 , dataguard 搭建好后,归档日志传输不过去 去查看master库上面的日志 tail –f /data/oracle/diag/rdbms/test_m1/powerdes/trace/alert_powerdes.log,显示信息如下: Sun May 08 00:34:17 2016 Error 1034 received logging on to the standby PING[ARC

1,dataguard搭建好后,归档日志传输不过去

去查看master库上面的日志

tail –f /data/oracle/diag/rdbms/test_m1/powerdes/trace/alert_powerdes.log,显示信息如下:

Sun May 08 00:34:17 2016

Error 1034 received logging on to the standby

PING[ARC2]: Heartbeat failed to connect to standby 'test_m2'. Error is1034.

2,tnsping earch_m2是通的

[oracle@azure_test_dbm1_3_111 admin]$ tnsping test_m3

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 08-MAY-2016 09:13:42

Copyright (c) 1997, 2013, Oracle. All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.112)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = test_m2)))

OK (0 msec)

[oracle@azure_test_dbm1_3_111 admin]$

3,去standby备库上,Check检查下service_name,看到service_names确实是test_m2

看起来service_name也没用错,如下所示:

[oracle@azure_test_dbm1_3_112 admin]$ rlwrap sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun May 8 09:15:27 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter name;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

cell_offloadgroup_name string

db_file_name_convert string /oracle/app/oracle/oradata/pow

erdes, /oracle/app/oracle/orad

ata/powerdes

db_name string powerdes

db_unique_name string test_m2

global_names boolean FALSE

instance_name string powerdes

lock_name_space string

log_file_name_convert string /data/oracle/oradata/powerdes,

/data/oracle/oradata/pwerdes

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

processor_group_name string

service_names string test_m2

SQL>

文章来源blog地址:http://blog.csdn.net/mchdba/article/details/51344246,谢绝转载


4,在master库、standby库,通过sqlplus登录报错

# 主库登录sqlplus报错

[oracle@azure_test_dbm1_3_111 admin]$ sqlplus sys/testsys@test_m2 as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun May 8 09:19:48 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved.

ERROR:

ORA-12514: TNS:listener does not currently know of service requested in connect

descriptor

Enter user-name:

# 备库sqlplus登录报错

[oracle@azure_test_dbm1_3_112 admin]$ sqlplus sys/testsys@test_m2 as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun May 8 09:18:39 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved.

ERROR:

ORA-12514: TNS:listener does not currently know of service requested in connect

descriptor

Enter user-name:

都报错:ORA-12514:TNS:listener does not currently know of service requested in connect descriptor,这个问题一般就涉及到的是tnsnames.ora里面的service_name没有写对了。

5,替换service_name,问题解决

回忆这个备库的搭建过程,我刚建库dbca的时候,设置的service_name是powerdes,我在配置dataguard的时候,修改了参数文件initpowerdes.ora,有在里面新设置*.db_unique_name=test_m2,再次create spfile frompfile;然后以新的参数文件启动数据库后,看到service_names变成了test_m2了,而我就在tnsnames.ora里面设置了新的service_names名字test_m2,这个新的test_m2没有生效结果报错ORA-12514了。

因此,我要将没有生效的test_m2换成原来的powerdes,需要换的地方有2个,一个是listener.ora,一个是tnsnames.ora,主库master库和备库standby库都要修改如下所示:

#主库master库修改1个文件tnsnames.ora

# tnsnames.ora文件

[oracle@azure_test_dbm1_3_111 admin]$ vim tnsnames.ora

test_m2 =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = powerdes)

)

)

#备库standby库需要修改2个文件listener.ora、tnsnames.ora

# listener.ora文件

[oracle@azure_test_dbm1_3_112 admin]$ vim listener.ora

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1)

(PROGRAM = extproc)

)

(SID_DESC =

(SID_NAME = powerdes)

(ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1)

)

)

ADR_BASE_LISTENER = /oracle/app/oracle

# tnsnames.ora文件

[oracle@azure_test_dbm1_3_112 admin]$ vim tnsnames.ora

test_m2 =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = powerdes)

)

)

修改完配置后,然后重启lsnrctl监听服务,再在备库使用sqlplus登录test_m2,登录成功:

[oracle@azure_test_dbm1_3_112 admin]$ sqlplus sys/testsys@test_m2 as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun May 8 09:34:51 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

再去看主库master库的后台alert日志,就会发现已经有开始传输归档日志的记录了:

……

******************************************************************

LGWR: Setting 'active' archival fordestination LOG_ARCHIVE_DEST_2

******************************************************************

LGWR: Standby redo logfile selected toarchive thread 1 sequence 26

LGWR: Standby redo logfile selected forthread 1 sequence 26 for destination LOG_ARCHIVE_DEST_2

Thread 1 advanced to log sequence 26 (LGWRswitch)

Current log# 2 seq# 26 mem# 0:/oracle/app/oracle/oradata/powerdes/redo02.log

Sun May 08 01:12:22 2016

Archived Log entry 22 added for thread 1sequence 25 ID 0xcf7feffa dest 1:

ARC0: Standby redo logfile selected forthread 1 sequence 25 for destination LOG_ARCHIVE_DEST_2

Destination LOG_ARCHIVE_DEST_2 isSYNCHRONIZED

……

PS:这里问题比较奇怪,我上次这里service_name需要修改成新的参数文件里面的test_m2才能归档日志传输到备库standby上面,但是这次确需要保持原来的service_name。看来这里面还有别的奥妙所在。需要去探索清楚了。

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文档

azure云上oracle11.2.0.4里dataguard归档日志传输1034问题详

azure云上oracle11.2.0.4里dataguard归档日志传输1034问题详:1 , dataguard 搭建好后,归档日志传输不过去 去查看master库上面的日志 tail –f /data/oracle/diag/rdbms/test_m1/powerdes/trace/alert_powerdes.log,显示信息如下: Sun May 08 00:34:17 2016 Error 1034 rec
推荐度:
标签: oracle 云上 Azure
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top