Bo's Oracle Station

查看: 1328|回复: 0

课程第28次(2017-09-07星期四)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-9-7 20:56:24 | 显示全部楼层 |阅读模式
Screenshot.png

Screenshot-1.png

注意Oracle的controlfile trace脚本的set2有问题,要加上until cancel:
  1. SQL> conn / as sysdba
  2. Connected.
  3. SQL> recover database using BACKUP CONTROLFILE;
  4. ORA-00279: change 1110115 generated at 09/07/2017 19:44:40 needed for thread 1
  5. ORA-00289: suggestion :
  6. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_33.257.954103659
  7. ORA-00280: change 1110115 for thread 1 is in sequence #33


  8. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  9. ORA-00279: change 1110141 generated at 09/07/2017 19:45:05 needed for thread 1
  10. ORA-00289: suggestion :
  11. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_34.275.954100231
  12. ORA-00280: change 1110141 for thread 1 is in sequence #34
  13. ORA-00278: log file
  14. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_33.257.954103659' no longer
  15. needed for this recovery


  16. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  17. ORA-00279: change 1111189 generated at 09/07/2017 19:50:30 needed for thread 1
  18. ORA-00289: suggestion :
  19. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_35.273.954100231
  20. ORA-00280: change 1111189 for thread 1 is in sequence #35
  21. ORA-00278: log file
  22. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_34.275.954100231' no longer
  23. needed for this recovery


  24. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  25. ORA-00279: change 1111206 generated at 09/07/2017 19:50:31 needed for thread 1
  26. ORA-00289: suggestion :
  27. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_36.272.954100233
  28. ORA-00280: change 1111206 for thread 1 is in sequence #36
  29. ORA-00278: log file
  30. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_35.273.954100231' no longer
  31. needed for this recovery


  32. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  33. ORA-00279: change 1111211 generated at 09/07/2017 19:50:32 needed for thread 1
  34. ORA-00289: suggestion :
  35. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_37.271.954100235
  36. ORA-00280: change 1111211 for thread 1 is in sequence #37
  37. ORA-00278: log file
  38. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_36.272.954100233' no longer
  39. needed for this recovery


  40. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  41. ORA-00279: change 1111214 generated at 09/07/2017 19:50:34 needed for thread 1
  42. ORA-00289: suggestion :
  43. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237
  44. ORA-00280: change 1111214 for thread 1 is in sequence #38
  45. ORA-00278: log file
  46. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_37.271.954100235' no longer
  47. needed for this recovery


  48. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  49. ORA-00279: change 1111220 generated at 09/07/2017 19:50:35 needed for thread 1
  50. ORA-00289: suggestion :
  51. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237
  52. ORA-00280: change 1111220 for thread 1 is in sequence #39
  53. ORA-00278: log file
  54. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237' no longer
  55. needed for this recovery


  56. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  57. ORA-00279: change 1111226 generated at 09/07/2017 20:10:31 needed for thread 1
  58. ORA-00289: suggestion :
  59. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_1.261.954102861
  60. ORA-00280: change 1111226 for thread 1 is in sequence #1
  61. ORA-00278: log file
  62. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237' no longer
  63. needed for this recovery


  64. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}


  65. ORA-00279: change 1114750 generated at 09/07/2017 20:34:20 needed for thread 1
  66. ORA-00289: suggestion :
  67. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_2.262.954102861
  68. ORA-00280: change 1114750 for thread 1 is in sequence #2
  69. ORA-00278: log file
  70. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_1.261.954102861' no longer needed
  71. for this recovery


  72. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  73. ORA-00279: change 1114767 generated at 09/07/2017 20:34:21 needed for thread 1
  74. ORA-00289: suggestion :
  75. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_3.276.954102863
  76. ORA-00280: change 1114767 for thread 1 is in sequence #3
  77. ORA-00278: log file
  78. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_2.262.954102861' no longer needed
  79. for this recovery


  80. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  81. ORA-00279: change 1114772 generated at 09/07/2017 20:34:21 needed for thread 1
  82. ORA-00289: suggestion :
  83. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_4.277.954102865
  84. ORA-00280: change 1114772 for thread 1 is in sequence #4
  85. ORA-00278: log file
  86. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_3.276.954102863' no longer needed
  87. for this recovery


  88. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  89. ORA-00279: change 1114775 generated at 09/07/2017 20:34:23 needed for thread 1
  90. ORA-00289: suggestion :
  91. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_5.278.954102865
  92. ORA-00280: change 1114775 for thread 1 is in sequence #5
  93. ORA-00278: log file
  94. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_4.277.954102865' no longer needed
  95. for this recovery


  96. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  97. ORA-00279: change 1114781 generated at 09/07/2017 20:34:24 needed for thread 1
  98. ORA-00289: suggestion :
  99. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_6.279.954102867
  100. ORA-00280: change 1114781 for thread 1 is in sequence #6
  101. ORA-00278: log file
  102. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_5.278.954102865' no longer needed
  103. for this recovery


  104. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  105. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  106. ORA-00289: suggestion : +FRA
  107. ORA-00280: change 1114792 for thread 1 is in sequence #7
  108. ORA-00278: log file
  109. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_6.279.954102867' no longer needed
  110. for this recovery


  111. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  112. ORA-00308: cannot open archived log '+FRA'
  113. ORA-17503: ksfdopn:2 Failed to open file +FRA
  114. ORA-15045: ASM file name '+FRA' is not in reference form


  115. SQL> recover database using BACKUP CONTROLFILE;
  116. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  117. ORA-00289: suggestion : +FRA
  118. ORA-00280: change 1114792 for thread 1 is in sequence #7


  119. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  120. cancel
  121. Media recovery cancelled.
  122. SQL> alter database open ;
  123. alter database open
  124. *
  125. ERROR at line 1:
  126. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


  127. SQL> alter database open  resetlogs;
  128. alter database open  resetlogs
  129. *
  130. ERROR at line 1:
  131. ORA-01113: file 1 needs media recovery
  132. ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.816169553'


  133. SQL> recover database until cancel using BACKUP CONTROLFILE;
  134. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  135. ORA-00289: suggestion : +FRA
  136. ORA-00280: change 1114792 for thread 1 is in sequence #7


  137. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  138. cancel
  139. Media recovery cancelled.
  140. SQL> alter database open resetlogs;

  141. Database altered.

  142. SQL>

复制代码
Screenshot.png

  1. [oracle@station90 ~]$ vim control10d-after.sql
  2. [oracle@station90 ~]$ sqlplus /nolog

  3. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 19:28:08 2017

  4. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  5. SQL> conn / as sysdba
  6. Connected to an idle instance.
  7. SQL> startup
  8. ORACLE instance started.

  9. Total System Global Area 6680915968 bytes
  10. Fixed Size                    2213936 bytes
  11. Variable Size                 3556771792 bytes
  12. Database Buffers         3087007744 bytes
  13. Redo Buffers                   34922496 bytes
  14. ORA-00205: error in identifying control file, check alert log for more info


  15. SQL> @control10d-after.sql

  16. Control file created.


  17. PL/SQL procedure successfully completed.


  18. PL/SQL procedure successfully completed.


  19. PL/SQL procedure successfully completed.


  20. PL/SQL procedure successfully completed.


  21. PL/SQL procedure successfully completed.


  22. PL/SQL procedure successfully completed.


  23. PL/SQL procedure successfully completed.


  24. PL/SQL procedure successfully completed.

  25. SQL> alter database open ;
  26. alter database open
  27. *
  28. ERROR at line 1:
  29. ORA-01113: file 1 needs media recovery
  30. ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.816169553'


  31. SQL> recover database;
  32. Media recovery complete.
  33. SQL> alter database open ;

  34. Database altered.

  35. SQL> select  name fromv$tempfile;
  36. select        name fromv$tempfile
  37.                           *
  38. ERROR at line 1:
  39. ORA-00923: FROM keyword not found where expected


  40. SQL> select  name from v$tempfile;

  41. no rows selected

  42. SQL> select  file_name from dba_temp_files;

  43. no rows selected

  44. SQL> alter tablespace temp add tempfile '+Data' size 30M autoextend on ;

  45. Tablespace altered.

  46. SQL> exit
  47. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  48. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  49. [oracle@station90 ~]$ rman target /

  50. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 19:40:33 2017

  51. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  52. connected to target database: ORCL (DBID=1343950367)

  53. RMAN> exit


  54. Recovery Manager complete.
  55. [oracle@station90 ~]$ rman target /  catalog u90/oracle_4U@rcat

  56. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 19:41:06 2017

  57. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  58. connected to target database: ORCL (DBID=1343950367)
  59. connected to recovery catalog database

  60. RMAN> backup tag 'NEWBACKUP' incremental level 0  database plus archivelog delete all input;

  61. starting full resync of recovery catalog
  62. full resync complete

  63. Starting backup at 07-SEP-17
  64. current log archived
  65. allocated channel: ORA_SBT_TAPE_1
  66. channel ORA_SBT_TAPE_1: SID=9 device type=SBT_TAPE
  67. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  68. allocated channel: ORA_SBT_TAPE_2
  69. channel ORA_SBT_TAPE_2: SID=71 device type=SBT_TAPE
  70. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  71. channel ORA_SBT_TAPE_1: starting archived log backup set
  72. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  73. input archived log thread=1 sequence=20 RECID=5 STAMP=954099825
  74. input archived log thread=1 sequence=21 RECID=6 STAMP=954099826
  75. input archived log thread=1 sequence=22 RECID=7 STAMP=954099826
  76. channel ORA_SBT_TAPE_1: starting piece 1 at 07-SEP-17
  77. channel ORA_SBT_TAPE_2: starting archived log backup set
  78. channel ORA_SBT_TAPE_2: specifying archived log(s) in backup set
  79. input archived log thread=1 sequence=23 RECID=8 STAMP=954099826
  80. input archived log thread=1 sequence=24 RECID=9 STAMP=954099826
  81. input archived log thread=1 sequence=29 RECID=1 STAMP=954098976
  82. input archived log thread=1 sequence=30 RECID=2 STAMP=954098976
  83. input archived log thread=1 sequence=31 RECID=3 STAMP=954098977
  84. channel ORA_SBT_TAPE_2: starting piece 1 at 07-SEP-17
  85. channel ORA_SBT_TAPE_1: finished piece 1 at 07-SEP-17
  86. piece handle=02sdsq3i_1_1 tag=NEWBACKUP comment=API Version 2.0,MMS Version 10.4.0.4
  87. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  88. channel ORA_SBT_TAPE_1: deleting archived log(s)
  89. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_20.262.954073551 RECID=5 STAMP=954099825
  90. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_21.261.954073587 RECID=6 STAMP=954099826
  91. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_22.263.954079971 RECID=7 STAMP=954099826
  92. channel ORA_SBT_TAPE_1: starting archived log backup set
  93. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  94. input archived log thread=1 sequence=32 RECID=4 STAMP=954099812
  95. channel ORA_SBT_TAPE_1: starting piece 1 at 07-SEP-17
  96. channel ORA_SBT_TAPE_2: finished piece 1 at 07-SEP-17
  97. piece handle=03sdsq3i_1_1 tag=NEWBACKUP comment=API Version 2.0,MMS Version 10.4.0.4
  98. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:26
  99. channel ORA_SBT_TAPE_2: deleting archived log(s)
  100. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_23.264.954088595 RECID=8 STAMP=954099826
  101. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_24.265.954097927 RECID=9 STAMP=954099826
  102. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_29.271.954098977 RECID=1 STAMP=954098976
  103. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_30.272.954098977 RECID=2 STAMP=954098976
  104. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_31.273.954098977 RECID=3 STAMP=954098977
  105. channel ORA_SBT_TAPE_1: finished piece 1 at 07-SEP-17
  106. piece handle=04sdsq4b_1_1 tag=NEWBACKUP comment=API Version 2.0,MMS Version 10.4.0.4
  107. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  108. channel ORA_SBT_TAPE_1: deleting archived log(s)
  109. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_32.275.954099813 RECID=4 STAMP=954099812
  110. Finished backup at 07-SEP-17

  111. Starting backup at 07-SEP-17
  112. using channel ORA_SBT_TAPE_1
  113. using channel ORA_SBT_TAPE_2
  114. channel ORA_SBT_TAPE_1: starting incremental level 0 datafile backup set
  115. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  116. input datafile file number=00001 name=+DATA/orcl/datafile/system.256.816169553
  117. input datafile file number=00005 name=+DATA/orcl/datafile/example.265.816169651
  118. channel ORA_SBT_TAPE_1: starting piece 1 at 07-SEP-17
  119. channel ORA_SBT_TAPE_2: starting incremental level 0 datafile backup set
  120. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  121. input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.816169553
  122. input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.816169553
  123. input datafile file number=00004 name=+DATA/orcl/datafile/users.259.816169553
  124. channel ORA_SBT_TAPE_2: starting piece 1 at 07-SEP-17
  125. channel ORA_SBT_TAPE_1: finished piece 1 at 07-SEP-17
  126. piece handle=05sdsq57_1_1 tag=NEWBACKUP comment=API Version 2.0,MMS Version 10.4.0.4
  127. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  128. channel ORA_SBT_TAPE_2: finished piece 1 at 07-SEP-17
  129. piece handle=06sdsq58_1_1 tag=NEWBACKUP comment=API Version 2.0,MMS Version 10.4.0.4
  130. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:25
  131. Finished backup at 07-SEP-17

  132. Starting backup at 07-SEP-17
  133. current log archived
  134. using channel ORA_SBT_TAPE_1
  135. using channel ORA_SBT_TAPE_2
  136. channel ORA_SBT_TAPE_1: starting archived log backup set
  137. channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set
  138. input archived log thread=1 sequence=33 RECID=10 STAMP=954099905
  139. channel ORA_SBT_TAPE_1: starting piece 1 at 07-SEP-17
  140. channel ORA_SBT_TAPE_1: finished piece 1 at 07-SEP-17
  141. piece handle=07sdsq63_1_1 tag=NEWBACKUP comment=API Version 2.0,MMS Version 10.4.0.4
  142. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:25
  143. channel ORA_SBT_TAPE_1: deleting archived log(s)
  144. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_33.275.954099905 RECID=10 STAMP=954099905
  145. Finished backup at 07-SEP-17

  146. Starting Control File and SPFILE Autobackup at 07-SEP-17
  147. piece handle=c-1343950367-20170907-01 comment=API Version 2.0,MMS Version 10.4.0.4
  148. Finished Control File and SPFILE Autobackup at 07-SEP-17

  149. RMAN> exit

  150. RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
  151. RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
  152. ORACLE error from target database:
  153. ORA-03135: connection lost contact
  154. Process ID: 21348
  155. Session ID: 75 Serial number: 308


  156. Recovery Manager complete.
  157. [oracle@station90 ~]$ rman target /

  158. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 19:55:51 2017

  159. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  160. connected to target database (not started)

  161. RMAN> startup

  162. Oracle instance started
  163. RMAN-00571: ===========================================================
  164. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  165. RMAN-00571: ===========================================================
  166. RMAN-03002: failure of startup command at 09/07/2017 19:55:58
  167. ORA-00205: error in identifying control file, check alert log for more info

  168. RMAN> list backup of controlfile;

  169. using target database control file instead of recovery catalog
  170. RMAN-00571: ===========================================================
  171. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  172. RMAN-00571: ===========================================================
  173. RMAN-03002: failure of list command at 09/07/2017 19:56:23
  174. ORA-01507: database not mounted

  175. RMAN> exit


  176. Recovery Manager complete.
  177. [oracle@station90 ~]$ rman target / catalog u90/oracle_4U@rcat

  178. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 19:56:49 2017

  179. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  180. connected to target database: ORCL (not mounted)
  181. connected to recovery catalog database

  182. RMAN> list backup of controlfile;


  183. List of Backup Sets
  184. ===================


  185. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  186. ------- ---- -- ---------- ----------- ------------ ---------------
  187. 195     Full    9.67M      DISK        00:00:00     07-SEP-17      
  188.         BP Key: 196   Status: AVAILABLE  Compressed: NO  Tag: TAG20170907T193823
  189.         Piece Name: +FRA/orcl/autobackup/2017_09_07/s_954099503.274.954099503
  190.   Control File Included: Ckp SCN: 1109658      Ckp time: 07-SEP-17

  191. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  192. ------- ---- -- ---------- ----------- ------------ ---------------
  193. 254     Full    9.75M      SBT_TAPE    00:00:16     07-SEP-17      
  194.         BP Key: 256   Status: AVAILABLE  Compressed: NO  Tag: TAG20170907T194534
  195.         Handle: c-1343950367-20170907-01   Media: station90-000003
  196.   Control File Included: Ckp SCN: 1110190      Ckp time: 07-SEP-17

  197. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  198. ------- ---- -- ---------- ----------- ------------ ---------------
  199. 287     Full    9.75M      SBT_TAPE    00:00:16     07-SEP-17      
  200.         BP Key: 291   Status: AVAILABLE  Compressed: NO  Tag: LABS-11A-CONTROLFILE
  201.         Handle: 09sdsqgp_1_1   Media: station90-000001
  202.   Control File Included: Ckp SCN: 1111253      Ckp time: 07-SEP-17

  203. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  204. ------- ---- -- ---------- ----------- ------------ ---------------
  205. 288     Full    9.75M      SBT_TAPE    00:00:15     07-SEP-17      
  206.         BP Key: 292   Status: AVAILABLE  Compressed: NO  Tag: TAG20170907T195115
  207.         Handle: c-1343950367-20170907-02   Media: station90-000001
  208.   Control File Included: Ckp SCN: 1111296      Ckp time: 07-SEP-17

  209. RMAN> restore controlfile from tag 'LABS-11A-CONTROLFILE';

  210. Starting restore at 07-SEP-17
  211. allocated channel: ORA_DISK_1
  212. channel ORA_DISK_1: SID=68 device type=DISK
  213. allocated channel: ORA_DISK_2
  214. channel ORA_DISK_2: SID=131 device type=DISK
  215. allocated channel: ORA_DISK_3
  216. channel ORA_DISK_3: SID=192 device type=DISK
  217. allocated channel: ORA_DISK_4
  218. channel ORA_DISK_4: SID=8 device type=DISK
  219. allocated channel: ORA_DISK_5
  220. channel ORA_DISK_5: SID=69 device type=DISK
  221. allocated channel: ORA_DISK_6
  222. channel ORA_DISK_6: SID=132 device type=DISK
  223. allocated channel: ORA_DISK_7
  224. channel ORA_DISK_7: SID=193 device type=DISK
  225. allocated channel: ORA_DISK_8
  226. channel ORA_DISK_8: SID=9 device type=DISK
  227. allocated channel: ORA_SBT_TAPE_1
  228. channel ORA_SBT_TAPE_1: SID=70 device type=SBT_TAPE
  229. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  230. allocated channel: ORA_SBT_TAPE_2
  231. channel ORA_SBT_TAPE_2: SID=194 device type=SBT_TAPE
  232. channel ORA_SBT_TAPE_2: Oracle Secure Backup

  233. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  234. channel ORA_SBT_TAPE_1: restoring control file
  235. channel ORA_SBT_TAPE_1: reading from backup piece 09sdsqgp_1_1
  236. channel ORA_SBT_TAPE_1: piece handle=09sdsqgp_1_1 tag=LABS-11A-CONTROLFILE
  237. channel ORA_SBT_TAPE_1: restored backup piece 1
  238. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:35
  239. output file name=+DATA/orcl/controlfile/current.263.954100675
  240. output file name=+FRA/orcl/controlfile/current.259.954100681
  241. Finished restore at 07-SEP-17

  242. RMAN> alter database mount;

  243. database mounted
  244. released channel: ORA_DISK_1
  245. released channel: ORA_DISK_2
  246. released channel: ORA_DISK_3
  247. released channel: ORA_DISK_4
  248. released channel: ORA_DISK_5
  249. released channel: ORA_DISK_6
  250. released channel: ORA_DISK_7
  251. released channel: ORA_DISK_8
  252. released channel: ORA_SBT_TAPE_1
  253. released channel: ORA_SBT_TAPE_2

  254. RMAN> recover database ;

  255. Starting recover at 07-SEP-17
  256. Starting implicit crosscheck backup at 07-SEP-17
  257. allocated channel: ORA_DISK_1
  258. channel ORA_DISK_1: SID=130 device type=DISK
  259. allocated channel: ORA_DISK_2
  260. channel ORA_DISK_2: SID=70 device type=DISK
  261. allocated channel: ORA_DISK_3
  262. channel ORA_DISK_3: SID=133 device type=DISK
  263. allocated channel: ORA_DISK_4
  264. channel ORA_DISK_4: SID=194 device type=DISK
  265. allocated channel: ORA_DISK_5
  266. channel ORA_DISK_5: SID=10 device type=DISK
  267. allocated channel: ORA_DISK_6
  268. channel ORA_DISK_6: SID=69 device type=DISK
  269. allocated channel: ORA_DISK_7
  270. channel ORA_DISK_7: SID=132 device type=DISK
  271. allocated channel: ORA_DISK_8
  272. channel ORA_DISK_8: SID=193 device type=DISK
  273. Crosschecked 1 objects
  274. Finished implicit crosscheck backup at 07-SEP-17

  275. Starting implicit crosscheck copy at 07-SEP-17
  276. using channel ORA_DISK_1
  277. using channel ORA_DISK_2
  278. using channel ORA_DISK_3
  279. using channel ORA_DISK_4
  280. using channel ORA_DISK_5
  281. using channel ORA_DISK_6
  282. using channel ORA_DISK_7
  283. using channel ORA_DISK_8
  284. Finished implicit crosscheck copy at 07-SEP-17

  285. searching for all files in the recovery area
  286. cataloging files...
  287. cataloging done

  288. List of Cataloged Files
  289. =======================
  290. File Name: +fra/ORCL/ARCHIVELOG/2017_09_07/thread_1_seq_25.266.954098709
  291. File Name: +fra/ORCL/ARCHIVELOG/2017_09_07/thread_1_seq_26.267.954098709
  292. File Name: +fra/ORCL/ARCHIVELOG/2017_09_07/thread_1_seq_27.268.954098711
  293. File Name: +fra/ORCL/ARCHIVELOG/2017_09_07/thread_1_seq_28.269.954098711
  294. File Name: +fra/ORCL/ARCHIVELOG/2017_09_07/thread_1_seq_29.270.954098713

  295. using channel ORA_DISK_1
  296. using channel ORA_DISK_2
  297. using channel ORA_DISK_3
  298. using channel ORA_DISK_4
  299. using channel ORA_DISK_5
  300. using channel ORA_DISK_6
  301. using channel ORA_DISK_7
  302. using channel ORA_DISK_8
  303. allocated channel: ORA_SBT_TAPE_1
  304. channel ORA_SBT_TAPE_1: SID=131 device type=SBT_TAPE
  305. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  306. allocated channel: ORA_SBT_TAPE_2
  307. channel ORA_SBT_TAPE_2: SID=8 device type=SBT_TAPE
  308. channel ORA_SBT_TAPE_2: Oracle Secure Backup

  309. starting media recovery

  310. archived log for thread 1 with sequence 38 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237
  311. archived log for thread 1 with sequence 39 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237
  312. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237 thread=1 sequence=38
  313. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237 thread=1 sequence=39
  314. unable to find archived log
  315. archived log thread=1 sequence=40
  316. RMAN-00571: ===========================================================
  317. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  318. RMAN-00571: ===========================================================
  319. RMAN-03002: failure of recover command at 09/07/2017 20:05:00
  320. RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 40 and starting SCN of 1111225

  321. RMAN> run {
  322. 2> set until sequence 40 thread 1;
  323. 3> restore database;
  324. 4> recover database;
  325. 5> }

  326. executing command: SET until clause

  327. Starting restore at 07-SEP-17
  328. using channel ORA_DISK_1
  329. using channel ORA_DISK_2
  330. using channel ORA_DISK_3
  331. using channel ORA_DISK_4
  332. using channel ORA_DISK_5
  333. using channel ORA_DISK_6
  334. using channel ORA_DISK_7
  335. using channel ORA_DISK_8
  336. using channel ORA_SBT_TAPE_1
  337. using channel ORA_SBT_TAPE_2

  338. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  339. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  340. channel ORA_SBT_TAPE_1: restoring datafile 00001 to +DATA/orcl/datafile/system.256.816169553
  341. channel ORA_SBT_TAPE_1: restoring datafile 00005 to +DATA/orcl/datafile/example.265.816169651
  342. channel ORA_SBT_TAPE_1: reading from backup piece 05sdsq57_1_1
  343. channel ORA_SBT_TAPE_2: starting datafile backup set restore
  344. channel ORA_SBT_TAPE_2: specifying datafile(s) to restore from backup set
  345. channel ORA_SBT_TAPE_2: restoring datafile 00002 to +DATA/orcl/datafile/sysaux.257.816169553
  346. channel ORA_SBT_TAPE_2: restoring datafile 00003 to +DATA/orcl/datafile/undotbs1.258.816169553
  347. channel ORA_SBT_TAPE_2: restoring datafile 00004 to +DATA/orcl/datafile/users.259.816169553
  348. channel ORA_SBT_TAPE_2: reading from backup piece 06sdsq58_1_1
  349. channel ORA_SBT_TAPE_1: piece handle=05sdsq57_1_1 tag=NEWBACKUP
  350. channel ORA_SBT_TAPE_1: restored backup piece 1
  351. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:45
  352. channel ORA_SBT_TAPE_2: piece handle=06sdsq58_1_1 tag=NEWBACKUP
  353. channel ORA_SBT_TAPE_2: restored backup piece 1
  354. channel ORA_SBT_TAPE_2: restore complete, elapsed time: 00:00:45
  355. Finished restore at 07-SEP-17

  356. Starting recover at 07-SEP-17
  357. using channel ORA_DISK_1
  358. using channel ORA_DISK_2
  359. using channel ORA_DISK_3
  360. using channel ORA_DISK_4
  361. using channel ORA_DISK_5
  362. using channel ORA_DISK_6
  363. using channel ORA_DISK_7
  364. using channel ORA_DISK_8
  365. using channel ORA_SBT_TAPE_1
  366. using channel ORA_SBT_TAPE_2

  367. starting media recovery
  368. media recovery failed
  369. RMAN-00571: ===========================================================
  370. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  371. RMAN-00571: ===========================================================
  372. RMAN-03002: failure of recover command at 09/07/2017 20:06:24
  373. RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
  374. start until cancel using backup controlfile
  375. ORA-00275: media recovery has already been started

  376. RMAN> run {
  377. 2> set until sequence 40 thread 1;
  378. 3>  recover database;
  379. 4> }

  380. executing command: SET until clause

  381. Starting recover at 07-SEP-17
  382. using channel ORA_DISK_1
  383. using channel ORA_DISK_2
  384. using channel ORA_DISK_3
  385. using channel ORA_DISK_4
  386. using channel ORA_DISK_5
  387. using channel ORA_DISK_6
  388. using channel ORA_DISK_7
  389. using channel ORA_DISK_8
  390. using channel ORA_SBT_TAPE_1
  391. using channel ORA_SBT_TAPE_2

  392. starting media recovery
  393. media recovery failed
  394. RMAN-00571: ===========================================================
  395. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  396. RMAN-00571: ===========================================================
  397. RMAN-03002: failure of recover command at 09/07/2017 20:07:05
  398. RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
  399. start until cancel using backup controlfile
  400. ORA-00275: media recovery has already been started

  401. RMAN> exit


  402. Recovery Manager complete.

  403. [oracle@station90 ~]$ sqlplus /nolog

  404. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 20:07:26 2017

  405. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  406. SQL> conn / as sysdba
  407. Connected.
  408. SQL> recover database until cancel ;
  409. ORA-00283: recovery session canceled due to errors
  410. ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


  411. SQL> recover database until cancel   using BACKUP CONTROLFILE ;
  412. ORA-00279: change 1110115 generated at 09/07/2017 19:44:40 needed for thread 1
  413. ORA-00289: suggestion : +FRA
  414. ORA-00280: change 1110115 for thread 1 is in sequence #33


  415. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  416. ORA-00308: cannot open archived log '+FRA'
  417. ORA-17503: ksfdopn:2 Failed to open file +FRA
  418. ORA-15045: ASM file name '+FRA' is not in reference form


  419. SQL> exit
  420. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  421. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  422. and Real Application Testing options
  423. [oracle@station90 ~]$ crs_stat -t
  424. Name           Type           Target    State     Host        
  425. ------------------------------------------------------------
  426. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station90   
  427. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station90   
  428. ora....ER.lsnr ora....er.type ONLINE    ONLINE    station90   
  429. ora.asm        ora.asm.type   ONLINE    ONLINE    station90   
  430. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station90   
  431. ora.diskmon    ora....on.type ONLINE    ONLINE    station90   
  432. ora.orcl.db    ora....se.type ONLINE    ONLINE    station90   
  433. [oracle@station90 ~]$ sqlplus /nolog

  434. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 20:08:09 2017

  435. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  436. SQL> conn / as sysdba
  437. Connected.
  438. SQL> recover database until cancel   using BACKUP CONTROLFILE ;
  439. ORA-00279: change 1110115 generated at 09/07/2017 19:44:40 needed for thread 1
  440. ORA-00289: suggestion : +FRA
  441. ORA-00280: change 1110115 for thread 1 is in sequence #33


  442. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  443. quit

  444. SQL> exit
  445. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  446. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  447. and Real Application Testing options
  448. [oracle@station90 ~]$ rman target / catalog u90/oracle_4U@rcat

  449. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 20:08:57 2017

  450. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  451. connected to target database: ORCL (DBID=1343950367, not open)
  452. connected to recovery catalog database

  453. RMAN> run {
  454. 2> set until sequence 40 thread 1;
  455. 3> restore database;
  456. 4> }

  457. executing command: SET until clause

  458. Starting restore at 07-SEP-17
  459. allocated channel: ORA_DISK_1
  460. channel ORA_DISK_1: SID=8 device type=DISK
  461. allocated channel: ORA_DISK_2
  462. channel ORA_DISK_2: SID=71 device type=DISK
  463. allocated channel: ORA_DISK_3
  464. channel ORA_DISK_3: SID=133 device type=DISK
  465. allocated channel: ORA_DISK_4
  466. channel ORA_DISK_4: SID=194 device type=DISK
  467. allocated channel: ORA_DISK_5
  468. channel ORA_DISK_5: SID=10 device type=DISK
  469. allocated channel: ORA_DISK_6
  470. channel ORA_DISK_6: SID=70 device type=DISK
  471. allocated channel: ORA_DISK_7
  472. channel ORA_DISK_7: SID=130 device type=DISK
  473. allocated channel: ORA_DISK_8
  474. channel ORA_DISK_8: SID=193 device type=DISK
  475. allocated channel: ORA_SBT_TAPE_1
  476. channel ORA_SBT_TAPE_1: SID=132 device type=SBT_TAPE
  477. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  478. allocated channel: ORA_SBT_TAPE_2
  479. channel ORA_SBT_TAPE_2: SID=7 device type=SBT_TAPE
  480. channel ORA_SBT_TAPE_2: Oracle Secure Backup

  481. skipping datafile 1; already restored to file +DATA/orcl/datafile/system.256.816169553
  482. skipping datafile 5; already restored to file +DATA/orcl/datafile/example.265.816169651
  483. skipping datafile 2; already restored to file +DATA/orcl/datafile/sysaux.257.816169553
  484. skipping datafile 3; already restored to file +DATA/orcl/datafile/undotbs1.258.816169553
  485. skipping datafile 4; already restored to file +DATA/orcl/datafile/users.259.816169553
  486. Finished restore at 07-SEP-17

  487. RMAN> run {
  488. 2> set until sequence 40 thread 1;
  489. 3>  recover database;
  490. 4> }

  491. executing command: SET until clause

  492. Starting recover at 07-SEP-17
  493. using channel ORA_DISK_1
  494. using channel ORA_DISK_2
  495. using channel ORA_DISK_3
  496. using channel ORA_DISK_4
  497. using channel ORA_DISK_5
  498. using channel ORA_DISK_6
  499. using channel ORA_DISK_7
  500. using channel ORA_DISK_8
  501. using channel ORA_SBT_TAPE_1
  502. using channel ORA_SBT_TAPE_2

  503. starting media recovery

  504. archived log for thread 1 with sequence 34 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_34.275.954100231
  505. archived log for thread 1 with sequence 35 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_35.273.954100231
  506. archived log for thread 1 with sequence 36 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_36.272.954100233
  507. archived log for thread 1 with sequence 37 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_37.271.954100235
  508. archived log for thread 1 with sequence 38 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237
  509. archived log for thread 1 with sequence 39 is already on disk as file +FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237
  510. channel ORA_SBT_TAPE_1: starting archived log restore to default destination
  511. channel ORA_SBT_TAPE_1: restoring archived log
  512. archived log thread=1 sequence=33
  513. channel ORA_SBT_TAPE_1: reading from backup piece 07sdsq63_1_1
  514. channel ORA_SBT_TAPE_1: piece handle=07sdsq63_1_1 tag=NEWBACKUP
  515. channel ORA_SBT_TAPE_1: restored backup piece 1
  516. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
  517. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_33.258.954101405 thread=1 sequence=33
  518. channel default: deleting archived log(s)
  519. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_33.258.954101405 RECID=22 STAMP=954101405
  520. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_34.275.954100231 thread=1 sequence=34
  521. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_35.273.954100231 thread=1 sequence=35
  522. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_36.272.954100233 thread=1 sequence=36
  523. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_37.271.954100235 thread=1 sequence=37
  524. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237 thread=1 sequence=38
  525. archived log file name=+FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237 thread=1 sequence=39
  526. media recovery complete, elapsed time: 00:00:02
  527. Finished recover at 07-SEP-17

  528. RMAN> alter database open resetlog;s

  529. RMAN-00571: ===========================================================
  530. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  531. RMAN-00571: ===========================================================
  532. RMAN-00558: error encountered while parsing input commands
  533. RMAN-01009: syntax error: found "identifier": expecting one of: "resetlogs, ;"
  534. RMAN-01008: the bad identifier was: resetlog
  535. RMAN-01007: at line 1 column 21 file: standard input

  536. RMAN> alter database open resetlog;

  537. RMAN-00571: ===========================================================
  538. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  539. RMAN-00571: ===========================================================
  540. RMAN-00558: error encountered while parsing input commands
  541. RMAN-01009: syntax error: found "identifier": expecting one of: "resetlogs, ;"
  542. RMAN-01008: the bad identifier was: resetlog
  543. RMAN-01007: at line 1 column 21 file: standard input

  544. RMAN> alter database open resetlogs;

  545. database opened
  546. new incarnation of database registered in recovery catalog
  547. starting full resync of recovery catalog
  548. full resync complete

  549. RMAN> exit

  550. RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
  551. RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
  552. ORACLE error from target database:
  553. ORA-03135: connection lost contact
  554. Process ID: 630
  555. Session ID: 131 Serial number: 42


  556. Recovery Manager complete.
  557. [oracle@station90 ~]$ cd /u01/app/oracle/diag/
  558. [oracle@station90 diag]$ ls
  559. asm  rdbms  tnslsnr
  560. [oracle@station90 diag]$ cd rdbms/
  561. [oracle@station90 rdbms]$ ls
  562. orcl  rcat
  563. [oracle@station90 rdbms]$ cd orcl/
  564. [oracle@station90 orcl]$ ls
  565. i_1.mif  orcl
  566. [oracle@station90 orcl]$ cd orcl/
  567. [oracle@station90 orcl]$ ls
  568. alert  cdump  hm  incident  incpkg  ir  lck  metadata  stage  sweep  trace
  569. [oracle@station90 orcl]$ cd trace/
  570. [oracle@station90 trace]$ ls
  571. alert_orcl.log       orcl_dbrm_9303.trm   orcl_mark_17470.trm  orcl_ora_17059.trm  orcl_ora_29771.trm   orcl_pr00_31636.trm
  572. orcl_arc0_1159.trc   orcl_dbw0_16967.trc  orcl_mark_29631.trc  orcl_ora_17106.trc  orcl_ora_30163.trc   orcl_pr00_32335.trc
  573. orcl_arc0_1159.trm   orcl_dbw0_16967.trm  orcl_mark_29631.trm  orcl_ora_17106.trm  orcl_ora_30163.trm   orcl_pr00_32335.trm
  574. orcl_arc0_17773.trc  orcl_dbw0_17186.trc  orcl_mark_3310.trc   orcl_ora_17113.trc  orcl_ora_32301.trc   orcl_pr00_32375.trc
  575. orcl_arc0_17773.trm  orcl_dbw0_17186.trm  orcl_mark_3310.trm   orcl_ora_17113.trm  orcl_ora_32301.trm   orcl_pr00_32375.trm
  576. orcl_arc0_9392.trc   orcl_dbw0_17446.trc  orcl_mark_6222.trc   orcl_ora_17117.trc  orcl_ora_3235.trc    orcl_pr00_32459.trc
  577. orcl_arc0_9392.trm   orcl_dbw0_17446.trm  orcl_mark_6222.trm   orcl_ora_17117.trm  orcl_ora_3235.trm    orcl_pr00_32459.trm
  578. orcl_arc1_9401.trc   orcl_dbw0_3288.trc   orcl_mark_9333.trc   orcl_ora_17128.trc  orcl_ora_32393.trc   orcl_pr00_772.trc
  579. orcl_arc1_9401.trm   orcl_dbw0_3288.trm   orcl_mark_9333.trm   orcl_ora_17128.trm  orcl_ora_32393.trm   orcl_pr00_772.trm
  580. orcl_arc2_1165.trc   orcl_dbw0_6200.trc   orcl_mman_16716.trc  orcl_ora_17134.trc  orcl_ora_32445.trc   orcl_pr01_17753.trc
  581. orcl_arc2_1165.trm   orcl_dbw0_6200.trm   orcl_mman_16716.trm  orcl_ora_17134.trm  orcl_ora_32445.trm   orcl_pr01_17753.trm
  582. orcl_arc2_17777.trc  orcl_j000_10078.trc  orcl_mman_16837.trc  orcl_ora_17135.trc  orcl_ora_3318.trc    orcl_pr01_31638.trc
  583. orcl_arc2_17777.trm  orcl_j000_10078.trm  orcl_mman_16837.trm  orcl_ora_17135.trm  orcl_ora_3318.trm    orcl_pr01_31638.trm
  584. orcl_arc3_1167.trc   orcl_j000_11045.trc  orcl_mman_16965.trc  orcl_ora_17144.trc  orcl_ora_5016.trc    orcl_pr01_32377.trc
  585. orcl_arc3_1167.trm   orcl_j000_11045.trm  orcl_mman_16965.trm  orcl_ora_17144.trm  orcl_ora_5016.trm    orcl_pr01_32377.trm
  586. orcl_arc3_17779.trc  orcl_j000_17643.trc  orcl_mman_17184.trc  orcl_ora_17216.trc  orcl_ora_5020.trc    orcl_pr01_32461.trc
  587. orcl_arc3_17779.trm  orcl_j000_17643.trm  orcl_mman_17184.trm  orcl_ora_17216.trm  orcl_ora_5020.trm    orcl_pr01_32461.trm
  588. orcl_arc3_9405.trc   orcl_j000_17816.trc  orcl_mman_17409.trc  orcl_ora_17262.trc  orcl_ora_5022.trc    orcl_pr01_774.trc
  589. orcl_arc3_9405.trm   orcl_j000_17816.trm  orcl_mman_17409.trm  orcl_ora_17262.trm  orcl_ora_5022.trm    orcl_pr01_774.trm
  590. orcl_asmb_16780.trc  orcl_j000_18834.trc  orcl_mman_17444.trc  orcl_ora_17360.trc  orcl_ora_5024.trc    orcl_pr02_17755.trc
  591. orcl_asmb_16780.trm  orcl_j000_18834.trm  orcl_mman_17444.trm  orcl_ora_17360.trm  orcl_ora_5024.trm    orcl_pr02_17755.trm
  592. orcl_asmb_16879.trc  orcl_j000_26330.trc  orcl_mman_29607.trc  orcl_ora_17365.trc  orcl_ora_5235.trc    orcl_pr02_31640.trc
  593. orcl_asmb_16879.trm  orcl_j000_26330.trm  orcl_mman_29607.trm  orcl_ora_17365.trm  orcl_ora_5235.trm    orcl_pr02_31640.trm
  594. orcl_asmb_17005.trc  orcl_j000_3447.trc   orcl_mman_3286.trc   orcl_ora_17394.trc  orcl_ora_5237.trc    orcl_pr02_32379.trc
  595. orcl_asmb_17005.trm  orcl_j000_3447.trm   orcl_mman_3286.trm   orcl_ora_17394.trm  orcl_ora_5237.trm    orcl_pr02_32379.trm
  596. orcl_asmb_17198.trc  orcl_j000_6299.trc   orcl_mman_6198.trc   orcl_ora_17444.trc  orcl_ora_5249.trc    orcl_pr02_32463.trc
  597. orcl_asmb_17198.trm  orcl_j000_6299.trm   orcl_mman_6198.trm   orcl_ora_17444.trm  orcl_ora_5249.trm    orcl_pr02_32463.trm
  598. orcl_asmb_17424.trc  orcl_j000_7525.trc   orcl_mman_9309.trc   orcl_ora_17522.trc  orcl_ora_5660.trc    orcl_pr02_776.trc
  599. orcl_asmb_17424.trm  orcl_j000_7525.trm   orcl_mman_9309.trm   orcl_ora_17522.trm  orcl_ora_5660.trm    orcl_pr02_776.trm
  600. orcl_asmb_17458.trc  orcl_j001_1251.trc   orcl_mmon_9325.trc   orcl_ora_17639.trc  orcl_ora_5827.trc    orcl_pr03_17757.trc
  601. orcl_asmb_17458.trm  orcl_j001_1251.trm   orcl_mmon_9325.trm   orcl_ora_17639.trm  orcl_ora_5827.trm    orcl_pr03_17757.trm
  602. orcl_asmb_29621.trc  orcl_j001_17080.trc  orcl_ora_10006.trc   orcl_ora_17814.trc  orcl_ora_6147.trc    orcl_pr03_31642.trc
  603. orcl_asmb_29621.trm  orcl_j001_17080.trm  orcl_ora_10006.trm   orcl_ora_17814.trm  orcl_ora_6147.trm    orcl_pr03_31642.trm
  604. orcl_asmb_3300.trc   orcl_j001_31994.trc  orcl_ora_10195.trc   orcl_ora_18201.trc  orcl_ora_6231.trc    orcl_pr03_32381.trc
  605. orcl_asmb_3300.trm   orcl_j001_31994.trm  orcl_ora_10195.trm   orcl_ora_18201.trm  orcl_ora_6231.trm    orcl_pr03_32381.trm
  606. orcl_asmb_6212.trc   orcl_j006_10090.trc  orcl_ora_10242.trc   orcl_ora_18203.trc  orcl_ora_630.trc     orcl_pr03_32465.trc
  607. orcl_asmb_6212.trm   orcl_j006_10090.trm  orcl_ora_10242.trm   orcl_ora_18203.trm  orcl_ora_630.trm     orcl_pr03_32465.trm
  608. orcl_asmb_9323.trc   orcl_lgwr_16969.trc  orcl_ora_10248.trc   orcl_ora_18298.trc  orcl_ora_6851.trc    orcl_pr03_778.trc
  609. orcl_asmb_9323.trm   orcl_lgwr_16969.trm  orcl_ora_10248.trm   orcl_ora_18298.trm  orcl_ora_6851.trm    orcl_pr03_778.trm
  610. orcl_ckpt_16843.trc  orcl_lgwr_17188.trc  orcl_ora_10253.trc   orcl_ora_18709.trc  orcl_ora_7064.trc    orcl_pr04_17759.trc
  611. orcl_ckpt_16843.trm  orcl_lgwr_17188.trm  orcl_ora_10253.trm   orcl_ora_18709.trm  orcl_ora_7064.trm    orcl_pr04_17759.trm
  612. orcl_ckpt_16971.trc  orcl_lgwr_17448.trc  orcl_ora_10255.trc   orcl_ora_21348.trc  orcl_ora_7069.trc    orcl_pr04_31644.trc
  613. orcl_ckpt_16971.trm  orcl_lgwr_17448.trm  orcl_ora_10255.trm   orcl_ora_21348.trm  orcl_ora_7069.trm    orcl_pr04_31644.trm
  614. orcl_ckpt_17190.trc  orcl_lgwr_3290.trc   orcl_ora_10259.trc   orcl_ora_21694.trc  orcl_ora_7072.trc    orcl_pr04_32383.trc
  615. orcl_ckpt_17190.trm  orcl_lgwr_3290.trm   orcl_ora_10259.trm   orcl_ora_21694.trm  orcl_ora_7072.trm    orcl_pr04_32383.trm
  616. orcl_ckpt_17415.trc  orcl_lgwr_6202.trc   orcl_ora_10288.trc   orcl_ora_22780.trc  orcl_ora_7095.trc    orcl_pr04_32467.trc
  617. orcl_ckpt_17415.trm  orcl_lgwr_6202.trm   orcl_ora_10288.trm   orcl_ora_22780.trm  orcl_ora_7095.trm    orcl_pr04_32467.trm
  618. orcl_ckpt_17450.trc  orcl_m000_1153.trc   orcl_ora_10796.trc   orcl_ora_2314.trc   orcl_ora_710.trc     orcl_pr04_780.trc
  619. orcl_ckpt_17450.trm  orcl_m000_1153.trm   orcl_ora_10796.trm   orcl_ora_2314.trm   orcl_ora_710.trm     orcl_pr04_780.trm
  620. orcl_ckpt_29613.trc  orcl_m000_17048.trc  orcl_ora_10910.trc   orcl_ora_24127.trc  orcl_ora_7130.trc    orcl_smon_29615.trc
  621. orcl_ckpt_29613.trm  orcl_m000_17048.trm  orcl_ora_10910.trm   orcl_ora_24127.trm  orcl_ora_7130.trm    orcl_smon_29615.trm
  622. orcl_ckpt_3292.trc   orcl_m000_17495.trc  orcl_ora_1245.trc    orcl_ora_24796.trc  orcl_ora_7864.trc    orcl_vktm_16702.trc
  623. orcl_ckpt_3292.trm   orcl_m000_17495.trm  orcl_ora_1245.trm    orcl_ora_24796.trm  orcl_ora_7864.trm    orcl_vktm_16702.trm
  624. orcl_ckpt_6204.trc   orcl_m000_17729.trc  orcl_ora_13937.trc   orcl_ora_24932.trc  orcl_ora_7871.trc    orcl_vktm_16823.trc
  625. orcl_ckpt_6204.trm   orcl_m000_17729.trm  orcl_ora_13937.trm   orcl_ora_24932.trm  orcl_ora_7871.trm    orcl_vktm_16823.trm
  626. orcl_ckpt_9315.trc   orcl_m000_20797.trc  orcl_ora_1563.trc    orcl_ora_24938.trc  orcl_ora_8107.trc    orcl_vktm_16951.trc
  627. orcl_ckpt_9315.trm   orcl_m000_20797.trm  orcl_ora_1563.trm    orcl_ora_24938.trm  orcl_ora_8107.trm    orcl_vktm_16951.trm
  628. orcl_dbrm_16959.trc  orcl_m000_29689.trc  orcl_ora_15670.trc   orcl_ora_24940.trc  orcl_ora_8621.trc    orcl_vktm_17170.trc
  629. orcl_dbrm_16959.trm  orcl_m000_29689.trm  orcl_ora_15670.trm   orcl_ora_24940.trm  orcl_ora_8621.trm    orcl_vktm_17170.trm
  630. orcl_dbrm_17178.trc  orcl_m000_31651.trc  orcl_ora_16676.trc   orcl_ora_24968.trc  orcl_ora_9254.trc    orcl_vktm_17395.trc
  631. orcl_dbrm_17178.trm  orcl_m000_31651.trm  orcl_ora_16676.trm   orcl_ora_24968.trm  orcl_ora_9254.trm    orcl_vktm_17395.trm
  632. orcl_dbrm_17403.trc  orcl_mark_16786.trc  orcl_ora_16740.trc   orcl_ora_24989.trc  orcl_ora_9342.trc    orcl_vktm_17430.trc
  633. orcl_dbrm_17403.trm  orcl_mark_16786.trm  orcl_ora_16740.trm   orcl_ora_24989.trm  orcl_ora_9342.trm    orcl_vktm_17430.trm
  634. orcl_dbrm_17438.trc  orcl_mark_16912.trc  orcl_ora_16797.trc   orcl_ora_25003.trc  orcl_p000_17767.trc  orcl_vktm_29593.trc
  635. orcl_dbrm_17438.trm  orcl_mark_16912.trm  orcl_ora_16797.trm   orcl_ora_25003.trm  orcl_p000_17767.trm  orcl_vktm_29593.trm
  636. orcl_dbrm_29601.trc  orcl_mark_17012.trc  orcl_ora_16864.trc   orcl_ora_26701.trc  orcl_p001_17769.trc  orcl_vktm_3272.trc
  637. orcl_dbrm_29601.trm  orcl_mark_17012.trm  orcl_ora_16864.trm   orcl_ora_26701.trm  orcl_p001_17769.trm  orcl_vktm_3272.trm
  638. orcl_dbrm_3280.trc   orcl_mark_17213.trc  orcl_ora_16925.trc   orcl_ora_27077.trc  orcl_p002_17771.trc  orcl_vktm_6184.trc
  639. orcl_dbrm_3280.trm   orcl_mark_17213.trm  orcl_ora_16925.trm   orcl_ora_27077.trm  orcl_p002_17771.trm  orcl_vktm_6184.trm
  640. orcl_dbrm_6192.trc   orcl_mark_17436.trc  orcl_ora_16985.trc   orcl_ora_29560.trc  orcl_pr00_17751.trc  orcl_vktm_9295.trc
  641. orcl_dbrm_6192.trm   orcl_mark_17436.trm  orcl_ora_16985.trm   orcl_ora_29560.trm  orcl_pr00_17751.trm  orcl_vktm_9295.trm
  642. orcl_dbrm_9303.trc   orcl_mark_17470.trc  orcl_ora_17059.trc   orcl_ora_29771.trc  orcl_pr00_31636.trc  sbtio.log
  643. [oracle@station90 trace]$ ls -l *7871*
  644. -rw-r----- 1 oracle dba 9675  9月  7 20:34 orcl_ora_7871.trc
  645. -rw-r----- 1 oracle dba   90  9月  7 20:34 orcl_ora_7871.trm
  646. [oracle@station90 trace]$ cp orcl_ora_7871.trc  /home/oracle/control11a.sql
  647. [oracle@station90 trace]$ cd
  648. [oracle@station90 ~]$ ls
  649. control10d-after.sql  create_t04209_uname.sql  osb.txt   revertape-root.sh        ttio.rcv                  公共的  图片  音乐
  650. control11a.sql        mail                     rac_tns   select_t04209_uname.sql  update2_t04209_uname.sql  模板    文档  桌面
  651. copytape-root.sh      oradiag_oracle           rcat.sql  tnsnames.ora             update_t04209_uname.sql   视频    下载
  652. [oracle@station90 ~]$ vim control11a.sql
  653. [oracle@station90 ~]$ ls
  654. control10d-after.sql  create_t04209_uname.sql  osb.txt   revertape-root.sh        ttio.rcv                  公共的  图片  音乐
  655. control11a.sql        mail                     rac_tns   select_t04209_uname.sql  update2_t04209_uname.sql  模板    文档  桌面
  656. copytape-root.sh      oradiag_oracle           rcat.sql  tnsnames.ora             update_t04209_uname.sql   视频    下载
  657. [oracle@station90 ~]$ diff control10d-after.sql   control11a.sql
  658. 1c1
  659. < CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  ARCHIVELOG
  660. ---
  661. > CREATE CONTROLFILE REUSE DATABASE "ORCL" RESETLOGS  ARCHIVELOG
  662. 9,10c9,10
  663. <     '+DATA/orcl/onlinelog/group_1.261.816169635',
  664. <     '+FRA/orcl/onlinelog/group_1.257.816169637'
  665. ---
  666. >     '+DATA/orcl/onlinelog/group_1.262.954101431',
  667. >     '+FRA/orcl/onlinelog/group_1.258.954101433'
  668. 13,14c13,14
  669. <     '+DATA/orcl/onlinelog/group_2.262.816169639',
  670. <     '+FRA/orcl/onlinelog/group_2.258.816169639'
  671. ---
  672. >     '+DATA/orcl/onlinelog/group_2.261.954101433',
  673. >     '+FRA/orcl/onlinelog/group_2.257.954101433'
  674. 17,18c17,18
  675. <     '+DATA/orcl/onlinelog/group_3.263.816169641',
  676. <     '+FRA/orcl/onlinelog/group_3.259.816169641'
  677. ---
  678. >     '+DATA/orcl/onlinelog/group_3.260.954101433',
  679. >     '+FRA/orcl/onlinelog/group_3.256.954101433'
  680. [oracle@station90 ~]$ sqlplus /nolog

  681. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 20:40:57 2017

  682. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  683. SQL> conn / as sysdba
  684. Connected to an idle instance.
  685. SQL> startup
  686. ORACLE instance started.

  687. Total System Global Area 6680915968 bytes
  688. Fixed Size                    2213936 bytes
  689. Variable Size                 3556771792 bytes
  690. Database Buffers         3087007744 bytes
  691. Redo Buffers                   34922496 bytes
  692. ORA-00205: error in identifying control file, check alert log for more info


  693. SQL> @control11.sql
  694. SP2-0310: unable to open file "control11.sql"
  695. SQL> @control11a.sql

  696. Control file created.


  697. PL/SQL procedure successfully completed.


  698. PL/SQL procedure successfully completed.


  699. PL/SQL procedure successfully completed.


  700. PL/SQL procedure successfully completed.


  701. PL/SQL procedure successfully completed.


  702. PL/SQL procedure successfully completed.


  703. PL/SQL procedure successfully completed.


  704. PL/SQL procedure successfully completed.

  705. SQL> recover database;
  706. ORA-00283: recovery session canceled due to errors
  707. ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


  708. SQL> recover database using BACKUP CONTROLFILE;
  709. ORA-00279: change 1114775 generated at 09/07/2017 20:34:23 needed for thread 1
  710. ORA-00289: suggestion :
  711. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_5.278.954102865
  712. ORA-00280: change 1114775 for thread 1 is in sequence #5


  713. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  714. ORA-00279: change 1114781 generated at 09/07/2017 20:34:24 needed for thread 1
  715. ORA-00289: suggestion :
  716. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_6.279.954102867
  717. ORA-00280: change 1114781 for thread 1 is in sequence #6
  718. ORA-00278: log file
  719. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_5.278.954102865' no longer needed
  720. for this recovery


  721. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  722. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  723. ORA-00289: suggestion : +FRA
  724. ORA-00280: change 1114792 for thread 1 is in sequence #7
  725. ORA-00278: log file
  726. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_6.279.954102867' no longer needed
  727. for this recovery


  728. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  729. ORA-00308: cannot open archived log '+FRA'
  730. ORA-17503: ksfdopn:2 Failed to open file +FRA
  731. ORA-15045: ASM file name '+FRA' is not in reference form


  732. SQL> recover database using BACKUP CONTROLFILE;
  733. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  734. ORA-00289: suggestion : +FRA
  735. ORA-00280: change 1114792 for thread 1 is in sequence #7


  736. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  737. cancel
  738. Media recovery cancelled.
  739. SQL> alter database open ;
  740. alter database open
  741. *
  742. ERROR at line 1:
  743. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


  744. SQL> alter database open  resetlogs;
  745. alter database open  resetlogs
  746. *
  747. ERROR at line 1:
  748. ORA-01113: file 1 needs media recovery
  749. ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.816169553'


  750. SQL> exit
  751. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  752. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  753. [oracle@station90 ~]$ rman target /

  754. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 20:43:07 2017

  755. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  756. connected to target database: ORCL (DBID=1343950367, not open)

  757. RMAN> list backup of database;

  758. using target database control file instead of recovery catalog
  759. specification does not match any backup in the repository

  760. RMAN> exit


  761. Recovery Manager complete.
  762. [oracle@station90 ~]$ rman target /  catalog u90/oracle_4U@rcat

  763. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 20:43:24 2017

  764. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  765. connected to target database: ORCL (DBID=1343950367, not open)
  766. connected to recovery catalog database

  767. RMAN> list backup of database;


  768. List of Backup Sets
  769. ===================


  770. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  771. ------- ---- -- ---------- ----------- ------------ ---------------
  772. 77      Incr 0  657.75M    SBT_TAPE    00:00:27     18-MAY-17      
  773.         BP Key: 83   Status: AVAILABLE  Compressed: NO  Tag: 0T_INCR0_WHOLE
  774.         Handle: 12s4ih4j_1_1   Media: station90-000001
  775.   List of Datafiles in backup set 77
  776.   File LV Type Ckp SCN    Ckp Time  Name
  777.   ---- -- ---- ---------- --------- ----
  778.   1    0  Incr 1057421    18-MAY-17 +DATA/orcl/datafile/system.256.816169553
  779.   5    0  Incr 1057421    18-MAY-17 +DATA/orcl/datafile/example.265.816169651

  780. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  781. ------- ---- -- ---------- ----------- ------------ ---------------
  782. 179     Full    3.50M      SBT_TAPE    00:00:15     07-SEP-17      
  783.         BP Key: 181   Status: AVAILABLE  Compressed: NO  Tag: LABS-10D-USERS-BEFORE-RW
  784.         Handle: 16sdsos7_1_1   Media: station90-000001
  785.   List of Datafiles in backup set 179
  786.   File LV Type Ckp SCN    Ckp Time  Name
  787.   ---- -- ---- ---------- --------- ----
  788.   4       Full 1087196    07-SEP-17 +DATA/orcl/datafile/users.259.816169553

  789. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  790. ------- ---- -- ---------- ----------- ------------ ---------------
  791. 180     Full    3.50M      SBT_TAPE    00:00:15     07-SEP-17      
  792.         BP Key: 182   Status: AVAILABLE  Compressed: NO  Tag: LABS-10D-USERS-AFTER-RW
  793.         Handle: 18sdsou6_1_1   Media: station90-000001
  794.   List of Datafiles in backup set 180
  795.   File LV Type Ckp SCN    Ckp Time  Name
  796.   ---- -- ---- ---------- --------- ----
  797.   4       Full 1087321    07-SEP-17 +DATA/orcl/datafile/users.259.816169553

  798. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  799. ------- ---- -- ---------- ----------- ------------ ---------------
  800. 214     Incr 0  445.75M    SBT_TAPE    00:00:19     07-SEP-17      
  801.         BP Key: 221   Status: AVAILABLE  Compressed: NO  Tag: NEWBACKUP
  802.         Handle: 06sdsq58_1_1   Media: station90-000003
  803.   List of Datafiles in backup set 214
  804.   File LV Type Ckp SCN    Ckp Time  Name
  805.   ---- -- ---- ---------- --------- ----
  806.   2    0  Incr 1110116    07-SEP-17 +DATA/orcl/datafile/sysaux.257.816169553
  807.   3    0  Incr 1110116    07-SEP-17 +DATA/orcl/datafile/undotbs1.258.816169553
  808.   4    0  Incr 1110116    07-SEP-17 +DATA/orcl/datafile/users.259.816169553

  809. BS Key  Type LV Size       Device Type Elapsed Time Completion Time
  810. ------- ---- -- ---------- ----------- ------------ ---------------
  811. 215     Incr 0  658.00M    SBT_TAPE    00:00:20     07-SEP-17      
  812.         BP Key: 222   Status: AVAILABLE  Compressed: NO  Tag: NEWBACKUP
  813.         Handle: 05sdsq57_1_1   Media: station90-000001
  814.   List of Datafiles in backup set 215
  815.   File LV Type Ckp SCN    Ckp Time  Name
  816.   ---- -- ---- ---------- --------- ----
  817.   1    0  Incr 1110115    07-SEP-17 +DATA/orcl/datafile/system.256.816169553
  818.   5    0  Incr 1110115    07-SEP-17 +DATA/orcl/datafile/example.265.816169651

  819. RMAN> restore database;

  820. Starting restore at 07-SEP-17
  821. allocated channel: ORA_DISK_1
  822. channel ORA_DISK_1: SID=68 device type=DISK
  823. allocated channel: ORA_DISK_2
  824. channel ORA_DISK_2: SID=131 device type=DISK
  825. allocated channel: ORA_DISK_3
  826. channel ORA_DISK_3: SID=192 device type=DISK
  827. allocated channel: ORA_DISK_4
  828. channel ORA_DISK_4: SID=8 device type=DISK
  829. allocated channel: ORA_DISK_5
  830. channel ORA_DISK_5: SID=132 device type=DISK
  831. allocated channel: ORA_DISK_6
  832. channel ORA_DISK_6: SID=193 device type=DISK
  833. allocated channel: ORA_DISK_7
  834. channel ORA_DISK_7: SID=9 device type=DISK
  835. allocated channel: ORA_DISK_8
  836. channel ORA_DISK_8: SID=69 device type=DISK
  837. allocated channel: ORA_SBT_TAPE_1
  838. channel ORA_SBT_TAPE_1: SID=133 device type=SBT_TAPE
  839. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  840. allocated channel: ORA_SBT_TAPE_2
  841. channel ORA_SBT_TAPE_2: SID=10 device type=SBT_TAPE
  842. channel ORA_SBT_TAPE_2: Oracle Secure Backup

  843. channel ORA_SBT_TAPE_1: starting datafile backup set restore
  844. channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
  845. channel ORA_SBT_TAPE_1: restoring datafile 00001 to +DATA/orcl/datafile/system.256.816169553
  846. channel ORA_SBT_TAPE_1: restoring datafile 00005 to +DATA/orcl/datafile/example.265.816169651
  847. channel ORA_SBT_TAPE_1: reading from backup piece 05sdsq57_1_1
  848. channel ORA_SBT_TAPE_2: starting datafile backup set restore
  849. channel ORA_SBT_TAPE_2: specifying datafile(s) to restore from backup set
  850. channel ORA_SBT_TAPE_2: restoring datafile 00002 to +DATA/orcl/datafile/sysaux.257.816169553
  851. channel ORA_SBT_TAPE_2: restoring datafile 00003 to +DATA/orcl/datafile/undotbs1.258.816169553
  852. channel ORA_SBT_TAPE_2: restoring datafile 00004 to +DATA/orcl/datafile/users.259.816169553
  853. channel ORA_SBT_TAPE_2: reading from backup piece 06sdsq58_1_1
  854. channel ORA_SBT_TAPE_2: piece handle=06sdsq58_1_1 tag=NEWBACKUP
  855. channel ORA_SBT_TAPE_2: restored backup piece 1
  856. channel ORA_SBT_TAPE_2: restore complete, elapsed time: 00:00:45
  857. channel ORA_SBT_TAPE_1: piece handle=05sdsq57_1_1 tag=NEWBACKUP
  858. channel ORA_SBT_TAPE_1: restored backup piece 1
  859. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:55
  860. Finished restore at 07-SEP-17

  861. RMAN> exit


  862. Recovery Manager complete.
  863. [oracle@station90 ~]$ sqlplus /nolog

  864. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 20:44:53 2017

  865. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  866. SQL> conn / as sysdba
  867. Connected.
  868. SQL> recover database using BACKUP CONTROLFILE;
  869. ORA-00279: change 1110115 generated at 09/07/2017 19:44:40 needed for thread 1
  870. ORA-00289: suggestion : +FRA
  871. ORA-00280: change 1110115 for thread 1 is in sequence #33


  872. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  873. ORA-00308: cannot open archived log '+FRA'
  874. ORA-17503: ksfdopn:2 Failed to open file +FRA
  875. ORA-15045: ASM file name '+FRA' is not in reference form


  876. SQL> exit
  877. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  878. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  879. and Real Application Testing options
  880. [oracle@station90 ~]$ rman target /  catalog u90/oracle_4U@rcat

  881. Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 7 20:45:33 2017

  882. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  883. connected to target database: ORCL (DBID=1343950367, not open)
  884. connected to recovery catalog database

  885. RMAN> list backup of archivelog sequence 33 thread 1;

  886. specification does not match any backup in the repository

  887. RMAN> list incarnation of database;


  888. List of Database Incarnations
  889. DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
  890. ------- ------- -------- ---------------- --- ---------- ----------
  891. 2       21      ORCL     1343950367       PARENT  1          15-AUG-09
  892. 2       4       ORCL     1343950367       PARENT  945184     23-MAY-13
  893. 2       358     ORCL     1343950367       CURRENT 1111226    07-SEP-17

  894. RMAN> reset database to incarnation 4;

  895. database reset to incarnation 4

  896. RMAN> list backup of archivelog sequence 33 thread 1;


  897. List of Backup Sets
  898. ===================


  899. BS Key  Size       Device Type Elapsed Time Completion Time
  900. ------- ---------- ----------- ------------ ---------------
  901. 243     256.00K    SBT_TAPE    00:00:16     07-SEP-17      
  902.         BP Key: 246   Status: AVAILABLE  Compressed: NO  Tag: NEWBACKUP
  903.         Handle: 07sdsq63_1_1   Media: station90-000003

  904.   List of Archived Logs in backup set 243
  905.   Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  906.   ---- ------- ---------- --------- ---------- ---------
  907.   1    33      1110005    07-SEP-17 1110141    07-SEP-17

  908. RMAN> restore archivelog sequence 33 thread 1;

  909. Starting restore at 07-SEP-17
  910. allocated channel: ORA_DISK_1
  911. channel ORA_DISK_1: SID=71 device type=DISK
  912. allocated channel: ORA_DISK_2
  913. channel ORA_DISK_2: SID=133 device type=DISK
  914. allocated channel: ORA_DISK_3
  915. channel ORA_DISK_3: SID=192 device type=DISK
  916. allocated channel: ORA_DISK_4
  917. channel ORA_DISK_4: SID=9 device type=DISK
  918. allocated channel: ORA_DISK_5
  919. channel ORA_DISK_5: SID=131 device type=DISK
  920. allocated channel: ORA_DISK_6
  921. channel ORA_DISK_6: SID=193 device type=DISK
  922. allocated channel: ORA_DISK_7
  923. channel ORA_DISK_7: SID=8 device type=DISK
  924. allocated channel: ORA_DISK_8
  925. channel ORA_DISK_8: SID=68 device type=DISK
  926. allocated channel: ORA_SBT_TAPE_1
  927. channel ORA_SBT_TAPE_1: SID=132 device type=SBT_TAPE
  928. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  929. allocated channel: ORA_SBT_TAPE_2
  930. channel ORA_SBT_TAPE_2: SID=7 device type=SBT_TAPE
  931. channel ORA_SBT_TAPE_2: Oracle Secure Backup

  932. channel ORA_SBT_TAPE_1: starting archived log restore to default destination
  933. channel ORA_SBT_TAPE_1: restoring archived log
  934. archived log thread=1 sequence=33
  935. channel ORA_SBT_TAPE_1: reading from backup piece 07sdsq63_1_1
  936. channel ORA_SBT_TAPE_1: piece handle=07sdsq63_1_1 tag=NEWBACKUP
  937. channel ORA_SBT_TAPE_1: restored backup piece 1
  938. channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
  939. Finished restore at 07-SEP-17

  940. RMAN> list incarnation of database;


  941. List of Database Incarnations
  942. DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
  943. ------- ------- -------- ---------------- --- ---------- ----------
  944. 2       21      ORCL     1343950367       PARENT  1          15-AUG-09
  945. 2       4       ORCL     1343950367       CURRENT 945184     23-MAY-13
  946. 2       358     ORCL     1343950367       ORPHAN  1111226    07-SEP-17

  947. RMAN> reset database to incarnation 358;

  948. database reset to incarnation 358

  949. RMAN> list incarnation of database;


  950. List of Database Incarnations
  951. DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
  952. ------- ------- -------- ---------------- --- ---------- ----------
  953. 2       21      ORCL     1343950367       PARENT  1          15-AUG-09
  954. 2       4       ORCL     1343950367       PARENT  945184     23-MAY-13
  955. 2       358     ORCL     1343950367       CURRENT 1111226    07-SEP-17

  956. RMAN> exit


  957. Recovery Manager complete.
  958. [oracle@station90 ~]$ sqlplus /nolog

  959. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 20:48:41 2017

  960. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  961. SQL> conn / as sysdba
  962. Connected.
  963. SQL> recover database using BACKUP CONTROLFILE;
  964. ORA-00279: change 1110115 generated at 09/07/2017 19:44:40 needed for thread 1
  965. ORA-00289: suggestion :
  966. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_33.257.954103659
  967. ORA-00280: change 1110115 for thread 1 is in sequence #33


  968. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  969. ORA-00279: change 1110141 generated at 09/07/2017 19:45:05 needed for thread 1
  970. ORA-00289: suggestion :
  971. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_34.275.954100231
  972. ORA-00280: change 1110141 for thread 1 is in sequence #34
  973. ORA-00278: log file
  974. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_33.257.954103659' no longer
  975. needed for this recovery


  976. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  977. ORA-00279: change 1111189 generated at 09/07/2017 19:50:30 needed for thread 1
  978. ORA-00289: suggestion :
  979. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_35.273.954100231
  980. ORA-00280: change 1111189 for thread 1 is in sequence #35
  981. ORA-00278: log file
  982. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_34.275.954100231' no longer
  983. needed for this recovery


  984. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  985. ORA-00279: change 1111206 generated at 09/07/2017 19:50:31 needed for thread 1
  986. ORA-00289: suggestion :
  987. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_36.272.954100233
  988. ORA-00280: change 1111206 for thread 1 is in sequence #36
  989. ORA-00278: log file
  990. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_35.273.954100231' no longer
  991. needed for this recovery


  992. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  993. ORA-00279: change 1111211 generated at 09/07/2017 19:50:32 needed for thread 1
  994. ORA-00289: suggestion :
  995. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_37.271.954100235
  996. ORA-00280: change 1111211 for thread 1 is in sequence #37
  997. ORA-00278: log file
  998. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_36.272.954100233' no longer
  999. needed for this recovery


  1000. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1001. ORA-00279: change 1111214 generated at 09/07/2017 19:50:34 needed for thread 1
  1002. ORA-00289: suggestion :
  1003. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237
  1004. ORA-00280: change 1111214 for thread 1 is in sequence #38
  1005. ORA-00278: log file
  1006. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_37.271.954100235' no longer
  1007. needed for this recovery


  1008. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1009. ORA-00279: change 1111220 generated at 09/07/2017 19:50:35 needed for thread 1
  1010. ORA-00289: suggestion :
  1011. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237
  1012. ORA-00280: change 1111220 for thread 1 is in sequence #39
  1013. ORA-00278: log file
  1014. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_38.265.954100237' no longer
  1015. needed for this recovery


  1016. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1017. ORA-00279: change 1111226 generated at 09/07/2017 20:10:31 needed for thread 1
  1018. ORA-00289: suggestion :
  1019. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_1.261.954102861
  1020. ORA-00280: change 1111226 for thread 1 is in sequence #1
  1021. ORA-00278: log file
  1022. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_39.264.954100237' no longer
  1023. needed for this recovery


  1024. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}


  1025. ORA-00279: change 1114750 generated at 09/07/2017 20:34:20 needed for thread 1
  1026. ORA-00289: suggestion :
  1027. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_2.262.954102861
  1028. ORA-00280: change 1114750 for thread 1 is in sequence #2
  1029. ORA-00278: log file
  1030. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_1.261.954102861' no longer needed
  1031. for this recovery


  1032. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  1033. ORA-00279: change 1114767 generated at 09/07/2017 20:34:21 needed for thread 1
  1034. ORA-00289: suggestion :
  1035. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_3.276.954102863
  1036. ORA-00280: change 1114767 for thread 1 is in sequence #3
  1037. ORA-00278: log file
  1038. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_2.262.954102861' no longer needed
  1039. for this recovery


  1040. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1041. ORA-00279: change 1114772 generated at 09/07/2017 20:34:21 needed for thread 1
  1042. ORA-00289: suggestion :
  1043. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_4.277.954102865
  1044. ORA-00280: change 1114772 for thread 1 is in sequence #4
  1045. ORA-00278: log file
  1046. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_3.276.954102863' no longer needed
  1047. for this recovery


  1048. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1049. ORA-00279: change 1114775 generated at 09/07/2017 20:34:23 needed for thread 1
  1050. ORA-00289: suggestion :
  1051. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_5.278.954102865
  1052. ORA-00280: change 1114775 for thread 1 is in sequence #5
  1053. ORA-00278: log file
  1054. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_4.277.954102865' no longer needed
  1055. for this recovery


  1056. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1057. ORA-00279: change 1114781 generated at 09/07/2017 20:34:24 needed for thread 1
  1058. ORA-00289: suggestion :
  1059. +FRA/orcl/archivelog/2017_09_07/thread_1_seq_6.279.954102867
  1060. ORA-00280: change 1114781 for thread 1 is in sequence #6
  1061. ORA-00278: log file
  1062. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_5.278.954102865' no longer needed
  1063. for this recovery


  1064. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1065. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  1066. ORA-00289: suggestion : +FRA
  1067. ORA-00280: change 1114792 for thread 1 is in sequence #7
  1068. ORA-00278: log file
  1069. '+FRA/orcl/archivelog/2017_09_07/thread_1_seq_6.279.954102867' no longer needed
  1070. for this recovery


  1071. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

  1072. ORA-00308: cannot open archived log '+FRA'
  1073. ORA-17503: ksfdopn:2 Failed to open file +FRA
  1074. ORA-15045: ASM file name '+FRA' is not in reference form


  1075. SQL> recover database using BACKUP CONTROLFILE;
  1076. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  1077. ORA-00289: suggestion : +FRA
  1078. ORA-00280: change 1114792 for thread 1 is in sequence #7


  1079. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  1080. cancel
  1081. Media recovery cancelled.
  1082. SQL> alter database open ;
  1083. alter database open
  1084. *
  1085. ERROR at line 1:
  1086. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


  1087. SQL> alter database open  resetlogs;
  1088. alter database open  resetlogs
  1089. *
  1090. ERROR at line 1:
  1091. ORA-01113: file 1 needs media recovery
  1092. ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.816169553'


  1093. SQL> recover database until cancel using BACKUP CONTROLFILE;
  1094. ORA-00279: change 1114792 generated at 09/07/2017 20:34:26 needed for thread 1
  1095. ORA-00289: suggestion : +FRA
  1096. ORA-00280: change 1114792 for thread 1 is in sequence #7


  1097. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  1098. cancel
  1099. Media recovery cancelled.
  1100. SQL> alter database open resetlogs;

  1101. Database altered.

  1102. SQL> alter tablespace temp add tempfile '+data' size 30M autoextend on ;

  1103. Tablespace altered.

  1104. SQL> select dbid from v$database;

  1105.       DBID
  1106. ----------
  1107. 1343950367

  1108. SQL> exit
  1109. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1110. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1111. and Real Application Testing options
  1112. [oracle@station90 ~]$ exit
  1113. logout
  1114. [root@station90 tmp]# su - oracle
  1115. [oracle@station90 ~]$ ls
  1116. control10d-after.sql  create_t04209_uname.sql  osb.txt   revertape-root.sh        ttio.rcv                  公共的  图片  音乐
  1117. control11a.sql        mail                     rac_tns   select_t04209_uname.sql  update2_t04209_uname.sql  模板    文档  桌面
  1118. copytape-root.sh      oradiag_oracle           rcat.sql  tnsnames.ora             update_t04209_uname.sql   视频    下载
  1119. [oracle@station90 ~]$ mv control11a.sql control11b.sql
  1120. [oracle@station90 ~]$ ls
  1121. control10d-after.sql  create_t04209_uname.sql  osb.txt   revertape-root.sh        ttio.rcv                  公共的  图片  音乐
  1122. control11b.sql        mail                     rac_tns   select_t04209_uname.sql  update2_t04209_uname.sql  模板    文档  桌面
  1123. copytape-root.sh      oradiag_oracle           rcat.sql  tnsnames.ora             update_t04209_uname.sql   视频    下载
  1124. [oracle@station90 ~]$ cp control11b.sql control11c.sql
  1125. [oracle@station90 ~]$ ls
  1126. control10d-after.sql  create_t04209_uname.sql  rac_tns                  tnsnames.ora              公共的  文档
  1127. control11b.sql        mail                     rcat.sql                 ttio.rcv                  模板    下载
  1128. control11c.sql        oradiag_oracle           revertape-root.sh        update2_t04209_uname.sql  视频    音乐
  1129. copytape-root.sh      osb.txt                  select_t04209_uname.sql  update_t04209_uname.sql   图片    桌面
  1130. [oracle@station90 ~]$ vim control11c.sql
  1131. [oracle@station90 ~]$ sqlplus /nolog

  1132. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:08:11 2017

  1133. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1134. SQL> conn / as sysdba
  1135. Connected.
  1136. SQL> shutdown immediate
  1137. Database closed.
  1138. Database dismounted.
  1139. ORACLE instance shut down.
  1140. SQL> startup nomount
  1141. ORACLE instance started.

  1142. Total System Global Area 6680915968 bytes
  1143. Fixed Size                    2213936 bytes
  1144. Variable Size                 3556771792 bytes
  1145. Database Buffers         3087007744 bytes
  1146. Redo Buffers                   34922496 bytes
  1147. SQL> @control11c.sql
  1148. CREATE CONTROLFILE SET DATABASE "DOG" RESETLOGS  ARCHIVELOG
  1149. *
  1150. ERROR at line 1:
  1151. ORA-01503: CREATE CONTROLFILE failed
  1152. ORA-01504: database name 'DOG' does not match parameter db_name 'orcl'


  1153. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RETENTION POLICY','TO RECOVERY WINDOW OF 1 DAYS'); END;

  1154. *
  1155. ERROR at line 1:
  1156. ORA-01507: database not mounted
  1157. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1158. ORA-06512: at line 1


  1159. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('BACKUP OPTIMIZATION','ON'); END;

  1160. *
  1161. ERROR at line 1:
  1162. ORA-01507: database not mounted
  1163. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1164. ORA-06512: at line 1


  1165. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEFAULT DEVICE TYPE TO','''SBT_TAPE'''); END;

  1166. *
  1167. ERROR at line 1:
  1168. ORA-01507: database not mounted
  1169. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1170. ORA-06512: at line 1


  1171. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP','ON'); END;

  1172. *
  1173. ERROR at line 1:
  1174. ORA-01507: database not mounted
  1175. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1176. ORA-06512: at line 1


  1177. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET'); END;

  1178. *
  1179. ERROR at line 1:
  1180. ORA-01507: database not mounted
  1181. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1182. ORA-06512: at line 1


  1183. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','''SBT_TAPE'' PARALLELISM 2 BACKUP TYPE TO BACKUPSET'); END;

  1184. *
  1185. ERROR at line 1:
  1186. ORA-01507: database not mounted
  1187. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1188. ORA-06512: at line 1


  1189. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','1 DEVICE TYPE ''SBT_TAPE'' PARMS  ''ENV=(OB_MEDIA_FAMILY=station90)'''); END;

  1190. *
  1191. ERROR at line 1:
  1192. ORA-01507: database not mounted
  1193. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1194. ORA-06512: at line 1


  1195. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','2 DEVICE TYPE ''SBT_TAPE'' PARMS  ''ENV=(OB_MEDIA_FAMILY=station90)'''); END;

  1196. *
  1197. ERROR at line 1:
  1198. ORA-01507: database not mounted
  1199. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1200. ORA-06512: at line 1


  1201. SQL> create pfile='/home/oracle/initdog.ora'  from spfile;

  1202. File created.

  1203. SQL> exit
  1204. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1205. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  1206. [oracle@station90 ~]$ sqlplus /nolog

  1207. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:09:40 2017

  1208. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1209. SQL> conn / as sysdba
  1210. Connected.
  1211. SQL> shutdown immediate
  1212. ORA-01507: database not mounted


  1213. ORACLE instance shut down.
  1214. SQL> exit
  1215. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1216. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1217. and Real Application Testing options
  1218. [oracle@station90 ~]$ exit
  1219. logout
  1220. [root@station90 tmp]# vim /etc/oratab
  1221. [root@station90 tmp]# su -  oracle
  1222. [oracle@station90 ~]$ . oraenv
  1223. ORACLE_SID = [orcl] ? dog
  1224. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  1225. [oracle@station90 ~]$ ls
  1226. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1227. control11b.sql        initdog.ora              rac_tns            tnsnames.ora              公共的                   文档
  1228. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1229. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1230. [oracle@station90 ~]$ vim initdog.ora
  1231. [oracle@station90 ~]$ sqlplus /nolog

  1232. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:11:08 2017

  1233. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1234. SQL> conn / as sysdba
  1235. Connected to an idle instance.
  1236. SQL> create spfile from pfile='/home/oracle/initdog.ora' ;

  1237. File created.

  1238. SQL> startup nomount
  1239. ORACLE instance started.

  1240. Total System Global Area 6680915968 bytes
  1241. Fixed Size                    2213936 bytes
  1242. Variable Size                 3556771792 bytes
  1243. Database Buffers         3087007744 bytes
  1244. Redo Buffers                   34922496 bytes
  1245. SQL> @control11c.sql
  1246. CREATE CONTROLFILE SET DATABASE "DOG" RESETLOGS  ARCHIVELOG
  1247. *
  1248. ERROR at line 1:
  1249. ORA-01503: CREATE CONTROLFILE failed
  1250. ORA-00200: control file could not be created
  1251. ORA-00202: control file: '+DATA/orcl/controlfile/current.260.954103283'
  1252. ORA-17502: ksfdcre:4 Failed to create file
  1253. +DATA/orcl/controlfile/current.260.954103283
  1254. ORA-15046: ASM file name '+DATA/orcl/controlfile/current.260.954103283' is not
  1255. in single-file creation form


  1256. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('RETENTION POLICY','TO RECOVERY WINDOW OF 1 DAYS'); END;

  1257. *
  1258. ERROR at line 1:
  1259. ORA-01507: database not mounted
  1260. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1261. ORA-06512: at line 1


  1262. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('BACKUP OPTIMIZATION','ON'); END;

  1263. *
  1264. ERROR at line 1:
  1265. ORA-01507: database not mounted
  1266. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1267. ORA-06512: at line 1


  1268. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEFAULT DEVICE TYPE TO','''SBT_TAPE'''); END;

  1269. *
  1270. ERROR at line 1:
  1271. ORA-01507: database not mounted
  1272. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1273. ORA-06512: at line 1


  1274. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILE AUTOBACKUP','ON'); END;

  1275. *
  1276. ERROR at line 1:
  1277. ORA-01507: database not mounted
  1278. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1279. ORA-06512: at line 1


  1280. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET'); END;

  1281. *
  1282. ERROR at line 1:
  1283. ORA-01507: database not mounted
  1284. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1285. ORA-06512: at line 1


  1286. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('DEVICE TYPE','''SBT_TAPE'' PARALLELISM 2 BACKUP TYPE TO BACKUPSET'); END;

  1287. *
  1288. ERROR at line 1:
  1289. ORA-01507: database not mounted
  1290. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1291. ORA-06512: at line 1


  1292. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','1 DEVICE TYPE ''SBT_TAPE'' PARMS  ''ENV=(OB_MEDIA_FAMILY=station90)'''); END;

  1293. *
  1294. ERROR at line 1:
  1295. ORA-01507: database not mounted
  1296. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1297. ORA-06512: at line 1


  1298. BEGIN :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','2 DEVICE TYPE ''SBT_TAPE'' PARMS  ''ENV=(OB_MEDIA_FAMILY=station90)'''); END;

  1299. *
  1300. ERROR at line 1:
  1301. ORA-01507: database not mounted
  1302. ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5049
  1303. ORA-06512: at line 1


  1304. SQL> exit
  1305. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1306. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  1307. [oracle@station90 ~]$ sqlplus /nolog

  1308. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:12:36 2017

  1309. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1310. SQL> conn / as sysdba
  1311. Connected.
  1312. SQL> shutdown immediate
  1313. ORA-01507: database not mounted


  1314. ORACLE instance shut down.
  1315. SQL> exit
  1316. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1317. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1318. and Real Application Testing options
  1319. [oracle@station90 ~]$ ls
  1320. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1321. control11b.sql        initdog.ora              rac_tns            tnsnames.ora              公共的                   文档
  1322. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1323. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1324. [oracle@station90 ~]$ vim initdog.ora
  1325. [oracle@station90 ~]$ sqlplus /nolog

  1326. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:13:30 2017

  1327. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1328. SQL> conn / as sysdba
  1329. Connected to an idle instance.
  1330. SQL> create spfile from pfile='/home/oracle/initdog.ora' ;

  1331. File created.

  1332. SQL> startup nomount
  1333. ORACLE instance started.

  1334. Total System Global Area 6680915968 bytes
  1335. Fixed Size                    2213936 bytes
  1336. Variable Size                 3556771792 bytes
  1337. Database Buffers         3087007744 bytes
  1338. Redo Buffers                   34922496 bytes
  1339. SQL> @control11c.sql

  1340. Control file created.


  1341. PL/SQL procedure successfully completed.


  1342. PL/SQL procedure successfully completed.


  1343. PL/SQL procedure successfully completed.


  1344. PL/SQL procedure successfully completed.


  1345. PL/SQL procedure successfully completed.


  1346. PL/SQL procedure successfully completed.


  1347. PL/SQL procedure successfully completed.


  1348. PL/SQL procedure successfully completed.

  1349. SQL> alter database open ;
  1350. alter database open
  1351. *
  1352. ERROR at line 1:
  1353. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


  1354. SQL> alter database open  resetlogs;

  1355. Database altered.

  1356. SQL> select  name , dbid from v$database;

  1357. NAME                DBID
  1358. --------- ----------
  1359. DOG          1343950367

  1360. SQL> shutdown immediate
  1361. Database closed.
  1362. Database dismounted.
  1363. ORACLE instance shut down.
  1364. SQL> exit
  1365. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1366. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  1367. [oracle@station90 ~]$ ls
  1368. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1369. control11b.sql        initdog.ora              rac_tns            tnsnames.ora              公共的                   文档
  1370. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1371. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1372. [oracle@station90 ~]$ mv initdog.ora initorcl.ora
  1373. [oracle@station90 ~]$ ls
  1374. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1375. control11b.sql        initorcl.ora             rac_tns            tnsnames.ora              公共的                   文档
  1376. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1377. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1378. [oracle@station90 ~]$ vim initorcl.ora
  1379. [oracle@station90 ~]$ vim initorcl.ora
  1380. [oracle@station90 ~]$ . oraenv
  1381. ORACLE_SID = [dog] ? orcl
  1382. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  1383. [oracle@station90 ~]$ sqlplus /nolog

  1384. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:17:30 2017

  1385. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1386. SQL> conn / as sysdba
  1387. Connected to an idle instance.
  1388. SQL> startup pfile='/home/oracle/initorcl.ora'  nomount
  1389. ORACLE instance started.

  1390. Total System Global Area 6680915968 bytes
  1391. Fixed Size                    2213936 bytes
  1392. Variable Size                 3556771792 bytes
  1393. Database Buffers         3087007744 bytes
  1394. Redo Buffers                   34922496 bytes
  1395. SQL> exit
  1396. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1397. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  1398. [oracle@station90 ~]$ ls
  1399. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1400. control11b.sql        initorcl.ora             rac_tns            tnsnames.ora              公共的                   文档
  1401. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1402. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1403. [oracle@station90 ~]$ vim control11c.sql
  1404. [oracle@station90 ~]$ sqlplus /nolog

  1405. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:18:42 2017

  1406. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1407. SQL> conn / aS SYSDBA
  1408. Connected.
  1409. SQL> @control11c.sql

  1410. Control file created.


  1411. PL/SQL procedure successfully completed.


  1412. PL/SQL procedure successfully completed.


  1413. PL/SQL procedure successfully completed.


  1414. PL/SQL procedure successfully completed.


  1415. PL/SQL procedure successfully completed.


  1416. PL/SQL procedure successfully completed.


  1417. PL/SQL procedure successfully completed.


  1418. PL/SQL procedure successfully completed.

  1419. SQL> alter database open resetlogs;

  1420. Database altered.

  1421. SQL> select  file_name , status from dba_temp_files;

  1422. no rows selected

  1423. SQL> alter tablespace temp add tempfile '+data' size 30M autoextend on ;

  1424. Tablespace altered.

  1425. SQL> select  name , db_id from v$database;
  1426. select        name , db_id from v$database
  1427.                *
  1428. ERROR at line 1:
  1429. ORA-00904: "DB_ID": invalid identifier


  1430. SQL> select  name , dbid from v$database;

  1431. NAME                DBID
  1432. --------- ----------
  1433. ORCL          1343950367

  1434. SQL> exit
  1435. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1436. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1437. and Real Application Testing options
  1438. [oracle@station90 ~]$ exit
  1439. logout
  1440. [root@station90 tmp]# vim /etc/oratab
  1441. [root@station90 tmp]# su - oracle
  1442. [oracle@station90 ~]$ ls
  1443. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1444. control11b.sql        initorcl.ora             rac_tns            tnsnames.ora              公共的                   文档
  1445. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1446. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1447. [oracle@station90 ~]$ sqlplus /nolog

  1448. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:21:31 2017

  1449. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1450. SQL> exit
  1451. [oracle@station90 ~]$ . oraenv
  1452. ORACLE_SID = [orcl] ?
  1453. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  1454. [oracle@station90 ~]$ sqlplus /nolog

  1455. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:21:45 2017

  1456. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1457. SQL> conn / as sysdba
  1458. Connected.
  1459. SQL> shutdown immediate
  1460. Database closed.
  1461. Database dismounted.
  1462. ORACLE instance shut down.
  1463. SQL> startup  mount
  1464. ORACLE instance started.

  1465. Total System Global Area 6680915968 bytes
  1466. Fixed Size                    2213936 bytes
  1467. Variable Size                 3556771792 bytes
  1468. Database Buffers         3087007744 bytes
  1469. Redo Buffers                   34922496 bytes
  1470. Database mounted.
  1471. SQL> exit
  1472. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1473. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1474. and Real Application Testing options
  1475. [oracle@station90 ~]$ nid

  1476. DBNEWID: Release 11.2.0.1.0 - Production on Thu Sep 7 21:22:27 2017

  1477. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  1478. Keyword     Description                    (Default)
  1479. ----------------------------------------------------
  1480. TARGET      Username/Password              (NONE)
  1481. DBNAME      New database name              (NONE)
  1482. LOGFILE     Output Log                     (NONE)
  1483. REVERT      Revert failed change           NO
  1484. SETNAME     Set a new database name only   NO
  1485. APPEND      Append to output log           NO
  1486. HELP        Displays these messages        NO

  1487. [oracle@station90 ~]$ nid target=sys/oracle_4U  DBNAME=cat

  1488. DBNEWID: Release 11.2.0.1.0 - Production on Thu Sep 7 21:23:15 2017

  1489. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  1490. Connected to database ORCL (DBID=1343950367)

  1491. Connected to server version 11.2.0

  1492. Control Files in database:
  1493.     +DATA/orcl/controlfile/current.260.954103283
  1494.     +FRA/orcl/controlfile/current.256.954103283


  1495. Cannot read the header of the following datafiles:
  1496.     +DATA/orcl/datafile/system.256.81616955 (1), error: 14
  1497.     +DATA/orcl/datafile/sysaux.257.81616955 (2), error: 14
  1498.     +DATA/orcl/datafile/undotbs1.258.81616955 (3), error: 14
  1499.     +DATA/orcl/datafile/users.259.81616955 (4), error: 14
  1500.     +DATA/orcl/datafile/example.265.81616965 (5), error: 14

  1501. NID-00137: All datafiles that are not dropped should be readable


  1502. Change of database name failed during validation - database is intact.
  1503. DBNEWID - Completed with validation errors.

  1504. [oracle@station90 ~]$ sqlplus /nolog

  1505. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:24:45 2017

  1506. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1507. SQL> conn / as sysdbas
  1508. SP2-0306: Invalid option.
  1509. Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]
  1510. where <logon> ::= <username>[/<password>][@<connect_identifier>]
  1511.       <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
  1512. SQL> conn / as sysdba
  1513. Connected.
  1514. SQL> alter database open ;
  1515. alter database open
  1516. *
  1517. ERROR at line 1:
  1518. ORA-01190: control file or data file 1 is from before the last RESETLOGS
  1519. ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.816169553'


  1520. SQL> alter database open resetlogs;
  1521. alter database open resetlogs
  1522. *
  1523. ERROR at line 1:
  1524. ORA-01139: RESETLOGS option only valid after an incomplete database recovery


  1525. SQL> recover database ;
  1526. ORA-00283: recovery session canceled due to errors
  1527. ORA-19909: datafile 1 belongs to an orphan incarnation
  1528. ORA-01110: data file 1: '+DATA/orcl/datafile/system.256.816169553'


  1529. SQL> shutdown immediate
  1530. ORA-01109: database not open


  1531. Database dismounted.
  1532. ORACLE instance shut down.
  1533. SQL> startup
  1534. ORACLE instance started.

  1535. Total System Global Area 6680915968 bytes
  1536. Fixed Size                    2213936 bytes
  1537. Variable Size                 3556771792 bytes
  1538. Database Buffers         3087007744 bytes
  1539. Redo Buffers                   34922496 bytes
  1540. [oracle@station90 ~]$ sqlplus /nolog

  1541. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:28:44 2017

  1542. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1543. SQL> conn / as sysdba
  1544. Connected to an idle instance.
  1545. SQL> create spfile='+data/orcl/spfileorcl.ora' from pfile='/home/oracle/initorcl.ora';

  1546. File created.

  1547. SQL> startup
  1548. ORACLE instance started.

  1549. Total System Global Area 6680915968 bytes
  1550. Fixed Size                    2213936 bytes
  1551. Variable Size                 3556771792 bytes
  1552. Database Buffers         3087007744 bytes
  1553. Redo Buffers                   34922496 bytes
  1554. Database mounted.
  1555. Database opened.
  1556. SQL> shutdown immediate
  1557. Database closed.
  1558. Database dismounted.
  1559. ORACLE instance shut down.
  1560. SQL> startup mount
  1561. ORA-01078: failure in processing system parameters
  1562. ORA-01565: error in identifying file '+DATA/orcl/spfileorcl.ora'
  1563. ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
  1564. ORA-15056: additional error message
  1565. ORA-17503: ksfdopn:DGOpenFile05 Failed to open file +DATA/orcl/spfileorcl.ora
  1566. ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
  1567. ORA-15173: entry 'spfileorcl.ora' does not exist in directory 'orcl'
  1568. ORA-06512: at line 4
  1569. SQL> exit
  1570. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1571. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1572. and Real Application Testing options
  1573. [oracle@station90 ~]$ sqlplus /nolog

  1574. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:30:55 2017

  1575. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1576. SQL> conn / as sysdba
  1577. Connected to an idle instance.
  1578. SQL> startup mount
  1579. ORA-01078: failure in processing system parameters
  1580. ORA-01565: error in identifying file '+DATA/orcl/spfileorcl.ora'
  1581. ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
  1582. ORA-15056: additional error message
  1583. ORA-17503: ksfdopn:DGOpenFile05 Failed to open file +DATA/orcl/spfileorcl.ora
  1584. ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
  1585. ORA-15173: entry 'spfileorcl.ora' does not exist in directory 'orcl'
  1586. ORA-06512: at line 4
  1587. SQL> create spfile='+DATA/orcl/spfileorcl.ora'  from pfile='/home/oracle/initorcl.ora';

  1588. File created.

  1589. SQL> startup mount
  1590. ORACLE instance started.

  1591. Total System Global Area 6680915968 bytes
  1592. Fixed Size                    2213936 bytes
  1593. Variable Size                 3556771792 bytes
  1594. Database Buffers         3087007744 bytes
  1595. Redo Buffers                   34922496 bytes
  1596. Database mounted.
  1597. SQL> exit
  1598. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1599. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1600. and Real Application Testing options
  1601. [oracle@station90 ~]$ nid target=sys/oracle_4U  DBNAME=cat

  1602. DBNEWID: Release 11.2.0.1.0 - Production on Thu Sep 7 21:32:08 2017

  1603. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  1604. Connected to database ORCL (DBID=1343950367)

  1605. Connected to server version 11.2.0

  1606. Control Files in database:
  1607.     +DATA/orcl/controlfile/current.273.954105535
  1608.     +FRA/orcl/controlfile/current.286.954105535

  1609. Change database ID and database name ORCL to CAT? (Y/[N]) => Y

  1610. Proceeding with operation
  1611. Changing database ID from 1343950367 to 766562648
  1612. Changing database name from ORCL to CAT
  1613.     Control File +DATA/orcl/controlfile/current.273.954105535 - modified
  1614.     Control File +FRA/orcl/controlfile/current.286.954105535 - modified
  1615.     Datafile +DATA/orcl/datafile/system.256.81616955 - dbid changed, wrote new name
  1616.     Datafile +DATA/orcl/datafile/sysaux.257.81616955 - dbid changed, wrote new name
  1617.     Datafile +DATA/orcl/datafile/undotbs1.258.81616955 - dbid changed, wrote new name
  1618.     Datafile +DATA/orcl/datafile/users.259.81616955 - dbid changed, wrote new name
  1619.     Datafile +DATA/orcl/datafile/example.265.81616965 - dbid changed, wrote new name
  1620.     Datafile +DATA/orcl/tempfile/temp.277.95410557 - dbid changed, wrote new name
  1621.     Control File +DATA/orcl/controlfile/current.273.954105535 - dbid changed, wrote new name
  1622.     Control File +FRA/orcl/controlfile/current.286.954105535 - dbid changed, wrote new name
  1623.     Instance shut down

  1624. Database name changed to CAT.
  1625. Modify parameter file and generate a new password file before restarting.
  1626. Database ID for database CAT changed to 766562648.
  1627. All previous backups and archived redo logs for this database are unusable.
  1628. Database is not aware of previous backups and archived logs in Recovery Area.
  1629. Database has been shutdown, open database with RESETLOGS option.
  1630. Succesfully changed database name and ID.
  1631. DBNEWID - Completed succesfully.

  1632. [oracle@station90 ~]$ sqlplus /nolog

  1633. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:32:56 2017

  1634. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1635. SQL> conn / as sysdba
  1636. Connected to an idle instance.
  1637. SQL> exit
  1638. Disconnected
  1639. [oracle@station90 ~]$ ls
  1640. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1641. control11b.sql        initorcl.ora             rac_tns            tnsnames.ora              公共的                   文档
  1642. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1643. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1644. [oracle@station90 ~]$ mv initorcl.ora initcat.ora
  1645. [oracle@station90 ~]$ ls
  1646. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1647. control11b.sql        initcat.ora              rac_tns            tnsnames.ora              公共的                   文档
  1648. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1649. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1650. [oracle@station90 ~]$ vim initcat.ora
  1651. [oracle@station90 ~]$ sqlplus /nolog

  1652. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:33:54 2017

  1653. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1654. SQL> conn / as sysdba
  1655. Connected to an idle instance.
  1656. SQL> exit
  1657. Disconnected
  1658. [oracle@station90 ~]$ . oraenv
  1659. ORACLE_SID = [orcl] ? cat
  1660. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  1661. [oracle@station90 ~]$ sqlplus /nolog

  1662. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:34:09 2017

  1663. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1664. SQL> conn / as sysdba
  1665. Connected to an idle instance.
  1666. SQL> startup
  1667. ORA-01078: failure in processing system parameters
  1668. LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initcat.ora'
  1669. SQL> conn / as sysdba
  1670. Connected to an idle instance.
  1671. SQL> startup pfile='/home/oracle/initcat.ora'
  1672. ORACLE instance started.

  1673. Total System Global Area 6680915968 bytes
  1674. Fixed Size                    2213936 bytes
  1675. Variable Size                 3556771792 bytes
  1676. Database Buffers         3087007744 bytes
  1677. Redo Buffers                   34922496 bytes
  1678. Database mounted.
  1679. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


  1680. SQL> alter database open resetlogs;

  1681. Database altered.

  1682. SQL> select  name, dbid from v$database;

  1683. NAME                DBID
  1684. --------- ----------
  1685. CAT           766562648

  1686. SQL> select file_name , status from dba_temp_files;

  1687. FILE_NAME
  1688. --------------------------------------------------------------------------------
  1689. STATUS
  1690. -------
  1691. +DATA/orcl/tempfile/temp.277.954105579
  1692. ONLINE


  1693. SQL> shutdown immediate
  1694. Database closed.
  1695. Database dismounted.
  1696. ORACLE instance shut down.
  1697. SQL> startup pfile='/home/oracle/initcat.ora'  mount
  1698. ORACLE instance started.

  1699. Total System Global Area 6680915968 bytes
  1700. Fixed Size                    2213936 bytes
  1701. Variable Size                 3556771792 bytes
  1702. Database Buffers         3087007744 bytes
  1703. Redo Buffers                   34922496 bytes
  1704. Database mounted.
  1705. SQL> exit
  1706. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  1707. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  1708. and Real Application Testing options
  1709. [oracle@station90 ~]$ nid target=sys/oracle_4U  DBNAME=orcl

  1710. DBNEWID: Release 11.2.0.1.0 - Production on Thu Sep 7 21:36:52 2017

  1711. Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

  1712. Connected to database CAT (DBID=766562648)

  1713. Connected to server version 11.2.0

  1714. Control Files in database:
  1715.     +DATA/orcl/controlfile/current.273.954105535
  1716.     +FRA/orcl/controlfile/current.286.954105535

  1717. Change database ID and database name CAT to ORCL? (Y/[N]) => Y

  1718. Proceeding with operation
  1719. Changing database ID from 766562648 to 1481917044
  1720. Changing database name from CAT to ORCL
  1721.     Control File +DATA/orcl/controlfile/current.273.954105535 - modified
  1722.     Control File +FRA/orcl/controlfile/current.286.954105535 - modified
  1723.     Datafile +DATA/orcl/datafile/system.256.81616955 - dbid changed, wrote new name
  1724.     Datafile +DATA/orcl/datafile/sysaux.257.81616955 - dbid changed, wrote new name
  1725.     Datafile +DATA/orcl/datafile/undotbs1.258.81616955 - dbid changed, wrote new name
  1726.     Datafile +DATA/orcl/datafile/users.259.81616955 - dbid changed, wrote new name
  1727.     Datafile +DATA/orcl/datafile/example.265.81616965 - dbid changed, wrote new name
  1728.     Datafile +DATA/orcl/tempfile/temp.277.95410557 - dbid changed, wrote new name
  1729.     Control File +DATA/orcl/controlfile/current.273.954105535 - dbid changed, wrote new name
  1730.     Control File +FRA/orcl/controlfile/current.286.954105535 - dbid changed, wrote new name
  1731.     Instance shut down

  1732. Database name changed to ORCL.
  1733. Modify parameter file and generate a new password file before restarting.
  1734. Database ID for database ORCL changed to 1481917044.
  1735. All previous backups and archived redo logs for this database are unusable.
  1736. Database is not aware of previous backups and archived logs in Recovery Area.
  1737. Database has been shutdown, open database with RESETLOGS option.
  1738. Succesfully changed database name and ID.
  1739. DBNEWID - Completed succesfully.

  1740. [oracle@station90 ~]$ ls
  1741. control10d-after.sql  create_t04209_uname.sql  osb.txt            select_t04209_uname.sql   update_t04209_uname.sql  图片  桌面
  1742. control11b.sql        initcat.ora              rac_tns            tnsnames.ora              公共的                   文档
  1743. control11c.sql        mail                     rcat.sql           ttio.rcv                  模板                     下载
  1744. copytape-root.sh      oradiag_oracle           revertape-root.sh  update2_t04209_uname.sql  视频                     音乐
  1745. [oracle@station90 ~]$ sqlplus /nolog

  1746. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:37:19 2017

  1747. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1748. SQL> conn / as sysdba
  1749. Connected to an idle instance.
  1750. SQL> startup
  1751. ORA-01078: failure in processing system parameters
  1752. LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initcat.ora'
  1753. SQL> exit
  1754. Disconnected
  1755. [oracle@station90 ~]$ . oraenv
  1756. ORACLE_SID = [cat] ? orcl
  1757. The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
  1758. [oracle@station90 ~]$ sqlplus /nolog

  1759. SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 7 21:37:35 2017

  1760. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  1761. SQL> conn / as sysdba
  1762. Connected to an idle instance.
  1763. SQL> startup
  1764. ORACLE instance started.

  1765. Total System Global Area 6680915968 bytes
  1766. Fixed Size                    2213936 bytes
  1767. Variable Size                 3556771792 bytes
  1768. Database Buffers         3087007744 bytes
  1769. Redo Buffers                   34922496 bytes
  1770. Database mounted.
  1771. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


  1772. SQL> alter database open resetlogs;

  1773. Database altered.

  1774. SQL> select  name , dbid from v$database;

  1775. NAME                DBID
  1776. --------- ----------
  1777. ORCL          1481917044

  1778. SQL>
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-19 14:53 , Processed in 0.049688 second(s), 27 queries .

快速回复 返回顶部 返回列表