Advertisement
ExaGridDba

12c backup database cross platform, restore, recover

Oct 2nd, 2013
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SQL> shutdown IMMEDIATE
  2. DATABASE closed.
  3. DATABASE dismounted.
  4. ORACLE instance shut down.
  5. SQL> startup mount
  6. ORACLE instance started.
  7.  
  8. Total SYSTEM Global Area 2505338880 bytes
  9. Fixed SIZE                  2684688 bytes
  10. Variable SIZE             721422576 bytes
  11. DATABASE Buffers         1761607680 bytes
  12. Redo Buffers               19623936 bytes
  13. DATABASE mounted.
  14. SQL> ALTER DATABASE OPEN read only;
  15.  
  16. DATABASE altered.
  17.  
  18. RMAN> backup
  19. 2> TO platform='Linux IA (64-bit)'
  20. 3> DATABASE
  21. 4> ;
  22. Starting backup AT 20131002 07:18
  23. USING target DATABASE control FILE instead OF recovery catalog
  24. allocated channel: ORA_DISK_1
  25. channel ORA_DISK_1: SID=123 device TYPE=DISK
  26. channel ORA_DISK_1: starting full datafile backup SET
  27. channel ORA_DISK_1: specifying datafile(s) IN backup SET
  28. input datafile FILE NUMBER=00003 name=+DATA/POLOLU/DATAFILE/sysaux.580.825898439
  29. input datafile FILE NUMBER=00001 name=+DATA/POLOLU/DATAFILE/SYSTEM.583.825898485
  30. input datafile FILE NUMBER=00004 name=+DATA/POLOLU/DATAFILE/undotbs1.586.825898533
  31. input datafile FILE NUMBER=00006 name=+DATA/POLOLU/DATAFILE/users.584.825898531
  32. channel ORA_DISK_1: starting piece 1 AT 20131002 07:18
  33. channel ORA_DISK_1: finished piece 1 AT 20131002 07:20
  34. piece handle=/app/oracle/product/12.1.0/db_1/dbs/09olci6p_1_1 tag=TAG20131002T071847 COMMENT=NONE
  35. channel ORA_DISK_1: backup SET complete, elapsed TIME: 00:01:15
  36. Finished backup AT 20131002 07:20
  37.  
  38. RMAN> **end-of-FILE**
  39.  
  40. RMAN> startup force nomount
  41.  
  42. Oracle instance started
  43.  
  44. Total SYSTEM Global Area    2505338880 bytes
  45.  
  46. Fixed SIZE                     2684688 bytes
  47. Variable SIZE                721422576 bytes
  48. DATABASE Buffers            1761607680 bytes
  49. Redo Buffers                  19623936 bytes
  50.  
  51. RMAN>  @ restoreFromPlatformDatabase.rcv
  52.  
  53. RMAN>
  54. RMAN> restore
  55. 2> FROM platform 'Linux IA (64-bit)'
  56. 3> foreign DATABASE
  57. 4> format '+DATA'
  58. 5> FROM backupset '/app/oracle/product/12.1.0/db_1/dbs/09olci6p_1_1'
  59. 6> ;
  60. Starting restore AT 20131002 07:29
  61. allocated channel: ORA_DISK_1
  62. channel ORA_DISK_1: SID=414 device TYPE=DISK
  63.  
  64. channel ORA_DISK_1: starting datafile backup SET restore
  65. channel ORA_DISK_1: specifying datafile(s) TO restore FROM backup SET
  66. channel ORA_DISK_1: restoring ALL foreign files IN backup piece
  67. channel ORA_DISK_1: reading FROM backup piece /app/oracle/product/12.1.0/db_1/dbs/09olci6p_1_1
  68. channel ORA_DISK_1: restoring foreign FILE 3 TO +DATA
  69. channel ORA_DISK_1: restoring foreign FILE 1 TO +DATA
  70. channel ORA_DISK_1: restoring foreign FILE 4 TO +DATA
  71. channel ORA_DISK_1: restoring foreign FILE 6 TO +DATA
  72. channel ORA_DISK_1: foreign piece handle=/app/oracle/product/12.1.0/db_1/dbs/09olci6p_1_1
  73. channel ORA_DISK_1: restored backup piece 1
  74. channel ORA_DISK_1: restore complete, elapsed TIME: 00:01:56
  75. Finished restore AT 20131002 07:31
  76.  
  77. RMAN> **end-of-FILE**
  78.  
  79. RMAN> ALTER DATABASE mount;
  80.  
  81. Statement processed
  82. released channel: ORA_DISK_1
  83.  
  84. RMAN> recover DATABASE;
  85.  
  86. Starting recover AT 20131002 07:33
  87. allocated channel: ORA_DISK_1
  88. channel ORA_DISK_1: SID=240 device TYPE=DISK
  89.  
  90. starting media recovery
  91. media recovery complete, elapsed TIME: 00:00:01
  92.  
  93. Finished recover AT 20131002 07:33
  94.  
  95. RMAN> ALTER DATABASE OPEN;
  96.  
  97. Statement processed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement