|
1.进行自包含集检查:
- begin
- dbms_tts.transport_set_check('USERS');
- end;
- /
- select * from transport_set_violations;
- alter table aud$ move tablespace system;
复制代码 2. 确定一下有没有0级的全库备份:
- run {
- allocate channel oem_disk_backup1 type disk ;
- allocate channel oem_disk_backup2 type disk ;
- allocate channel oem_disk_backup3 type disk ;
- allocate channel oem_disk_backup4 type disk ;
- allocate channel oem_disk_backup5 type disk ;
- allocate channel oem_disk_backup6 type disk ;
- allocate channel oem_disk_backup7 type disk ;
- allocate channel oem_disk_backup8 type disk ;
- recover copy of database with tag 'ORAOEM_LEVEL_0';
- backup incremental level 1 copies=1 for recover of copy with tag 'ORAOEM_LEVEL_0' database;
- release channel oem_disk_backup1;
- release channel oem_disk_backup2;
- release channel oem_disk_backup3;
- release channel oem_disk_backup4;
- release channel oem_disk_backup5;
- release channel oem_disk_backup6;
- release channel oem_disk_backup7;
- release channel oem_disk_backup8;
- allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
- allocate channel oem_sbt_backup2 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
- backup archivelog all not backed up;
- }
- allocate channel for maintenance device type 'SBT_TAPE' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
- delete noprompt obsolete recovery window of 31 days device type 'SBT_TAPE';
复制代码- [oracle@classroom ~]$ rman target / cmdfile=/home/oracle/day1.rcv
- Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:18:43 2020
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1574592120)
- RMAN> run {
- 2> allocate channel oem_disk_backup1 type disk ;
- 3> allocate channel oem_disk_backup2 type disk ;
- 4> allocate channel oem_disk_backup3 type disk ;
- 5> allocate channel oem_disk_backup4 type disk ;
- 6> allocate channel oem_disk_backup5 type disk ;
- 7> allocate channel oem_disk_backup6 type disk ;
- 8> allocate channel oem_disk_backup7 type disk ;
- 9> allocate channel oem_disk_backup8 type disk ;
- 10> recover copy of database with tag 'ORAOEM_LEVEL_0';
- 11> backup incremental level 1 copies=1 for recover of copy with tag 'ORAOEM_LEVEL_0' database;
- 12> release channel oem_disk_backup1;
- 13> release channel oem_disk_backup2;
- 14> release channel oem_disk_backup3;
- 15> release channel oem_disk_backup4;
- 16> release channel oem_disk_backup5;
- 17> release channel oem_disk_backup6;
- 18> release channel oem_disk_backup7;
- 19> release channel oem_disk_backup8;
- 20> allocate channel oem_sbt_backup1 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
- 21> allocate channel oem_sbt_backup2 type 'SBT_TAPE' format '%d_%U' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
- 22> backup archivelog all not backed up;
- 23> }
- 24> allocate channel for maintenance device type 'SBT_TAPE' parms "ENV=(OB_MEDIA_FAMILY=classroom)";
- 25> delete noprompt obsolete recovery window of 31 days device type 'SBT_TAPE';
- 26>
- 27>
- 28>
- using target database control file instead of recovery catalog
- allocated channel: oem_disk_backup1
- channel oem_disk_backup1: SID=372 device type=DISK
- allocated channel: oem_disk_backup2
- channel oem_disk_backup2: SID=20 device type=DISK
- allocated channel: oem_disk_backup3
- channel oem_disk_backup3: SID=138 device type=DISK
- allocated channel: oem_disk_backup4
- channel oem_disk_backup4: SID=255 device type=DISK
- allocated channel: oem_disk_backup5
- channel oem_disk_backup5: SID=373 device type=DISK
- allocated channel: oem_disk_backup6
- channel oem_disk_backup6: SID=21 device type=DISK
- allocated channel: oem_disk_backup7
- channel oem_disk_backup7: SID=139 device type=DISK
- allocated channel: oem_disk_backup8
- channel oem_disk_backup8: SID=258 device type=DISK
- Starting recover at 2020-11-24:20:18:50
- channel oem_disk_backup1: starting incremental datafile backup set restore
- channel oem_disk_backup1: specifying datafile copies to recover
- recovering datafile copy file number=00002 name=+FRA/ORCL/DATAFILE/sysaux.394.1056559335
- recovering datafile copy file number=00009 name=+FRA/ORCL/DATAFILE/tbsocp05_test.415.1056559367
- channel oem_disk_backup1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.398.1056559787
- channel oem_disk_backup2: starting incremental datafile backup set restore
- channel oem_disk_backup2: specifying datafile copies to recover
- recovering datafile copy file number=00003 name=+FRA/ORCL/DATAFILE/undotbs1.393.1056559337
- recovering datafile copy file number=00016 name=+FRA/ORCL/DATAFILE/tbs_oltp.416.1056559367
- channel oem_disk_backup2: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.400.1056559787
- channel oem_disk_backup3: starting incremental datafile backup set restore
- channel oem_disk_backup3: specifying datafile copies to recover
- recovering datafile copy file number=00005 name=+FRA/ORCL/DATAFILE/example.403.1056559335
- channel oem_disk_backup3: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.399.1056559787
- channel oem_disk_backup4: starting incremental datafile backup set restore
- channel oem_disk_backup4: specifying datafile copies to recover
- recovering datafile copy file number=00001 name=+FRA/ORCL/DATAFILE/system.422.1056559341
- recovering datafile copy file number=00015 name=+FRA/ORCL/DATAFILE/tbs_basic.413.1056559365
- channel oem_disk_backup4: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.418.1056559787
- channel oem_disk_backup5: starting incremental datafile backup set restore
- channel oem_disk_backup5: specifying datafile copies to recover
- recovering datafile copy file number=00004 name=+FRA/ORCL/DATAFILE/users.426.1056559339
- recovering datafile copy file number=00014 name=+FRA/ORCL/DATAFILE/tbs_nocompression.408.1056559361
- channel oem_disk_backup5: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.373.1056559787
- channel oem_disk_backup6: starting incremental datafile backup set restore
- channel oem_disk_backup6: specifying datafile copies to recover
- recovering datafile copy file number=00006 name=+FRA/ORCL/DATAFILE/tbs1.387.1056559339
- recovering datafile copy file number=00011 name=+FRA/ORCL/DATAFILE/tbsbig.424.1056559359
- channel oem_disk_backup6: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.410.1056559787
- channel oem_disk_backup7: starting incremental datafile backup set restore
- channel oem_disk_backup7: specifying datafile copies to recover
- recovering datafile copy file number=00007 name=+FRA/ORCL/DATAFILE/tbs2.425.1056559359
- recovering datafile copy file number=00008 name=+FRA/ORCL/DATAFILE/tbs3.423.1056559345
- channel oem_disk_backup7: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.258.1056559787
- channel oem_disk_backup8: starting incremental datafile backup set restore
- channel oem_disk_backup8: specifying datafile copies to recover
- recovering datafile copy file number=00010 name=+FRA/ORCL/DATAFILE/tbsuniform.421.1056559337
- recovering datafile copy file number=00012 name=+FRA/ORCL/DATAFILE/tbsuniform.427.1056559361
- channel oem_disk_backup8: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.409.1056559787
- channel oem_disk_backup1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.398.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup1: restored backup piece 1
- channel oem_disk_backup1: restore complete, elapsed time: 00:00:01
- channel oem_disk_backup1: starting incremental datafile backup set restore
- channel oem_disk_backup1: specifying datafile copies to recover
- recovering datafile copy file number=00013 name=+FRA/ORCL/DATAFILE/tbs32k.396.1056559367
- channel oem_disk_backup1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.392.1056559791
- channel oem_disk_backup2: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.400.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup2: restored backup piece 1
- channel oem_disk_backup2: restore complete, elapsed time: 00:00:02
- channel oem_disk_backup3: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.399.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup3: restored backup piece 1
- channel oem_disk_backup3: restore complete, elapsed time: 00:00:02
- channel oem_disk_backup4: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.418.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup4: restored backup piece 1
- channel oem_disk_backup4: restore complete, elapsed time: 00:00:02
- channel oem_disk_backup5: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.373.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup5: restored backup piece 1
- channel oem_disk_backup5: restore complete, elapsed time: 00:00:02
- channel oem_disk_backup1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.392.1056559791 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup1: restored backup piece 1
- channel oem_disk_backup1: restore complete, elapsed time: 00:00:01
- channel oem_disk_backup6: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.410.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup6: restored backup piece 1
- channel oem_disk_backup6: restore complete, elapsed time: 00:00:03
- channel oem_disk_backup7: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.258.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup7: restored backup piece 1
- channel oem_disk_backup7: restore complete, elapsed time: 00:00:02
- channel oem_disk_backup8: piece handle=+FRA/ORCL/BACKUPSET/2020_11_15/nnndn1_oraoem_level_0_0.409.1056559787 tag=ORAOEM_LEVEL_0
- channel oem_disk_backup8: restored backup piece 1
- channel oem_disk_backup8: restore complete, elapsed time: 00:00:02
- Finished recover at 2020-11-24:20:18:55
- Starting backup at 2020-11-24:20:18:56
- channel oem_disk_backup1: starting incremental level 1 datafile backup set
- channel oem_disk_backup1: specifying datafile(s) in backup set
- input datafile file number=00005 name=+DATA/ORCL/DATAFILE/example.279.1054329825
- channel oem_disk_backup1: starting piece 1 at 2020-11-24:20:18:58
- channel oem_disk_backup2: starting incremental level 1 datafile backup set
- channel oem_disk_backup2: specifying datafile(s) in backup set
- input datafile file number=00002 name=+DATA/ORCL/DATAFILE/sysaux.282.1054329823
- input datafile file number=00009 name=+DATA/ORCL/DATAFILE/tbsocp05_test.284.1054152837
- channel oem_disk_backup2: starting piece 1 at 2020-11-24:20:18:58
- channel oem_disk_backup3: starting incremental level 1 datafile backup set
- channel oem_disk_backup3: specifying datafile(s) in backup set
- input datafile file number=00003 name=+DATA/ORCL/DATAFILE/undotbs1.286.1054329823
- input datafile file number=00016 name=+DATA/ORCL/DATAFILE/tbs_oltp.293.1054936567
- channel oem_disk_backup3: starting piece 1 at 2020-11-24:20:18:58
- channel oem_disk_backup4: starting incremental level 1 datafile backup set
- channel oem_disk_backup4: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/ORCL/DATAFILE/system.263.1054329825
- input datafile file number=00015 name=+DATA/ORCL/DATAFILE/tbs_basic.292.1054936269
- channel oem_disk_backup4: starting piece 1 at 2020-11-24:20:18:58
- channel oem_disk_backup5: starting incremental level 1 datafile backup set
- channel oem_disk_backup5: specifying datafile(s) in backup set
- input datafile file number=00004 name=+DATA/orcl/DATAFILE/users.262.1054329889
- input datafile file number=00014 name=+DATA/ORCL/DATAFILE/tbs_nocompression.291.1054936255
- channel oem_disk_backup5: starting piece 1 at 2020-11-24:20:18:59
- channel oem_disk_backup6: starting incremental level 1 datafile backup set
- channel oem_disk_backup6: specifying datafile(s) in backup set
- input datafile file number=00006 name=+DATA/ORCL/DATAFILE/tbs1.287.1050417229
- input datafile file number=00011 name=+DATA/ORCL/DATAFILE/tbsbig.280.1054764585
- channel oem_disk_backup6: starting piece 1 at 2020-11-24:20:18:59
- channel oem_disk_backup7: starting incremental level 1 datafile backup set
- channel oem_disk_backup7: specifying datafile(s) in backup set
- input datafile file number=00010 name=+DATA/ORCL/DATAFILE/tbsuniform.278.1054763341
- input datafile file number=00012 name=+DATA/ORCL/DATAFILE/tbsuniform.277.1054764627
- channel oem_disk_backup7: starting piece 1 at 2020-11-24:20:18:59
- channel oem_disk_backup8: starting incremental level 1 datafile backup set
- channel oem_disk_backup8: specifying datafile(s) in backup set
- input datafile file number=00008 name=+DATA/ORCL/DATAFILE/tbs3.289.1050418001
- input datafile file number=00007 name=+DATA/ORCL/DATAFILE/tbs2.288.1050417617
- channel oem_disk_backup8: starting piece 1 at 2020-11-24:20:18:59
- channel oem_disk_backup1: finished piece 1 at 2020-11-24:20:19:03
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.411.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup1: backup set complete, elapsed time: 00:00:05
- channel oem_disk_backup1: starting incremental level 1 datafile backup set
- channel oem_disk_backup1: specifying datafile(s) in backup set
- channel oem_disk_backup2: finished piece 1 at 2020-11-24:20:19:03
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.376.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup2: backup set complete, elapsed time: 00:00:05
- channel oem_disk_backup2: starting incremental level 1 datafile backup set
- channel oem_disk_backup2: specifying datafile(s) in backup set
- input datafile file number=00013 name=+DATA/ORCL/DATAFILE/tbs32k.259.1054931811
- channel oem_disk_backup2: starting piece 1 at 2020-11-24:20:19:03
- channel oem_disk_backup3: finished piece 1 at 2020-11-24:20:19:03
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.407.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup3: backup set complete, elapsed time: 00:00:05
- channel oem_disk_backup3: starting incremental level 1 datafile backup set
- channel oem_disk_backup3: specifying datafile(s) in backup set
- including current SPFILE in backup set
- channel oem_disk_backup3: starting piece 1 at 2020-11-24:20:19:03
- channel oem_disk_backup4: finished piece 1 at 2020-11-24:20:19:03
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.346.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup4: backup set complete, elapsed time: 00:00:05
- channel oem_disk_backup5: finished piece 1 at 2020-11-24:20:19:04
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.405.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup5: backup set complete, elapsed time: 00:00:05
- channel oem_disk_backup6: finished piece 1 at 2020-11-24:20:19:04
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.406.1057349941 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup6: backup set complete, elapsed time: 00:00:05
- including current control file in backup set
- channel oem_disk_backup1: starting piece 1 at 2020-11-24:20:19:04
- channel oem_disk_backup7: finished piece 1 at 2020-11-24:20:19:04
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.404.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup7: backup set complete, elapsed time: 00:00:05
- channel oem_disk_backup8: finished piece 1 at 2020-11-24:20:19:04
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.414.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup8: backup set complete, elapsed time: 00:00:05
- channel oem_disk_backup3: finished piece 1 at 2020-11-24:20:19:04
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnsnn1_oraoem_level_0_0.419.1057349943 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup3: backup set complete, elapsed time: 00:00:01
- channel oem_disk_backup1: finished piece 1 at 2020-11-24:20:19:05
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/ncnnn1_oraoem_level_0_0.437.1057349945 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup1: backup set complete, elapsed time: 00:00:01
- channel oem_disk_backup2: finished piece 1 at 2020-11-24:20:19:05
- piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.371.1057349945 tag=ORAOEM_LEVEL_0 comment=NONE
- channel oem_disk_backup2: backup set complete, elapsed time: 00:00:02
- Finished backup at 2020-11-24:20:19:05
- released channel: oem_disk_backup1
- released channel: oem_disk_backup2
- released channel: oem_disk_backup3
- released channel: oem_disk_backup4
- released channel: oem_disk_backup5
- released channel: oem_disk_backup6
- released channel: oem_disk_backup7
- released channel: oem_disk_backup8
- allocated channel: oem_sbt_backup1
- channel oem_sbt_backup1: SID=372 device type=SBT_TAPE
- channel oem_sbt_backup1: Oracle Secure Backup
- allocated channel: oem_sbt_backup2
- channel oem_sbt_backup2: SID=20 device type=SBT_TAPE
- channel oem_sbt_backup2: Oracle Secure Backup
- Starting backup at 2020-11-24:20:19:19
- current log archived
- skipping archived logs of thread 1 from sequence 1 to 2; already backed up
- channel oem_sbt_backup1: starting archived log backup set
- channel oem_sbt_backup1: specifying archived log(s) in backup set
- input archived log thread=1 sequence=3 RECID=24 STAMP=1056743446
- input archived log thread=1 sequence=4 RECID=25 STAMP=979503940
- channel oem_sbt_backup1: starting piece 1 at 2020-11-24:20:19:20
- channel oem_sbt_backup2: starting archived log backup set
- channel oem_sbt_backup2: specifying archived log(s) in backup set
- input archived log thread=1 sequence=5 RECID=26 STAMP=1057347934
- input archived log thread=1 sequence=6 RECID=27 STAMP=1057349960
- channel oem_sbt_backup2: starting piece 1 at 2020-11-24:20:19:20
- channel oem_sbt_backup1: finished piece 1 at 2020-11-24:20:19:45
- piece handle=ORCL_2pvgboa8_1_1 tag=TAG20201124T201920 comment=API Version 2.0,MMS Version 12.1.0.2
- channel oem_sbt_backup1: backup set complete, elapsed time: 00:00:25
- channel oem_sbt_backup2: finished piece 1 at 2020-11-24:20:19:45
- piece handle=ORCL_2qvgboa8_1_1 tag=TAG20201124T201920 comment=API Version 2.0,MMS Version 12.1.0.2
- channel oem_sbt_backup2: backup set complete, elapsed time: 00:00:25
- Finished backup at 2020-11-24:20:19:45
- released channel: oem_sbt_backup1
- released channel: oem_sbt_backup2
- allocated channel: ORA_MAINT_SBT_TAPE_1
- channel ORA_MAINT_SBT_TAPE_1: SID=372 device type=SBT_TAPE
- channel ORA_MAINT_SBT_TAPE_1: Oracle Secure Backup
- no obsolete backups found
- Recovery Manager complete.
- [oracle@classroom ~]$
复制代码 3. (待验证)最好把默认通道设为磁盘通道(原因是,待会创建chrone实例的时候,用磁盘通道创建):
- [oracle@classroom ~]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:25:03 2020
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1574592120)
- RMAN> show all;
- using target database control file instead of recovery catalog
- RMAN configuration parameters for database with db_unique_name ORCL are:
- CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
- CONFIGURE BACKUP OPTIMIZATION OFF; # default
- CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
- CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
- CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=classroom)';
- CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=classroom)';
- CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS "ENV=(OB_MEDIA_FAMILY=classroom)";
- CONFIGURE MAXSETSIZE TO UNLIMITED; # default
- CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
- CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
- CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
- CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
- CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_2/dbs/snapcf_orcl.f'; # default
- RMAN> CONFIGURE DEFAULT DEVICE TYPE TO disk;
- old RMAN configuration parameters:
- CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
- new RMAN configuration parameters:
- CONFIGURE DEFAULT DEVICE TYPE TO DISK;
- new RMAN configuration parameters are successfully stored
- RMAN> show all;
- RMAN configuration parameters for database with db_unique_name ORCL are:
- CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
- CONFIGURE BACKUP OPTIMIZATION OFF; # default
- CONFIGURE DEFAULT DEVICE TYPE TO DISK;
- CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
- CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
- CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DEVICE TYPE DISK PARALLELISM 8 BACKUP TYPE TO BACKUPSET;
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
- CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
- CONFIGURE CHANNEL 1 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=classroom)';
- CONFIGURE CHANNEL 2 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_MEDIA_FAMILY=classroom)';
- CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS "ENV=(OB_MEDIA_FAMILY=classroom)";
- CONFIGURE MAXSETSIZE TO UNLIMITED; # default
- CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
- CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
- CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
- CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
- CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
- CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_2/dbs/snapcf_orcl.f'; # default
- RMAN>
复制代码 4. 把时间换算成SCN:
- select timestamp_to_scn(to_date('2020-11-24:20:33:39','YYYY-MM-DD:HH24:MI:SS')) from dual;
复制代码
5. 特点:
- [oracle@classroom trace]$ . oraenv
- ORACLE_SID = [orcl2] ? orcl
- The Oracle base remains unchanged with value /u01/app/oracle
- [oracle@classroom trace]$ sqlplus /nolog
- SQL*Plus: Release 12.1.0.2.0 Production on 星期二 11月 24 20:45:51 2020
- Copyright (c) 1982, 2014, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> select open_mode from v$database;
- OPEN_MODE
- --------------------
- READ WRITE
- SQL>
复制代码 6. 抓取到的内存实例:
- [root@classroom ~]# ps aux | grep ymms
- oracle 31190 0.0 0.3 2484960 53240 ? Ss 20:55 0:00 ora_pmon_ymms
- oracle 31192 0.1 0.3 2484960 51680 ? Ss 20:55 0:00 ora_psp0_ymms
- oracle 31195 0.6 0.3 2484960 51976 ? Ss 20:55 0:00 ora_vktm_ymms
- oracle 31199 0.0 0.3 2484960 51844 ? Ss 20:55 0:00 ora_gen0_ymms
- oracle 31201 1.1 0.7 2484960 110900 ? Ss 20:55 0:00 ora_mman_ymms
- oracle 31205 0.0 0.3 2484960 49460 ? Ss 20:55 0:00 ora_diag_ymms
- oracle 31207 0.0 0.3 2484960 51844 ? Ss 20:55 0:00 ora_dbrm_ymms
- oracle 31209 0.0 0.3 2484960 49456 ? Ss 20:55 0:00 ora_vkrm_ymms
- oracle 31211 0.0 0.3 2486496 55148 ? Ss 20:55 0:00 ora_dia0_ymms
- oracle 31213 0.0 0.3 2491608 58440 ? Ss 20:55 0:00 ora_dbw0_ymms
- oracle 31215 0.0 0.3 2484960 51268 ? Ss 20:55 0:00 ora_lgwr_ymms
- oracle 31217 0.0 0.3 2484960 54664 ? Ss 20:55 0:00 ora_ckpt_ymms
- oracle 31221 0.0 0.3 2484956 50952 ? Ss 20:55 0:00 ora_lg00_ymms
- oracle 31223 0.0 0.3 2484960 49384 ? Ss 20:55 0:00 ora_smon_ymms
- oracle 31225 0.0 0.3 2484956 50828 ? Ss 20:55 0:00 ora_lg01_ymms
- oracle 31227 0.0 0.3 2484960 49412 ? Ss 20:55 0:00 ora_reco_ymms
- oracle 31229 0.1 0.3 2490740 52564 ? Ss 20:55 0:00 ora_lreg_ymms
- oracle 31233 0.0 0.3 2484960 51592 ? Ss 20:55 0:00 ora_pxmn_ymms
- oracle 31236 0.0 0.3 2484960 53592 ? Ss 20:55 0:00 ora_mmon_ymms
- oracle 31238 0.0 0.3 2484960 53128 ? Ss 20:55 0:00 ora_mmnl_ymms
- oracle 31251 1.8 0.5 2495304 89956 ? Ss 20:55 0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
- oracle 31262 0.5 0.4 2495240 71924 ? Rs 20:55 0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
- oracle 31303 0.3 0.4 2496788 74972 ? Ss 20:55 0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
- oracle 31320 0.2 0.4 2496480 67988 ? Ss 20:55 0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
- oracle 31348 0.3 0.4 2493872 66120 ? Ss 20:55 0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
- oracle 31354 0.6 0.4 2493868 65952 ? Ss 20:55 0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
- oracle 31363 2.0 0.4 2493872 65608 ? Ss 20:55 0:00 oracleymms (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
- root 31369 0.0 0.0 224856 1068 pts/4 S+ 20:55 0:00 grep --color=auto ymms
- [root@classroom ~]#
复制代码
下面是执行过程:
- oracle@classroom trace]$ rman target /
- Recovery Manager: Release 12.1.0.2.0 - Production on 星期二 11月 24 20:52:34 2020
- Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1574592120)
- RMAN> recover tablespace users until scn 12273726
- 2> auxiliary destination '/u01/app/oracle/oradata';
- Starting recover at 2020-11-24:20:54:36
- using target database control file instead of recovery catalog
- current log archived
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=141 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=375 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=139 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=258 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=377 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=22 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=124 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=256 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=357 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=20 device type=DISK
- RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time
- List of tablespaces expected to have UNDO segments
- Tablespace SYSTEM
- Tablespace UNDOTBS1
- Creating automatic instance, with SID='ymms'
- initialization parameters used for automatic instance:
- db_name=ORCL
- db_unique_name=ymms_pitr_ORCL
- compatible=12.1.0.2.0
- db_block_size=8192
- db_files=200
- diagnostic_dest=/u01/app/oracle
- _system_trig_enabled=FALSE
- sga_target=2048M
- processes=200
- db_32k_cache_size=16M
- db_create_file_dest=/u01/app/oracle/oradata
- log_archive_dest_1='location=/u01/app/oracle/oradata'
- #No auxiliary parameter file used
- starting up automatic instance ORCL
- Oracle instance started
- Total System Global Area 2147483648 bytes
- Fixed Size 2926472 bytes
- Variable Size 503318648 bytes
- Database Buffers 1627389952 bytes
- Redo Buffers 13848576 bytes
- Automatic instance created
- List of tablespaces that have been dropped from the target database:
- Tablespace USERS
- contents of Memory Script:
- {
- # set requested point in time
- set until scn 12273726;
- # restore the controlfile
- restore clone controlfile;
-
- # mount the controlfile
- sql clone 'alter database mount clone database';
-
- # archive current online log
- sql 'alter system archive log current';
- # avoid unnecessary autobackups for structural changes during TSPITR
- sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
- }
- executing Memory Script
- executing command: SET until clause
- Starting restore at 2020-11-24:20:55:44
- allocated channel: ORA_AUX_SBT_TAPE_1
- channel ORA_AUX_SBT_TAPE_1: SID=6 device type=SBT_TAPE
- channel ORA_AUX_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_AUX_SBT_TAPE_2
- channel ORA_AUX_SBT_TAPE_2: SID=89 device type=SBT_TAPE
- channel ORA_AUX_SBT_TAPE_2: Oracle Secure Backup
- allocated channel: ORA_AUX_DISK_1
- channel ORA_AUX_DISK_1: SID=169 device type=DISK
- allocated channel: ORA_AUX_DISK_2
- channel ORA_AUX_DISK_2: SID=246 device type=DISK
- allocated channel: ORA_AUX_DISK_3
- channel ORA_AUX_DISK_3: SID=7 device type=DISK
- allocated channel: ORA_AUX_DISK_4
- channel ORA_AUX_DISK_4: SID=90 device type=DISK
- allocated channel: ORA_AUX_DISK_5
- channel ORA_AUX_DISK_5: SID=170 device type=DISK
- allocated channel: ORA_AUX_DISK_6
- channel ORA_AUX_DISK_6: SID=251 device type=DISK
- allocated channel: ORA_AUX_DISK_7
- channel ORA_AUX_DISK_7: SID=8 device type=DISK
- allocated channel: ORA_AUX_DISK_8
- channel ORA_AUX_DISK_8: SID=91 device type=DISK
- channel ORA_AUX_DISK_1: starting datafile backup set restore
- channel ORA_AUX_DISK_1: restoring control file
- channel ORA_AUX_DISK_1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/ncnnf0_labs-14-contr-before-drop_0.431.1057350805
- channel ORA_AUX_DISK_1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/ncnnf0_labs-14-contr-before-drop_0.431.1057350805 tag=LABS-14-CONTR-BEFORE-DROP
- channel ORA_AUX_DISK_1: restored backup piece 1
- channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:00
- output file name=/u01/app/oracle/oradata/ORCL/controlfile/o1_mf_hvt0qopt_.ctl
- Finished restore at 2020-11-24:20:56:22
- sql statement: alter database mount clone database
- sql statement: alter system archive log current
- sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
- contents of Memory Script:
- {
- # set requested point in time
- set until scn 12273726;
- # set destinations for recovery set and auxiliary set datafiles
- set newname for clone datafile 1 to new;
- set newname for clone datafile 3 to new;
- set newname for clone datafile 2 to new;
- set newname for clone tempfile 1 to new;
- set newname for datafile 4 to new;
- # switch all tempfiles
- switch clone tempfile all;
- # restore the tablespaces in the recovery set and the auxiliary set
- restore clone datafile 1, 3, 2, 4;
-
- switch clone datafile all;
- }
- executing Memory Script
- executing command: SET until clause
- executing command: SET NEWNAME
- executing command: SET NEWNAME
- executing command: SET NEWNAME
- executing command: SET NEWNAME
- executing command: SET NEWNAME
- renamed tempfile 1 to /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_%u_.tmp in control file
- Starting restore at 2020-11-24:20:56:30
- using channel ORA_AUX_SBT_TAPE_1
- using channel ORA_AUX_SBT_TAPE_2
- using channel ORA_AUX_DISK_1
- using channel ORA_AUX_DISK_2
- using channel ORA_AUX_DISK_3
- using channel ORA_AUX_DISK_4
- using channel ORA_AUX_DISK_5
- using channel ORA_AUX_DISK_6
- using channel ORA_AUX_DISK_7
- using channel ORA_AUX_DISK_8
- channel ORA_AUX_DISK_1: restoring datafile 00001
- input datafile copy RECID=73 STAMP=1057349934 file name=+FRA/ORCL/DATAFILE/system.422.1056559341
- destination for restore of datafile 00001: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_%u_.dbf
- channel ORA_AUX_DISK_2: restoring datafile 00003
- input datafile copy RECID=68 STAMP=1057349933 file name=+FRA/ORCL/DATAFILE/undotbs1.393.1056559337
- destination for restore of datafile 00003: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_%u_.dbf
- channel ORA_AUX_DISK_3: restoring datafile 00002
- input datafile copy RECID=69 STAMP=1057349933 file name=+FRA/ORCL/DATAFILE/sysaux.394.1056559335
- destination for restore of datafile 00002: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_%u_.dbf
- channel ORA_AUX_DISK_4: restoring datafile 00004
- input datafile copy RECID=75 STAMP=1057349934 file name=+FRA/ORCL/DATAFILE/users.426.1056559339
- destination for restore of datafile 00004: +data
- channel ORA_AUX_DISK_4: copied datafile copy of datafile 00004
- output file name=+DATA/ORCL/DATAFILE/users.262.1057352191 RECID=81 STAMP=1057352194
- channel ORA_AUX_DISK_1: copied datafile copy of datafile 00001
- output file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf RECID=82 STAMP=1057352215
- channel ORA_AUX_DISK_2: copied datafile copy of datafile 00003
- output file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf RECID=83 STAMP=1057352215
- channel ORA_AUX_DISK_3: copied datafile copy of datafile 00002
- output file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf RECID=84 STAMP=1057352215
- Finished restore at 2020-11-24:20:56:57
- datafile 4 switched to datafile copy
- input datafile copy RECID=85 STAMP=1057352217 file name=+DATA/ORCL/DATAFILE/users.262.1057352191
- datafile 1 switched to datafile copy
- input datafile copy RECID=86 STAMP=1057352217 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf
- datafile 3 switched to datafile copy
- input datafile copy RECID=87 STAMP=1057352218 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf
- datafile 2 switched to datafile copy
- input datafile copy RECID=88 STAMP=1057352218 file name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf
- contents of Memory Script:
- {
- # set requested point in time
- set until scn 12273726;
- # online the datafiles restored or switched
- sql clone "alter database datafile 1 online";
- sql clone "alter database datafile 3 online";
- sql clone "alter database datafile 2 online";
- sql clone "alter database datafile 4 online";
- # recover and open resetlogs
- recover clone database tablespace "USERS", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
- alter clone database open resetlogs;
- }
- executing Memory Script
- executing command: SET until clause
- sql statement: alter database datafile 1 online
- sql statement: alter database datafile 3 online
- sql statement: alter database datafile 2 online
- sql statement: alter database datafile 4 online
- Starting recover at 2020-11-24:20:56:58
- using channel ORA_AUX_SBT_TAPE_1
- using channel ORA_AUX_SBT_TAPE_2
- using channel ORA_AUX_DISK_1
- using channel ORA_AUX_DISK_2
- using channel ORA_AUX_DISK_3
- using channel ORA_AUX_DISK_4
- using channel ORA_AUX_DISK_5
- using channel ORA_AUX_DISK_6
- using channel ORA_AUX_DISK_7
- using channel ORA_AUX_DISK_8
- channel ORA_AUX_DISK_1: starting incremental datafile backup set restore
- channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00001: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf
- channel ORA_AUX_DISK_1: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.346.1057349941
- channel ORA_AUX_DISK_2: starting incremental datafile backup set restore
- channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00002: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf
- channel ORA_AUX_DISK_2: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.376.1057349941
- channel ORA_AUX_DISK_3: starting incremental datafile backup set restore
- channel ORA_AUX_DISK_3: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00004: +DATA/ORCL/DATAFILE/users.262.1057352191
- channel ORA_AUX_DISK_3: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.405.1057349943
- channel ORA_AUX_DISK_4: starting incremental datafile backup set restore
- channel ORA_AUX_DISK_4: specifying datafile(s) to restore from backup set
- destination for restore of datafile 00003: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf
- channel ORA_AUX_DISK_4: reading from backup piece +FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.407.1057349941
- channel ORA_AUX_DISK_3: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.405.1057349943 tag=ORAOEM_LEVEL_0
- channel ORA_AUX_DISK_3: restored backup piece 1
- channel ORA_AUX_DISK_3: restore complete, elapsed time: 00:00:01
- channel ORA_AUX_DISK_4: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.407.1057349941 tag=ORAOEM_LEVEL_0
- channel ORA_AUX_DISK_4: restored backup piece 1
- channel ORA_AUX_DISK_4: restore complete, elapsed time: 00:00:03
- channel ORA_AUX_DISK_1: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.346.1057349941 tag=ORAOEM_LEVEL_0
- channel ORA_AUX_DISK_1: restored backup piece 1
- channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
- channel ORA_AUX_DISK_2: piece handle=+FRA/ORCL/BACKUPSET/2020_11_24/nnndn1_oraoem_level_0_0.376.1057349941 tag=ORAOEM_LEVEL_0
- channel ORA_AUX_DISK_2: restored backup piece 1
- channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:00:25
- starting media recovery
- archived log for thread 1 with sequence 6 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_6.420.1057349959
- archived log for thread 1 with sequence 7 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_7.390.1057350807
- archived log for thread 1 with sequence 8 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_8.372.1057350807
- archived log for thread 1 with sequence 9 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_9.433.1057350809
- archived log for thread 1 with sequence 10 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_10.432.1057350809
- archived log for thread 1 with sequence 11 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_11.434.1057350813
- archived log for thread 1 with sequence 12 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_12.395.1057350813
- archived log for thread 1 with sequence 13 is already on disk as file +FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_13.257.1057352077
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_6.420.1057349959 thread=1 sequence=6
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_7.390.1057350807 thread=1 sequence=7
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_8.372.1057350807 thread=1 sequence=8
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_9.433.1057350809 thread=1 sequence=9
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_10.432.1057350809 thread=1 sequence=10
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_11.434.1057350813 thread=1 sequence=11
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_12.395.1057350813 thread=1 sequence=12
- archived log file name=+FRA/ORCL/ARCHIVELOG/2020_11_24/thread_1_seq_13.257.1057352077 thread=1 sequence=13
- media recovery complete, elapsed time: 00:00:13
- Finished recover at 2020-11-24:20:57:40
- database opened
- contents of Memory Script:
- {
- # make read only the tablespace that will be exported
- sql clone 'alter tablespace USERS read only';
- # create directory for datapump import
- sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
- /u01/app/oracle/oradata''";
- # create directory for datapump export
- sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
- /u01/app/oracle/oradata''";
- }
- executing Memory Script
- sql statement: alter tablespace USERS read only
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''
- sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/oradata''
- Performing export of metadata...
- EXPDP> 启动 "SYS"."TSPITR_EXP_ymms_lzec":
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX/INDEX
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX_STATISTICS
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TRIGGER
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/STATISTICS/MARKER
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/FGA_POLICY
- EXPDP> 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
- EXPDP> 已成功加载/卸载了主表 "SYS"."TSPITR_EXP_ymms_lzec"
- EXPDP> ******************************************************************************
- EXPDP> SYS.TSPITR_EXP_ymms_lzec 的转储文件集为:
- EXPDP> /u01/app/oracle/oradata/tspitr_ymms_69605.dmp
- EXPDP> ******************************************************************************
- EXPDP> 可传输表空间 USERS 所需的数据文件:
- EXPDP> +DATA/ORCL/DATAFILE/users.262.1057352191
- EXPDP> 作业 "SYS"."TSPITR_EXP_ymms_lzec" 已于 星期二 11月 24 20:59:29 2020 elapsed 0 00:01:26 成功完成
- Export completed
- contents of Memory Script:
- {
- # shutdown clone before import
- shutdown clone abort
- }
- executing Memory Script
- Oracle instance shut down
- Performing import of metadata...
- IMPDP> 已成功加载/卸载了主表 "SYS"."TSPITR_IMP_ymms_hfyz"
- IMPDP> 启动 "SYS"."TSPITR_IMP_ymms_hfyz":
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/PLUGTS_BLK
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/GRANT/OWNER_GRANT/OBJECT_GRANT
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX/INDEX
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/INDEX_STATISTICS
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TRIGGER
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/TABLE_STATISTICS
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/STATISTICS/MARKER
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/FGA_POLICY
- IMPDP> 处理对象类型 TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
- IMPDP> 作业 "SYS"."TSPITR_IMP_ymms_hfyz" 已于 星期二 11月 24 21:00:15 2020 elapsed 0 00:00:36 成功完成
- Import completed
- contents of Memory Script:
- {
- # make read write and offline the imported tablespaces
- sql 'alter tablespace USERS read write';
- sql 'alter tablespace USERS offline';
- # enable autobackups after TSPITR is finished
- sql 'begin dbms_backup_restore.AutoBackupFlag(TRUE); end;';
- }
- executing Memory Script
- sql statement: alter tablespace USERS read write
- sql statement: alter tablespace USERS offline
- sql statement: begin dbms_backup_restore.AutoBackupFlag(TRUE); end;
- Removing automatic instance
- Automatic instance removed
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_temp_hvt0t9sc_.tmp deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_3_hvt0t5y2_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_2_hvt0t592_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/onlinelog/o1_mf_1_hvt0t4lb_.log deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_hvt0qz19_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_hvt0qz19_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_hvt0qz17_.dbf deleted
- auxiliary instance file /u01/app/oracle/oradata/ORCL/controlfile/o1_mf_hvt0qopt_.ctl deleted
- auxiliary instance file tspitr_ymms_69605.dmp deleted
- Finished recover at 2020-11-24:21:00:18
- RMAN>
复制代码
|
|