copy 备份:
[oraprod@ebsprod ~]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Mon Jun 20 11:28:50 2016 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: PROD (DBID=325515888) RMAN> RUN { ALLOCATE CHANNEL dev1 DEVICE TYPE DISK; ALLOCATE CHANNEL dev2 DEVICE TYPE DISK; ALLOCATE CHANNEL dev3 DEVICE TYPE DISK; ALLOCATE CHANNEL dev4 DEVICE TYPE DISK; BACKUP AS COPY INCREMENTAL LEVEL 0 DATABASE FORMAT '+DATA' TAG 'ORA_ASM_MIGRATION'; }2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> using target database control file instead of recovery catalog allocated channel: dev1 channel dev1: SID=109 device type=DISK allocated channel: dev2 channel dev2: SID=205 device type=DISK allocated channel: dev3 channel dev3: SID=306 device type=DISK allocated channel: dev4 channel dev4: SID=12 device type=DISK Starting backup at 20-JUN-16 channel dev1: starting datafile copy input datafile file number=00013 name=/app/ora_prod/db/apps_st/data/system12.dbf channel dev2: starting datafile copy input datafile file number=00288 name=/app/ora_prod/db/apps_st/data/system10.dbf channel dev3: starting datafile copy input datafile file number=00402 name=/app/ora_prod/db/apps_st/data/a_txn_data03.dbf channel dev4: starting datafile copy input datafile file number=00014 name=/app/ora_prod/db/apps_st/data/a_txn_data04.dbf output file name=+DATA/prod/datafile/system.258.915017345 tag=ORA_ASM_MIGRATION RECID=1 STAMP=915019405 channel dev2: datafile copy complete, elapsed time: 00:34:29 channel dev2: starting datafile copy input datafile file number=00401 name=/app/ora_prod/db/apps_st/data/a_txn_data02.dbf output file name=+DATA/prod/datafile/apps_ts_tx_data.257.915017345 tag=ORA_ASM_MIGRATION RECID=3 STAMP=915019416 channel dev3: datafile copy complete, elapsed time: 00:34:33 channel dev3: starting datafile copy input datafile file number=00406 name=/app/ora_prod/db/apps_st/data/a_txn_ind05.dbf output file name=+DATA/prod/datafile/apps_ts_tx_data.256.915017345 tag=ORA_ASM_MIGRATION RECID=2 STAMP=915019415 channel dev4: datafile copy complete, elapsed time: 00:34:34 channel dev4: starting datafile copy input datafile file number=00353 name=/app/ora_prod/db/apps_st/data/system08.dbf output file name=+DATA/prod/datafile/apps_ts_tx_idx.261.915019419 tag=ORA_ASM_MIGRATION RECID=4 STAMP=915020891 channel dev3: datafile copy complete, elapsed time: 00:24:35 channel dev3: starting datafile copy input datafile file number=00405 name=/app/ora_prod/db/apps_st/data/a_txn_ind04.dbf output file name=+DATA/prod/datafile/system.262.915019421 tag=ORA_ASM_MIGRATION RECID=5 STAMP=915020917 channel dev4: datafile copy complete, elapsed time: 00:24:60 channel dev4: starting datafile copy input datafile file number=00379 name=/app/ora_prod/db/apps_st/data/undo01.dbf output file name=+DATA/prod/datafile/apps_ts_tx_data.260.915019419 tag=ORA_ASM_MIGRATION RECID=6 STAMP=915020948 channel dev2: datafile copy complete, elapsed time: 00:25:39 channel dev2: starting datafile copy input datafile file number=00394 name=/app/ora_prod/db/apps_st/data/a_ref01.dbf output file name=+DATA/prod/datafile/system.259.915017345 tag=ORA_ASM_MIGRATION RECID=7 STAMP=915021071 channel dev1: datafile copy complete, elapsed time: 01:02:10 channel dev1: starting datafile copy input datafile file number=00403 name=/app/ora_prod/db/apps_st/data/a_txn_ind02.dbf output file name=+DATA/prod/datafile/apps_ts_seed.265.915020959 tag=ORA_ASM_MIGRATION RECID=8 STAMP=915022008 channel dev2: datafile copy complete, elapsed time: 00:17:31 channel dev2: starting datafile copy input datafile file number=00392 name=/app/ora_prod/db/apps_st/data/a_txn_data01.dbf output file name=+DATA/prod/datafile/apps_undots1.264.915020925 tag=ORA_ASM_MIGRATION RECID=9 STAMP=915022032 channel dev4: datafile copy complete, elapsed time: 00:18:35 channel dev4: starting datafile copy input datafile file number=00400 name=/app/ora_prod/db/apps_st/data/a_media01.dbf output file name=+DATA/prod/datafile/apps_ts_tx_idx.266.915021079 tag=ORA_ASM_MIGRATION RECID=10 STAMP=915022041 channel dev1: datafile copy complete, elapsed time: 00:16:04 channel dev1: starting datafile copy input datafile file number=00407 name=/app/ora_prod/db/apps_st/data/a_ref02.dbf output file name=+DATA/prod/datafile/apps_ts_tx_idx.263.915020895 tag=ORA_ASM_MIGRATION RECID=11 STAMP=915022110 channel dev3: datafile copy complete, elapsed time: 00:20:25 channel dev3: starting datafile copy input datafile file number=00396 name=/app/ora_prod/db/apps_st/data/a_summ01.dbf output file name=+DATA/prod/datafile/apps_ts_seed.269.915022045 tag=ORA_ASM_MIGRATION RECID=12 STAMP=915022812 channel dev1: datafile copy complete, elapsed time: 00:12:57 channel dev1: starting datafile copy input datafile file number=00393 name=/app/ora_prod/db/apps_st/data/a_txn_ind01.dbf output file name=+DATA/prod/datafile/apps_ts_summary.270.915022123 tag=ORA_ASM_MIGRATION RECID=13 STAMP=915022828 channel dev3: datafile copy complete, elapsed time: 00:11:50 channel dev3: starting datafile copy input datafile file number=00015 name=/app/ora_prod/db/apps_st/data/a_txn_ind06.dbf output file name=+DATA/prod/datafile/apps_ts_media.268.915022041 tag=ORA_ASM_MIGRATION RECID=14 STAMP=915022965 channel dev4: datafile copy complete, elapsed time: 00:15:38 channel dev4: starting datafile copy input datafile file number=00404 name=/app/ora_prod/db/apps_st/data/a_txn_ind03.dbf output file name=+DATA/prod/datafile/apps_ts_tx_data.267.915022013 tag=ORA_ASM_MIGRATION RECID=15 STAMP=915023002 channel dev2: datafile copy complete, elapsed time: 00:16:32 channel dev2: starting datafile copy input datafile file number=00395 name=/app/ora_prod/db/apps_st/data/a_int01.dbf output file name=+DATA/prod/datafile/apps_ts_tx_idx.272.915022833 tag=ORA_ASM_MIGRATION RECID=16 STAMP=915023669 channel dev3: datafile copy complete, elapsed time: 00:14:04 channel dev3: starting datafile copy input datafile file number=00352 name=/app/ora_prod/db/apps_st/data/system09.dbf output file name=+DATA/prod/datafile/apps_ts_tx_idx.271.915022823 tag=ORA_ASM_MIGRATION RECID=17 STAMP=915023698 channel dev1: datafile copy complete, elapsed time: 00:14:38 channel dev1: starting datafile copy input datafile file number=00001 name=/app/ora_prod/db/apps_st/data/system01.dbf output file name=+DATA/prod/datafile/apps_ts_interface.274.915023007 tag=ORA_ASM_MIGRATION RECID=18 STAMP=915023748 channel dev2: datafile copy complete, elapsed time: 00:12:35 channel dev2: starting datafile copy input datafile file number=00002 name=/app/ora_prod/db/apps_st/data/system02.dbf output file name=+DATA/prod/datafile/apps_ts_tx_idx.273.915022981 tag=ORA_ASM_MIGRATION RECID=19 STAMP=915023787 channel dev4: datafile copy complete, elapsed time: 00:13:38 channel dev4: starting datafile copy input datafile file number=00003 name=/app/ora_prod/db/apps_st/data/system03.dbf output file name=+DATA/prod/datafile/system.276.915023707 tag=ORA_ASM_MIGRATION RECID=21 STAMP=915024715 channel dev1: datafile copy complete, elapsed time: 00:16:56 channel dev1: starting datafile copy input datafile file number=00004 name=/app/ora_prod/db/apps_st/data/system04.dbf output file name=+DATA/prod/datafile/system.275.915023677 tag=ORA_ASM_MIGRATION RECID=20 STAMP=915024710 channel dev3: datafile copy complete, elapsed time: 00:17:25 channel dev3: starting datafile copy input datafile file number=00005 name=/app/ora_prod/db/apps_st/data/system05.dbf output file name=+DATA/prod/datafile/system.277.915023763 tag=ORA_ASM_MIGRATION RECID=22 STAMP=915024730 channel dev2: datafile copy complete, elapsed time: 00:16:17 channel dev2: starting datafile copy input datafile file number=00398 name=/app/ora_prod/db/apps_st/data/a_archive01.dbf output file name=+DATA/prod/datafile/system.278.915023799 tag=ORA_ASM_MIGRATION RECID=23 STAMP=915024767 channel dev4: datafile copy complete, elapsed time: 00:16:17 channel dev4: starting datafile copy input datafile file number=00295 name=/app/ora_prod/db/apps_st/data/system06.dbf output file name=+DATA/prod/datafile/apps_ts_archive.281.915024741 tag=ORA_ASM_MIGRATION RECID=24 STAMP=915025460 channel dev2: datafile copy complete, elapsed time: 00:12:06 channel dev2: starting datafile copy input datafile file number=00351 name=/app/ora_prod/db/apps_st/data/system07.dbf output file name=+DATA/prod/datafile/system.282.915024777 tag=ORA_ASM_MIGRATION RECID=25 STAMP=915025475 channel dev4: datafile copy complete, elapsed time: 00:11:47 channel dev4: starting datafile copy input datafile file number=00354 name=/app/ora_prod/db/apps_st/data/system11.dbf output file name=+DATA/prod/datafile/system.279.915024723 tag=ORA_ASM_MIGRATION RECID=26 STAMP=915025584 channel dev1: datafile copy complete, elapsed time: 00:14:29 channel dev1: starting datafile copy input datafile file number=00008 name=/app/ora_prod/db/apps_st/data/a_queue02.dbf output file name=+DATA/prod/datafile/system.280.915024725 tag=ORA_ASM_MIGRATION RECID=27 STAMP=915025598 channel dev3: datafile copy complete, elapsed time: 00:14:44 channel dev3: starting datafile copy input datafile file number=00012 name=/app/ora_prod/db/apps_st/data/apps_ts_tools01.dbf output file name=+DATA/prod/datafile/apps_ts_queues.285.915025591 tag=ORA_ASM_MIGRATION RECID=28 STAMP=915025942 channel dev1: datafile copy complete, elapsed time: 00:05:54 channel dev1: starting datafile copy input datafile file number=00399 name=/app/ora_prod/db/apps_st/data/a_queue01.dbf output file name=+DATA/prod/datafile/apps_ts_tools.286.915025609 tag=ORA_ASM_MIGRATION RECID=29 STAMP=915025967 channel dev3: datafile copy complete, elapsed time: 00:06:04 channel dev3: starting datafile copy input datafile file number=00016 name=/app/ora_prod/db/apps_st/data/a_ref03.dbf output file name=+DATA/prod/datafile/system.283.915025469 tag=ORA_ASM_MIGRATION RECID=30 STAMP=915026003 channel dev2: datafile copy complete, elapsed time: 00:09:00 channel dev2: starting datafile copy input datafile file number=00011 name=/app/ora_prod/db/apps_st/data/sysaux01.dbf output file name=+DATA/prod/datafile/system.284.915025485 tag=ORA_ASM_MIGRATION RECID=31 STAMP=915026035 channel dev4: datafile copy complete, elapsed time: 00:09:20 channel dev4: starting datafile copy input datafile file number=00018 name=/app/ora_prod/db/apps_st/data/sysaux02.dbf output file name=+DATA/prod/datafile/sysaux.290.915026047 tag=ORA_ASM_MIGRATION RECID=32 STAMP=915026220 channel dev4: datafile copy complete, elapsed time: 00:03:00 channel dev4: starting datafile copy input datafile file number=00006 name=/app/ora_prod/db/apps_st/data/ctxd01.dbf output file name=+DATA/prod/datafile/apps_ts_seed.288.915025973 tag=ORA_ASM_MIGRATION RECID=33 STAMP=915026265 channel dev3: datafile copy complete, elapsed time: 00:05:01 channel dev3: starting datafile copy input datafile file number=00314 name=/app/ora_prod/db/apps_st/data/portal01.dbf output file name=+DATA/prod/datafile/apps_ts_queues.287.915025947 tag=ORA_ASM_MIGRATION RECID=34 STAMP=915026275 channel dev1: datafile copy complete, elapsed time: 00:05:34 channel dev1: starting datafile copy input datafile file number=00397 name=/app/ora_prod/db/apps_st/data/a_nolog01.dbf output file name=+DATA/prod/datafile/sysaux.289.915026009 tag=ORA_ASM_MIGRATION RECID=35 STAMP=915026280 channel dev2: datafile copy complete, elapsed time: 00:04:34 channel dev2: starting datafile copy input datafile file number=00009 name=/app/ora_prod/db/apps_st/data/odm.dbf output file name=+DATA/prod/datafile/ctxd.291.915026227 tag=ORA_ASM_MIGRATION RECID=36 STAMP=915026294 channel dev4: datafile copy complete, elapsed time: 00:01:11 channel dev4: starting datafile copy copying current control file output file name=+DATA/prod/datafile/odm.294.915026285 tag=ORA_ASM_MIGRATION RECID=37 STAMP=915026313 channel dev2: datafile copy complete, elapsed time: 00:00:32 channel dev2: starting datafile copy input datafile file number=00010 name=/app/ora_prod/db/apps_st/data/olap.dbf output file name=+DATA/prod/datafile/apps_ts_nologging.293.915026283 tag=ORA_ASM_MIGRATION RECID=38 STAMP=915026314 channel dev1: datafile copy complete, elapsed time: 00:00:35 channel dev1: starting datafile copy input datafile file number=00017 name=/app/ora_prod/db/apps_st/data/a_int02.dbf output file name=+DATA/prod/datafile/apps_ts_interface.297.915026319 tag=ORA_ASM_MIGRATION RECID=42 STAMP=915026328 channel dev1: datafile copy complete, elapsed time: 00:00:15 channel dev1: starting datafile copy input datafile file number=00007 name=/app/ora_prod/db/apps_st/data/owad01.dbf output file name=+DATA/prod/datafile/olap.296.915026317 tag=ORA_ASM_MIGRATION RECID=40 STAMP=915026327 channel dev2: datafile copy complete, elapsed time: 00:00:18 channel dev2: starting incremental level 0 datafile backup set channel dev2: specifying datafile(s) in backup set including current SPFILE in backup set channel dev2: starting piece 1 at 20-JUN-16 output file name=+DATA/prod/datafile/portal.292.915026277 tag=ORA_ASM_MIGRATION RECID=39 STAMP=915026327 channel dev3: datafile copy complete, elapsed time: 00:01:01 output file name=+DATA/prod/controlfile/backup.295.915026299 tag=ORA_ASM_MIGRATION RECID=41 STAMP=915026328 channel dev4: datafile copy complete, elapsed time: 00:00:35 output file name=+DATA/prod/datafile/owapub.298.915026333 tag=ORA_ASM_MIGRATION RECID=43 STAMP=915026335 channel dev1: datafile copy complete, elapsed time: 00:00:04 channel dev2: finished piece 1 at 20-JUN-16 piece handle=+DATA/prod/backupset/2016_06_20/nnsnn0_ora_asm_migration_0.299.915026335 tag=ORA_ASM_MIGRATION comment=NONE channel dev2: backup set complete, elapsed time: 00:00:03 Finished backup at 20-JUN-16 released channel: dev1 released channel: dev2 released channel: dev3 released channel: dev4 RMAN> BACKUP AS BACKUPSET SPFILE; Starting backup at 20-JUN-16 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=109 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 20-JUN-16 channel ORA_DISK_1: finished piece 1 at 20-JUN-16 piece handle=/app/ora_prod/db/tech_st/11.2.0/dbs/1hr8kcrg_1_1 tag=TAG20160620T140640 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 20-JUN-16 RMAN> shutdown immediate; database closed database dismounted Oracle instance shut down RMAN> startup mount; connected to target database (not started) Oracle instance started database mounted Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 482345864 bytes Database Buffers 570425344 bytes Redo Buffers 13905920 bytes RMAN> RESTORE SPFILE TO '+DATA/PROD/spfile/spfilePROD.ora'; Starting restore at 20-JUN-16 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=301 device type=DISK channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: restoring SPFILE output file name=+DATA/PROD/spfile/spfilePROD.ora channel ORA_DISK_1: reading from backup piece /app/ora_prod/db/tech_st/11.2.0/dbs/1hr8kcrg_1_1 channel ORA_DISK_1: piece handle=/app/ora_prod/db/tech_st/11.2.0/dbs/1hr8kcrg_1_1 tag=TAG20160620T140640 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:07 Finished restore at 20-JUN-16 RMAN> STARTUP FORCE NOMOUNT; Oracle instance started Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 482345864 bytes Database Buffers 570425344 bytes Redo Buffers 13905920 bytes
修改控制文件路径:
[oraprod@ebsprod ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 20 14:13:26 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST='+DATA' SID='*'; System altered. SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=100G SID='*'; System altered. SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+FRA' SID='*'; System altered. SQL> STARTUP FORCE NOMOUNT; ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 482345864 bytes Database Buffers 570425344 bytes Redo Buffers 13905920 bytes SQL> ALTER SYSTEM SET CONTROL_FILES='+DATA','+FRA' SCOPE=SPFILE SID='*'; System altered. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
还原控制文件到ASM磁盘组上
[oraprod@ebsprod ~]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Mon Jun 20 14:15:20 2016 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: PROD (not mounted) RMAN> STARTUP FORCE NOMOUNT; Oracle instance started Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 482345864 bytes Database Buffers 570425344 bytes Redo Buffers 13905920 bytes RMAN> RESTORE CONTROLFILE FROM '/app/ora_prod/db/apps_st/data/cntrl01.dbf'; Starting restore at 20-JUN-16 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=307 device type=DISK channel ORA_DISK_1: copied control file copy output file name=+DATA/prod/controlfile/current.301.915027381 output file name=+FRA/prod/controlfile/current.256.915027385 Finished restore at 20-JUN-16 RMAN> ALTER DATABASE MOUNT; database mounted released channel: ORA_DISK_1
切换datafile:
RMAN> SWITCH DATABASE TO COPY; RUN { ALLOCATE CHANNEL dev1 DEVICE TYPE DISK; ALLOCATE CHANNEL dev2 DEVICE TYPE DISK; ALLOCATE CHANNEL dev3 DEVICE TYPE DISK; ALLOCATE CHANNEL dev4 DEVICE TYPE DISK; RECOVER DATABASE; } datafile 1 switched to datafile copy "+DATA/prod/datafile/system.276.915023707" datafile 2 switched to datafile copy "+DATA/prod/datafile/system.277.915023763" datafile 3 switched to datafile copy "+DATA/prod/datafile/system.278.915023799" datafile 4 switched to datafile copy "+DATA/prod/datafile/system.279.915024723" datafile 5 switched to datafile copy "+DATA/prod/datafile/system.280.915024725" datafile 6 switched to datafile copy "+DATA/prod/datafile/ctxd.291.915026227" datafile 7 switched to datafile copy "+DATA/prod/datafile/owapub.298.915026333" datafile 8 switched to datafile copy "+DATA/prod/datafile/apps_ts_queues.285.915025591" datafile 9 switched to datafile copy "+DATA/prod/datafile/odm.294.915026285" datafile 10 switched to datafile copy "+DATA/prod/datafile/olap.296.915026317" datafile 11 switched to datafile copy "+DATA/prod/datafile/sysaux.289.915026009" datafile 12 switched to datafile copy "+DATA/prod/datafile/apps_ts_tools.286.915025609" datafile 13 switched to datafile copy "+DATA/prod/datafile/system.259.915017345" datafile 14 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_data.256.915017345" datafile 15 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_idx.272.915022833" datafile 16 switched to datafile copy "+DATA/prod/datafile/apps_ts_seed.288.915025973" datafile 17 switched to datafile copy "+DATA/prod/datafile/apps_ts_interface.297.915026319" datafile 18 switched to datafile copy "+DATA/prod/datafile/sysaux.290.915026047" datafile 288 switched to datafile copy "+DATA/prod/datafile/system.258.915017345" datafile 295 switched to datafile copy "+DATA/prod/datafile/system.282.915024777" datafile 314 switched to datafile copy "+DATA/prod/datafile/portal.292.915026277" datafile 351 switched to datafile copy "+DATA/prod/datafile/system.283.915025469" datafile 352 switched to datafile copy "+DATA/prod/datafile/system.275.915023677" datafile 353 switched to datafile copy "+DATA/prod/datafile/system.262.915019421" datafile 354 switched to datafile copy "+DATA/prod/datafile/system.284.915025485" datafile 379 switched to datafile copy "+DATA/prod/datafile/apps_undots1.264.915020925" datafile 392 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_data.267.915022013" datafile 393 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_idx.271.915022823" datafile 394 switched to datafile copy "+DATA/prod/datafile/apps_ts_seed.265.915020959" datafile 395 switched to datafile copy "+DATA/prod/datafile/apps_ts_interface.274.915023007" datafile 396 switched to datafile copy "+DATA/prod/datafile/apps_ts_summary.270.915022123" datafile 397 switched to datafile copy "+DATA/prod/datafile/apps_ts_nologging.293.915026283" datafile 398 switched to datafile copy "+DATA/prod/datafile/apps_ts_archive.281.915024741" datafile 399 switched to datafile copy "+DATA/prod/datafile/apps_ts_queues.287.915025947" datafile 400 switched to datafile copy "+DATA/prod/datafile/apps_ts_media.268.915022041" datafile 401 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_data.260.915019419" datafile 402 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_data.257.915017345" datafile 403 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_idx.266.915021079" datafile 404 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_idx.273.915022981" datafile 405 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_idx.263.915020895" datafile 406 switched to datafile copy "+DATA/prod/datafile/apps_ts_tx_idx.261.915019419" datafile 407 switched to datafile copy "+DATA/prod/datafile/apps_ts_seed.269.915022045" RMAN> 2> 3> 4> 5> 6> 7> 8> allocated channel: dev1 channel dev1: SID=107 device type=DISK allocated channel: dev2 channel dev2: SID=207 device type=DISK allocated channel: dev3 channel dev3: SID=308 device type=DISK allocated channel: dev4 channel dev4: SID=7 device type=DISK Starting recover at 20-JUN-16 starting media recovery 557.dbf 557.dbf archived log file name=/app/ora_prod/db/tech_st/11.2.0/dbs/arch2_73_913677557.dbf thread=1 sequence=73 media recovery complete, elapsed time: 00:00:16 Finished recover at 20-JUN-16 released channel: dev1 released channel: dev2 released channel: dev3 released channel: dev4
[oraprod@ebsprod ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 20 14:19:54 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '+DATA'; Database altered. SQL> ALTER DATABASE FLASHBACK ON; Database altered. SQL> ALTER DATABASE OPEN; Database altered.
处理临时表空间:
SQL> select name from v$tempfile; SQL> ALTER DATABASE TEMPFILE '/app/ora_prod/db/apps_st/data/temp01.dbf' DROP; Database altered. SQL> ALTER DATABASE TEMPFILE '/app/ora_prod/db/apps_st/data/temp02.dbf' DROP; Database altered. SQL> ALTER TABLESPACE TEMP1 ADD TEMPFILE; SQL> ALTER TABLESPACE TEMP2 ADD TEMPFILE;
处理日志文件:
DECLARE CURSOR rlc IS SELECT GROUP# GRP, THREAD# THR, BYTES, 'NO' SRL FROM V$LOG UNION SELECT GROUP# GRP, THREAD# THR, BYTES, 'YES' SRL FROM V$STANDBY_LOG ORDER BY 1; stmt VARCHAR2(2048); BEGIN FOR rlcRec IN rlc LOOP IF (rlcRec.srl = 'YES') THEN stmt := 'ALTER DATABASE ADD STANDBY LOGFILE THREAD ' || rlcRec.thr || ' SIZE ' || rlcRec.bytes; EXECUTE IMMEDIATE stmt; stmt := 'ALTER DATABASE DROP STANDBY LOGFILE GROUP ' || rlcRec.grp; EXECUTE IMMEDIATE stmt; ELSE stmt := 'ALTER DATABASE ADD LOGFILE THREAD ' || rlcRec.thr || ' SIZE ' || rlcRec.bytes; EXECUTE IMMEDIATE stmt; BEGIN stmt := 'ALTER DATABASE DROP LOGFILE GROUP ' || rlcRec.grp; DBMS_OUTPUT.PUT_LINE(stmt); EXECUTE IMMEDIATE stmt; EXCEPTION WHEN OTHERS THEN EXECUTE IMMEDIATE 'ALTER SYSTEM SWITCH LOGFILE'; EXECUTE IMMEDIATE 'ALTER SYSTEM CHECKPOINT GLOBAL'; EXECUTE IMMEDIATE stmt; END; END IF; END LOOP; END;
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。