的一个主要特点就是引入了参数,如果这个参数,可能会。
当前是一个已经配置好的Data Guard,为了模拟错误,先将这个参数设置为空:
SQL>
System altered.
SQL>
System altered.
SQL>
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string
SQL>
System altered.
SQL>
System altered.
观察后,,包含重新设置log_archive_dest_2参数后再次执行切换日志,alert文件中仍然看不到预期的错误。
导致问题无法重现的原因可能是,虽然现在已经置为空,,于是尝试。
SQL>
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 2074112 bytes
Variable Size 486541824 bytes
Database Buffers 1644167168 bytes
Redo Buffers 14700544 bytes
Database mounted.
Database opened.
SQL>
System altered.
SQL>
System altered.
SQL>
System altered.
观察alert日志,这时从alert文件中可以看到预期的错误:
Thu Dec 23 21:42:48 2010
Completed: ALTER DATABASE OPEN
Thu Dec 23 21:42:51 2010
Thread 1 advanced to log sequence 11
Current log# 2 seq# 11 mem# 0: /data/oradata/primary/redo02.log
Thu Dec 23 21:42:51 2010
Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:
ORA-16057: DGID from server not in Data Guard configuration
Thu Dec 23 21:42:51 2010
FAL[server, ARC1]: Error 16057 creating remote archivelog file 'standby'
FAL[server, ARC1]: FAL archive failed, see trace file.
Thu Dec 23 21:42:51 2010
Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:
ORA-16055: FAL request rejected
ARCH: FAL archive failed. Archiver continuing
Thu Dec 23 21:42:51 2010
ORACLE Instance primary - Archival Error. Archiver continuing.
Thu Dec 23 21:43:46 2010
Shutting down archive processes
Thu Dec 23 21:43:51 2010
ARCH shutting down
ARC2: Archival stopped
Thu Dec 23 21:45:10 2010
ALTER SYSTEM SET log_archive_dest_2='SERVICE=standby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby' SCOPE=BOTH;
LNS1 started with pid=18, OS id=18425
Thu Dec 23 21:45:29 2010
Thread 1 advanced to log sequence 12
Current log# 3 seq# 12 mem# 0: /data/oradata/primary/redo03.log
Thu Dec 23 21:45:29 2010
Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:
ORA-16057: DGID from server not in Data Guard configuration
Thu Dec 23 21:45:29 2010
FAL[server, ARC1]: Error 16057 creating remote archivelog file 'standby'
FAL[server, ARC1]: FAL archive failed, see trace file.
Thu Dec 23 21:45:29 2010
Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:
ORA-16055: FAL request rejected
ARCH: FAL archive failed. Archiver continuing
Thu Dec 23 21:45:29 2010
ORACLE Instance primary - Archival Error. Archiver continuing.
Thu Dec 23 21:50:51 2010
Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:
Thu Dec 23 21:50:51 2010
PING[ARC1]: Heartbeat failed to connect to standby 'standby'. Error is 16057.
Thu Dec 23 21:55:51 2010
Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:
Thu Dec 23 21:55:51 2010
PING[ARC1]: Heartbeat failed to connect to standby 'standby'. Error is 16057.
Thu Dec 23 22:00:51 2010
Errors in file /opt/ora10g/admin/primary/bdump/primary_arc1_18406.trc:
Thu Dec 23 22:00:51 2010
错误信息很明确,
SQL>
System altered.
SQL>
System altered.
Thu Dec 23 22:05:29 2010
ALTER SYSTEM SET log_archive_config='DG_CONFIG=(primary,standby)' SCOPE=BOTH;
Thu Dec 23 22:05:40 2010
Thread 1 advanced to log sequence 13
Current log# 1 seq# 13 mem# 0: /data/oradata/primary/redo01.log
Thu Dec 23 22:05:40 2010