dataguard ORA-17628 處理

shawnloong發表於2018-07-01
dataguard ORA-17628 處理

點選(此處)摺疊或開啟

  1. RMAN> duplicate target database for standby from active database dorecover nofilenamecheck;

  2. Starting Duplicate Db at 02-JUL-18
  3. using target database control file instead of recovery catalog
  4. allocated channel: ORA_AUX_DISK_1
  5. channel ORA_AUX_DISK_1: SID=396 device type=DISK


  6. contents of Memory Script:
  7. {
  8.    backup as copy reuse
  9.    targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwnetdata' auxiliary format
  10.  '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwnetdata' ;
  11. }
  12. executing Memory Script


  13. Starting backup at 02-JUL-18
  14. allocated channel: ORA_DISK_1
  15. channel ORA_DISK_1: SID=408 device type=DISK
  16. Finished backup at 02-JUL-18


  17. contents of Memory Script:
  18. {
  19.    backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/netdata/control01.ctl';
  20.    restore clone controlfile to '/u01/app/oracle/fast_recovery_area/netdata/control02.ctl' from
  21.  '/u01/app/oracle/oradata/netdata/control01.ctl';
  22. }
  23. executing Memory Script


  24. Starting backup at 02-JUL-18
  25. using channel ORA_DISK_1
  26. channel ORA_DISK_1: starting datafile copy
  27. copying standby control file
  28. output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_netdata.f tag=TAG20180702T183426 RECID=1 STAMP=980447667
  29. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
  30. Finished backup at 02-JUL-18


  31. Starting restore at 02-JUL-18
  32. using channel ORA_AUX_DISK_1


  33. channel ORA_AUX_DISK_1: copied control file copy
  34. Finished restore at 02-JUL-18


  35. contents of Memory Script:
  36. {
  37.    sql clone 'alter database mount standby database';
  38. }
  39. executing Memory Script


  40. sql statement: alter database mount standby database


  41. contents of Memory Script:
  42. {
  43.    set newname for tempfile 1 to
  44.  "/u01/app/oracle/oradata/netdata/temp01.dbf";
  45.    switch clone tempfile all;
  46.    set newname for datafile 1 to
  47.  "/u01/app/oracle/oradata/netdata/system01.dbf";
  48.    set newname for datafile 2 to
  49.  "/u01/app/oracle/oradata/netdata/sysaux01.dbf";
  50.    set newname for datafile 3 to
  51.  "/u01/app/oracle/oradata/netdata/undotbs01.dbf";
  52.    set newname for datafile 4 to
  53.  "/u01/app/oracle/oradata/netdata/users01.dbf";
  54.    backup as copy reuse
  55.    datafile 1 auxiliary format
  56.  "/u01/app/oracle/oradata/netdata/system01.dbf" datafile
  57.  2 auxiliary format
  58.  "/u01/app/oracle/oradata/netdata/sysaux01.dbf" datafile
  59.  3 auxiliary format
  60.  "/u01/app/oracle/oradata/netdata/undotbs01.dbf" datafile
  61.  4 auxiliary format
  62.  "/u01/app/oracle/oradata/netdata/users01.dbf" ;
  63.    sql 'alter system archive log current';
  64. }
  65. executing Memory Script


  66. executing command: SET NEWNAME


  67. renamed tempfile 1 to /u01/app/oracle/oradata/netdata/temp01.dbf in control file


  68. executing command: SET NEWNAME


  69. executing command: SET NEWNAME


  70. executing command: SET NEWNAME


  71. executing command: SET NEWNAME


  72. Starting backup at 02-JUL-18
  73. using channel ORA_DISK_1
  74. channel ORA_DISK_1: starting datafile copy
  75. input datafile file number=00001 name=/u01/app/oracle/oradata/netdata/system01.dbf
  76. output file name=/u01/app/oracle/oradata/netdata/system01.dbf tag=TAG20180702T183437
  77. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
  78. channel ORA_DISK_1: starting datafile copy
  79. input datafile file number=00002 name=/u01/app/oracle/oradata/netdata/sysaux01.dbf
  80. output file name=/u01/app/oracle/oradata/netdata/sysaux01.dbf tag=TAG20180702T183437
  81. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
  82. channel ORA_DISK_1: starting datafile copy
  83. input datafile file number=00003 name=/u01/app/oracle/oradata/netdata/undotbs01.dbf
  84. output file name=/u01/app/oracle/oradata/netdata/undotbs01.dbf tag=TAG20180702T183437
  85. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
  86. channel ORA_DISK_1: starting datafile copy
  87. input datafile file number=00004 name=/u01/app/oracle/oradata/netdata/users01.dbf
  88. output file name=/u01/app/oracle/oradata/netdata/users01.dbf tag=TAG20180702T183437
  89. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
  90. Finished backup at 02-JUL-18


  91. sql statement: alter system archive log current


  92. contents of Memory Script:
  93. {
  94.    backup as copy reuse
  95.    archivelog like "/u01/archive/1_8_980442214.dbf" auxiliary format
  96.  "/u01/archive/1_8_980442214.dbf" ;
  97.    catalog clone archivelog "/u01/archive/1_8_980442214.dbf";
  98.    switch clone datafile all;
  99. }
  100. executing Memory Script


  101. Starting backup at 02-JUL-18
  102. using channel ORA_DISK_1
  103. channel ORA_DISK_1: starting archived log copy
  104. input archived log thread=1 sequence=8 RECID=4 STAMP=980447742
  105. RMAN-00571: ===========================================================
  106. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  107. RMAN-00571: ===========================================================
  108. RMAN-03002: failure of Duplicate Db command at 07/02/2018 18:35:43
  109. RMAN-05501: aborting duplication of target database
  110. RMAN-03015: error occurred in stored script Memory Script
  111. RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/02/2018 18:35:43
  112. ORA-17628: Oracle error 19505 returned by remote Oracle server
檢查備庫alert日誌

點選(此處)摺疊或開啟

  1. Additional information: 3
  2. Mon Jul 02 18:35:43 2018
  3. Errors in file /u01/app/oracle/diag/rdbms/netdata_st1/netdata/trace/netdata_ora_4020.trc:
  4. ORA-19505: failed to identify file "/u01/archive/1_8_980442214.dbf"
  5. ORA-27040: file create error, unable to create file
  6. Linux-x86_64 Error: 13: Permission denied
  7. Additional information: 1

很明顯的錯誤,由於之前是用root建的的目錄未修改許可權

點選(此處)摺疊或開啟

  1. chown -R oracle:oinstall /u01/archive

修改後刪除備庫之前複製檔案

點選(此處)摺疊或開啟

  1. rm -rf /u01/app/oracle/oradata/netdata

重新duplicate

點選(此處)摺疊或開啟

  1. RMAN> duplicate target database for standby from active database dorecover nofilenamecheck;
  2. Starting Duplicate Db at 02-JUL-18
  3. using target database control file instead of recovery catalog
  4. allocated channel: ORA_AUX_DISK_1
  5. channel ORA_AUX_DISK_1: SID=10 device type=DISK


  6. contents of Memory Script:
  7. {
  8.    backup as copy reuse
  9.    targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwnetdata' auxiliary format
  10.  '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwnetdata' ;
  11. }
  12. executing Memory Script


  13. Starting backup at 02-JUL-18
  14. allocated channel: ORA_DISK_1
  15. channel ORA_DISK_1: SID=404 device type=DISK
  16. Finished backup at 02-JUL-18


  17. contents of Memory Script:
  18. {
  19.    backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/netdata/control01.ctl';
  20.    restore clone controlfile to '/u01/app/oracle/fast_recovery_area/netdata/control02.ctl' from
  21.  '/u01/app/oracle/oradata/netdata/control01.ctl';
  22. }
  23. executing Memory Script


  24. Starting backup at 02-JUL-18
  25. using channel ORA_DISK_1
  26. channel ORA_DISK_1: starting datafile copy
  27. copying standby control file
  28. output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_netdata.f tag=TAG20180702T185303 RECID=2 STAMP=980448784
  29. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
  30. Finished backup at 02-JUL-18


  31. Starting restore at 02-JUL-18
  32. using channel ORA_AUX_DISK_1


  33. channel ORA_AUX_DISK_1: copied control file copy
  34. Finished restore at 02-JUL-18


  35. contents of Memory Script:
  36. {
  37.    sql clone 'alter database mount standby database';
  38. }
  39. executing Memory Script


  40. sql statement: alter database mount standby database


  41. contents of Memory Script:
  42. {
  43.    set newname for tempfile 1 to
  44.  "/u01/app/oracle/oradata/netdata/temp01.dbf";
  45.    switch clone tempfile all;
  46.    set newname for datafile 1 to
  47.  "/u01/app/oracle/oradata/netdata/system01.dbf";
  48.    set newname for datafile 2 to
  49.  "/u01/app/oracle/oradata/netdata/sysaux01.dbf";
  50.    set newname for datafile 3 to
  51.  "/u01/app/oracle/oradata/netdata/undotbs01.dbf";
  52.    set newname for datafile 4 to
  53.  "/u01/app/oracle/oradata/netdata/users01.dbf";
  54.    backup as copy reuse
  55.    datafile 1 auxiliary format
  56.  "/u01/app/oracle/oradata/netdata/system01.dbf" datafile
  57.  2 auxiliary format
  58.  "/u01/app/oracle/oradata/netdata/sysaux01.dbf" datafile
  59.  3 auxiliary format
  60.  "/u01/app/oracle/oradata/netdata/undotbs01.dbf" datafile
  61.  4 auxiliary format
  62.  "/u01/app/oracle/oradata/netdata/users01.dbf" ;
  63.    sql 'alter system archive log current';
  64. }
  65. executing Memory Script


  66. executing command: SET NEWNAME


  67. renamed tempfile 1 to /u01/app/oracle/oradata/netdata/temp01.dbf in control file


  68. executing command: SET NEWNAME


  69. executing command: SET NEWNAME


  70. executing command: SET NEWNAME


  71. executing command: SET NEWNAME


  72. Starting backup at 02-JUL-18
  73. using channel ORA_DISK_1
  74. channel ORA_DISK_1: starting datafile copy
  75. input datafile file number=00001 name=/u01/app/oracle/oradata/netdata/system01.dbf
  76. output file name=/u01/app/oracle/oradata/netdata/system01.dbf tag=TAG20180702T185311
  77. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
  78. channel ORA_DISK_1: starting datafile copy
  79. input datafile file number=00002 name=/u01/app/oracle/oradata/netdata/sysaux01.dbf
  80. output file name=/u01/app/oracle/oradata/netdata/sysaux01.dbf tag=TAG20180702T185311
  81. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
  82. channel ORA_DISK_1: starting datafile copy
  83. input datafile file number=00003 name=/u01/app/oracle/oradata/netdata/undotbs01.dbf
  84. output file name=/u01/app/oracle/oradata/netdata/undotbs01.dbf tag=TAG20180702T185311
  85. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
  86. channel ORA_DISK_1: starting datafile copy
  87. input datafile file number=00004 name=/u01/app/oracle/oradata/netdata/users01.dbf
  88. output file name=/u01/app/oracle/oradata/netdata/users01.dbf tag=TAG20180702T185311
  89. channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
  90. Finished backup at 02-JUL-18


  91. sql statement: alter system archive log current


  92. contents of Memory Script:
  93. {
  94.    backup as copy reuse
  95.    archivelog like "/u01/archive/1_9_980442214.dbf" auxiliary format
  96.  "/u01/archive/1_9_980442214.dbf" ;
  97.    catalog clone archivelog "/u01/archive/1_9_980442214.dbf";
  98.    switch clone datafile all;
  99. }
  100. executing Memory Script


  101. Starting backup at 02-JUL-18
  102. using channel ORA_DISK_1
  103. channel ORA_DISK_1: starting archived log copy
  104. input archived log thread=1 sequence=9 RECID=5 STAMP=980448836
  105. output file name=/u01/archive/1_9_980442214.dbf RECID=0 STAMP=0
  106. channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
  107. Finished backup at 02-JUL-18


  108. cataloged archived log
  109. archived log file name=/u01/archive/1_9_980442214.dbf RECID=1 STAMP=980448838


  110. datafile 1 switched to datafile copy
  111. input datafile copy RECID=2 STAMP=980448838 file name=/u01/app/oracle/oradata/netdata/system01.dbf
  112. datafile 2 switched to datafile copy
  113. input datafile copy RECID=3 STAMP=980448838 file name=/u01/app/oracle/oradata/netdata/sysaux01.dbf
  114. datafile 3 switched to datafile copy
  115. input datafile copy RECID=4 STAMP=980448838 file name=/u01/app/oracle/oradata/netdata/undotbs01.dbf
  116. datafile 4 switched to datafile copy
  117. input datafile copy RECID=5 STAMP=980448838 file name=/u01/app/oracle/oradata/netdata/users01.dbf


  118. contents of Memory Script:
  119. {
  120.    set until scn 973806;
  121.    recover
  122.    standby
  123.    clone database
  124.     delete archivelog
  125.    ;
  126. }
  127. executing Memory Script


  128. executing command: SET until clause


  129. Starting recover at 02-JUL-18
  130. using channel ORA_AUX_DISK_1


  131. starting media recovery


  132. archived log for thread 1 with sequence 9 is already on disk as file /u01/archive/1_9_980442214.dbf
  133. archived log file name=/u01/archive/1_9_980442214.dbf thread=1 sequence=9
  134. media recovery complete, elapsed time: 00:00:01
  135. Finished recover at 02-JUL-18
  136. Finished Duplicate Db at 02-JUL-18

  137. RMAN> quit
  138. Recovery Manager complete.



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24486203/viewspace-2157175/,如需轉載,請註明出處,否則將追究法律責任。

相關文章