- 最后登录
- 2016-8-29
- 在线时间
- 35 小时
- 威望
- 0
- 金钱
- 142
- 注册时间
- 2013-8-27
- 阅读权限
- 10
- 帖子
- 28
- 精华
- 0
- 积分
- 0
- UID
- 1204
|
3#
发表于 2014-4-12 13:06:28
在备库上创建日志组文件
SQL> alter database add standby logfile thread 1 group 106 size 50m,group 107 size 50m,group 108 size 50m,group 109 size 50m,group 110 size 50m,group 111 size 50m;
Database altered.
SQL> alter database add standby logfile thread 2 group 206 size 50m,group 207 size 50m,group 208 size 50m,group 209 size 50m,group 210 size 50m,group 211 size 50m;
SQL> select group#,thread#,bytes/1024/1024 M,used,archived,status from v$standby_log;
GROUP# THREAD# M USED ARC STATUS
---------- ---------- ---------- ---------- --- ----------
106 1 50 0 YES UNASSIGNED
107 1 50 0 YES UNASSIGNED
108 1 50 0 YES UNASSIGNED
109 1 50 0 YES UNASSIGNED
110 1 50 0 YES UNASSIGNED
111 1 50 0 YES UNASSIGNED
206 2 50 0 YES UNASSIGNED
207 2 50 0 YES UNASSIGNED
208 2 50 0 YES UNASSIGNED
209 2 50 0 YES UNASSIGNED
210 2 50 0 YES UNASSIGNED
211 2 50 0 YES UNASSIGNED
12 rows selected.
SQL> select group#,type,member from v$logfile order by 1;
GROUP# TYPE MEMBER
---------- ------- ------------------------------------------------------------
101 ONLINE +ORADATA/mydb/onlinelog/group_101.273.843253809
102 ONLINE +ORADATA/mydb/onlinelog/group_102.275.843253833
103 ONLINE +ORADATA/mydb/onlinelog/group_103.271.843254831
104 ONLINE +ORADATA/mydb/onlinelog/group_104.272.843254997
105 ONLINE +ORADATA/mydb/onlinelog/group_105.267.843255011
106 STANDBY +ORAARCH/mydb/onlinelog/group_106.262.844636155
106 STANDBY +ORADATA/mydb/onlinelog/group_106.268.844636155
107 STANDBY +ORAARCH/mydb/onlinelog/group_107.261.844636185
107 STANDBY +ORADATA/mydb/onlinelog/group_107.267.844636185
108 STANDBY +ORAARCH/mydb/onlinelog/group_108.260.844636203
108 STANDBY +ORADATA/mydb/onlinelog/group_108.266.844636203
109 STANDBY +ORAARCH/mydb/onlinelog/group_109.259.844636215
109 STANDBY +ORADATA/mydb/onlinelog/group_109.256.844636215
110 STANDBY +ORADATA/mydb/onlinelog/group_110.257.844636223
110 STANDBY +ORAARCH/mydb/onlinelog/group_110.258.844636223
111 STANDBY +ORADATA/mydb/onlinelog/group_111.258.844636233
111 STANDBY +ORAARCH/mydb/onlinelog/group_111.257.844636233
201 ONLINE +ORADATA/mydb/onlinelog/group_201.274.843253825
202 ONLINE +ORADATA/mydb/onlinelog/group_202.276.843253839
203 ONLINE +ORADATA/mydb/onlinelog/group_203.269.843254957
204 ONLINE +ORADATA/mydb/onlinelog/group_204.270.843255007
205 ONLINE +ORADATA/mydb/onlinelog/group_205.266.843255017
206 STANDBY +ORADATA/mydb/onlinelog/group_206.269.844636425
206 STANDBY +ORAARCH/mydb/onlinelog/group_206.263.844636425
207 STANDBY +ORADATA/mydb/onlinelog/group_207.270.844636459
207 STANDBY +ORAARCH/mydb/onlinelog/group_207.264.844636459
208 STANDBY +ORADATA/mydb/onlinelog/group_208.271.844636471
208 STANDBY +ORAARCH/mydb/onlinelog/group_208.265.844636471
209 STANDBY +ORADATA/mydb/onlinelog/group_209.272.844636481
209 STANDBY +ORAARCH/mydb/onlinelog/group_209.266.844636481
210 STANDBY +ORADATA/mydb/onlinelog/group_210.273.844636491
210 STANDBY +ORAARCH/mydb/onlinelog/group_210.267.844636493
211 STANDBY +ORADATA/mydb/onlinelog/group_211.274.844636507
211 STANDBY +ORAARCH/mydb/onlinelog/group_211.268.844636507
34 rows selected.
11、调整主库归档的参数。让主库归档日志传输到备库上去;
SQL> alter system set log_archive_dest_2='service=mydb lgwr sync valid_for=(online_logfiles,primary_role) db_unique_name=mydb' sid='*';
System altered.
SQL> alter system set log_archive_config='dg_config=(xhdb,mydb)' sid='*';
System altered.
这是备库上的日志
Sat Apr 12 08:16:39 2014
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
备库上仍然没有归档传递过来
RMAN> list archivelog all;
specification does not match any archived log in the repository
在节点1 和节点2 上的日志
节点1
GWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2
******************************************************************
Sat Apr 12 08:16:35 2014
NSS2 started with pid=39, OS id=29163
Sat Apr 12 08:16:38 2014
PING[ARC2]: Heartbeat failed to connect to standby 'mydb'. Error is 16057.
LGWR: Error 16057 disconnecting from destination LOG_ARCHIVE_DEST_2 standby host 'mydb'
Error 16057 for archive log file 103 to 'mydb'
LGWR: Failed to archive log 103 thread 1 sequence 304 (16057)
Thread 1 advanced to log sequence 304 (LGWR switch)
Current log# 103 seq# 304 mem# 0: +ORADATA/xhdb/onlinelog/group_103.271.843254831
Sat Apr 12 08:16:41 2014
ARC1: Archivelog destination LOG_ARCHIVE_DEST_2 disabled: destination Data Guard configuration error
Archived Log entry 525 added for thread 1 sequence 303 ID 0xf2676426 dest 1:
Sat Apr 12 08:23:25 2014
ALTER SYSTEM SET log_archive_config='dg_config=(xhdb,mydb)' SCOPE=BOTH SID='*';
Sat Apr 12 08:28:34 2014
Thread 1 advanced to log sequence 305 (LGWR switch)
Current log# 104 seq# 305 mem# 0: +ORADATA/xhdb/onlinelog/group_104.272.843254997
Sat Apr 12 08:28:34 2014
Archived Log entry 527 added for thread 1 sequence 304 ID 0xf2676426 dest 1:
节点2
PING[ARC2]: Heartbeat failed to connect to standby 'mydb'. Error is 16191.
Sat Apr 12 08:24:04 2014
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
找不到从哪里下手,搞了一天了,搞不定 ,请有经验的网友帮我看看,谢谢!
|
|