|
ASM-FILE SYSTEM+SKIP TBS1
- select name from v$datafile;
- select member from v$logfile;
- begin
- dbms_tts.transport_set_check('USERS');
- end;
- select * from transport_set_violations;
- select tablespace_name from dba_Tablespaces;
- create tablespace tbs1 datafile size 10M ;
- create table hr.emp2 tablespace tbs1 as select * from hr.employees;
复制代码- run{
- allocate channel c1 device type disk;
- allocate channel c2 device type disk;
- allocate channel c3 device type disk;
- allocate channel c4 device type disk;
- allocate channel c5 device type disk;
- allocate channel c6 device type disk;
- allocate channel c7 device type disk;
- allocate channel c8 device type disk;
- allocate auxiliary channel c9 device type disk;
- allocate auxiliary channel c10 device type disk;
- allocate auxiliary channel c11 device type disk;
- allocate auxiliary channel c12 device type disk;
- allocate auxiliary channel c13 device type disk;
- allocate auxiliary channel c14 device type disk;
- allocate auxiliary channel c15 device type disk;
- allocate auxiliary channel c16 device type disk;
- duplicate target database to mydb
- from active database
- nofilenamecheck
- skip tablespace tbs1
- spfile
- set
- control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/oradata/mydb/control02.ctl','/u01/app/oracle/oradata/mydb/control03.ctl'
- set
- db_file_name_convert='+DATA/orcl/datafile/users.259.816169553','/u01/app/oracle/oradata/mydb/users01.dbf','+DATA/orcl/datafile/undotbs1.258.816169553','/u01/app/oracle/oradata/mydb/undotbs01.dbf','+DATA/orcl/datafile/sysaux.257.816169553','/u01/app/oracle/oradata/mydb/sysaux01.dbf','+DATA/orcl/datafile/system.256.816169553','/u01/app/oracle/oradata/mydb/system01.dbf','+DATA/orcl/datafile/example.265.816169651','/u01/app/oracle/oradata/mydb/example01.dbf'
- set
- log_file_name_convert='+DATA/orcl/onlinelog/group_1.261.816169635','/u01/app/oracle/oradata/mydb/redo01a.log','+FRA/orcl/onlinelog/group_1.257.816169637','/u01/app/oracle/oradata/mydb/redo01b.log','+DATA/orcl/onlinelog/group_3.263.816169641','/u01/app/oracle/oradata/mydb/redo03a.log','+FRA/orcl/onlinelog/group_3.259.816169641','/u01/app/oracle/oradata/mydb/redo03b.log','+DATA/orcl/onlinelog/group_2.262.816169639','/u01/app/oracle/oradata/mydb/redo02a.log','+FRA/orcl/onlinelog/group_2.258.816169639','/u01/app/oracle/oradata/mydb/redo02b.log'
- set
- audit_file_dest='/u01/app/oracle/admin/mydb/adump'
- set
- db_create_file_dest=''
- set
- db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';
- }
复制代码 BACKUP LOCATION备份端语法:
- --源头把备份优化关掉,或用force语法
- run {
- allocate channel c1 device type disk format '/home/oracle/backup/%U';
- allocate channel c2 device type disk format '/home/oracle/backup/%U';
- allocate channel c3 device type disk format '/home/oracle/backup/%U';
- allocate channel c4 device type disk format '/home/oracle/backup/%U';
- allocate channel c5 device type disk format '/home/oracle/backup/%U';
- allocate channel c6 device type disk format '/home/oracle/backup/%U';
- allocate channel c7 device type disk format '/home/oracle/backup/%U';
- allocate channel c8 device type disk format '/home/oracle/backup/%U';
- backup database plus archivelog force;
- backup spfile;
- backup current controlfile;
- }
复制代码- run{
- allocate auxiliary channel c1 device type disk;
- allocate auxiliary channel c2 device type disk;
- allocate auxiliary channel c3 device type disk;
- allocate auxiliary channel c4 device type disk;
- allocate auxiliary channel c5 device type disk;
- allocate auxiliary channel c6 device type disk;
- allocate auxiliary channel c7 device type disk;
- allocate auxiliary channel c8 device type disk;
- duplicate target database to new11g
- backup location '/home/oracle/backup'
- nofilenamecheck
- skip tablespace tbs1
- spfile
- set
- control_files='/u01/app/oracle/oradata/new11g/control01.ctl','/u01/app/oracle/oradata/new11g/control02.ctl','/u01/app/oracle/oradata/new11g/control03.ctl'
- set
- db_file_name_convert='+DATA/orcl/datafile/','/u01/app/oracle/oradata/new11g/'
- set
- log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oracle/oradata/new11g/','+FRA/orcl/onlinelog/','/u01/app/oracle/oradata/new11g/'
- set
- audit_file_dest='/u01/app/oracle/admin/new11g/adump'
- set
- db_create_file_dest=''
- set
- db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';
- }
复制代码 用到“%b”语法:
- run{
- allocate auxiliary channel c1 device type disk;
- allocate auxiliary channel c2 device type disk;
- allocate auxiliary channel c3 device type disk;
- allocate auxiliary channel c4 device type disk;
- allocate auxiliary channel c5 device type disk;
- allocate auxiliary channel c6 device type disk;
- allocate auxiliary channel c7 device type disk;
- allocate auxiliary channel c8 device type disk;
- SET NEWNAME FOR DATABASE TO '/u01/app/oracle/oradata/yourdb/%b';
- duplicate target database to yourdb
- backup location '/home/oracle/backup'
- nofilenamecheck
- skip tablespace example
- LOGFILE
- GROUP 1 ('/u01/app/oracle/oradata/yourdb/redo01a.log',
- '/u01/app/oracle/oradata/yourdb/redo01b.log') SIZE 50M REUSE,
- GROUP 2 ('/u01/app/oracle/oradata/yourdb/redo02a.log',
- '/u01/app/oracle/oradata/yourdb/redo02b.log') SIZE 50M REUSE,
- GROUP 3 ('/u01/app/oracle/oradata/yourdb/redo03a.log',
- '/u01/app/oracle/oradata/yourdb/redo03b.log') SIZE 50M REUSE
- spfile
- set
- control_files='/u01/app/oracle/oradata/yourdb/control01.ctl','/u01/app/oracle/oradata/yourdb/control02.ctl','/u01/app/oracle/oradata/yourdb/control03.ctl'
- set
- audit_file_dest='/u01/app/oracle/admin/yourdb/adump'
- set
- db_create_file_dest=''
- set
- db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';
- }
复制代码 部分输出:
- 13> nofilenamecheck
- 14> skip tablespace example
- 15> LOGFILE
- 16> GROUP 1 ('/u01/app/oracle/oradata/yourdb/redo01a.log',
- 17> '/u01/app/oracle/oradata/yourdb/redo01b.log') SIZE 50M REUSE,
- 18> GROUP 2 ('/u01/app/oracle/oradata/yourdb/redo02a.log',
- 19> '/u01/app/oracle/oradata/yourdb/redo02b.log') SIZE 50M REUSE,
- 20> GROUP 3 ('/u01/app/oracle/oradata/yourdb/redo03a.log',
- 21> '/u01/app/oracle/oradata/yourdb/redo03b.log') SIZE 50M REUSE
- 22> spfile
- 23> set
- 24> control_files='/u01/app/oracle/oradata/yourdb/control01.ctl','/u01/app/oracle/oradata/yourdb/control02.ctl','/u01/app/oracle/oradata/yourdb/control03.ctl'
- 25> set
- 26> audit_file_dest='/u01/app/oracle/admin/yourdb/adump'
- 27> set
- 28> db_create_file_dest=''
- 29> set
- 30> db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';
- 31>
- 32> }
- 33>
- allocated channel: c1
- channel c1: SID=429 device type=DISK
- allocated channel: c2
- channel c2: SID=5 device type=DISK
- allocated channel: c3
- channel c3: SID=146 device type=DISK
- allocated channel: c4
- channel c4: SID=288 device type=DISK
- allocated channel: c5
- channel c5: SID=430 device type=DISK
- allocated channel: c6
- channel c6: SID=6 device type=DISK
- allocated channel: c7
- channel c7: SID=147 device type=DISK
- allocated channel: c8
- channel c8: SID=289 device type=DISK
- executing command: SET NEWNAME
- Starting Duplicate Db at 11-OCT-17
- contents of Memory Script:
- {
- restore clone spfile to '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileyourdb.ora' from
- '/home/oracle/backup/2ksgp467_1_1';
- sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileyourdb.ora''";
- }
- executing Memory Script
- Starting restore at 11-OCT-17
- channel c2: skipped, AUTOBACKUP already found
- channel c3: skipped, AUTOBACKUP already found
- channel c4: skipped, AUTOBACKUP already found
- channel c5: skipped, AUTOBACKUP already found
- channel c6: skipped, AUTOBACKUP already found
- channel c7: skipped, AUTOBACKUP already found
- channel c8: skipped, AUTOBACKUP already found
- channel c1: restoring spfile from AUTOBACKUP /home/oracle/backup/2ksgp467_1_1
- channel c1: SPFILE restore from AUTOBACKUP complete
- Finished restore at 11-OCT-17
- sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileyourdb.ora''
- contents of Memory Script:
- {
- sql clone "alter system set db_name =
- ''YOURDB'' comment=
- ''duplicate'' scope=spfile";
- sql clone "alter system set control_files =
- ''/u01/app/oracle/oradata/yourdb/control01.ctl'', ''/u01/app/oracle/oradata/yourdb/control02.ctl'', ''/u01/app/oracle/oradata/yourdb/control03.ctl'' comment=
- '''' scope=spfile";
- sql clone "alter system set audit_file_dest =
- ''/u01/app/oracle/admin/yourdb/adump'' comment=
- '''' scope=spfile";
- sql clone "alter system set db_create_file_dest =
- '''' comment=
- '''' scope=spfile";
- sql clone "alter system set db_recovery_file_dest =
- ''/u01/app/oracle/flash_recovery_area'' comment=
- '''' scope=spfile";
- shutdown clone immediate;
- startup clone nomount;
- }
- executing Memory Script
- sql statement: alter system set db_name = ''YOURDB'' comment= ''duplicate'' scope=spfile
- sql statement: alter system set control_files = ''/u01/app/oracle/oradata/yourdb/control01.ctl'', ''/u01/app/oracle/oradata/yourdb/control02.ctl'', ''/u01/app/oracle/oradata/yourdb/control03.ctl'' comment= '''' scope=spfile
- sql statement: alter system set audit_file_dest = ''/u01/app/oracle/admin/yourdb/adump'' comment= '''' scope=spfile
- sql statement: alter system set db_create_file_dest = '''' comment= '''' scope=spfile
- sql statement: alter system set db_recovery_file_dest = ''/u01/app/oracle/flash_recovery_area'' comment= '''' scope=spfile
- Oracle instance shut down
- connected to auxiliary database (not started)
- Oracle instance started
- Total System Global Area 1068937216 bytes
- Fixed Size 2235208 bytes
- Variable Size 616563896 bytes
- Database Buffers 444596224 bytes
- Redo Buffers 5541888 bytes
- allocated channel: c1
- channel c1: SID=63 device type=DISK
- allocated channel: c2
- channel c2: SID=129 device type=DISK
- allocated channel: c3
- channel c3: SID=192 device type=DISK
- allocated channel: c4
- channel c4: SID=6 device type=DISK
- allocated channel: c5
- channel c5: SID=67 device type=DISK
- allocated channel: c6
- channel c6: SID=130 device type=DISK
- allocated channel: c7
- channel c7: SID=193 device type=DISK
- allocated channel: c8
- channel c8: SID=7 device type=DISK
- contents of Memory Script:
- {
- sql clone "alter system set db_name =
- ''ORCL'' comment=
- ''Modified by RMAN duplicate'' scope=spfile";
- sql clone "alter system set db_unique_name =
- ''YOURDB'' comment=
- ''Modified by RMAN duplicate'' scope=spfile";
- shutdown clone immediate;
- startup clone force nomount
- restore clone primary controlfile from '/home/oracle/backup/2lsgp468_1_1';
- alter clone database mount;
- }
- executing Memory Script
- sql statement: alter system set db_name = ''ORCL'' comment= ''Modified by RMAN duplicate'' scope=spfile
- sql statement: alter system set db_unique_name = ''YOURDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
- Oracle instance shut down
- Oracle instance started
- Total System Global Area 1068937216 bytes
- Fixed Size 2235208 bytes
- Variable Size 616563896 bytes
- Database Buffers 444596224 bytes
- Redo Buffers 5541888 bytes
- allocated channel: c1
- channel c1: SID=63 device type=DISK
- allocated channel: c2
- channel c2: SID=129 device type=DISK
- allocated channel: c3
- channel c3: SID=192 device type=DISK
- allocated channel: c4
- channel c4: SID=6 device type=DISK
- allocated channel: c5
- channel c5: SID=67 device type=DISK
- allocated channel: c6
- channel c6: SID=130 device type=DISK
- allocated channel: c7
- channel c7: SID=193 device type=DISK
- allocated channel: c8
- channel c8: SID=7 device type=DISK
- Starting restore at 11-OCT-17
- channel c2: skipped, AUTOBACKUP already found
- channel c3: skipped, AUTOBACKUP already found
- channel c4: skipped, AUTOBACKUP already found
- channel c5: skipped, AUTOBACKUP already found
- channel c6: skipped, AUTOBACKUP already found
- channel c7: skipped, AUTOBACKUP already found
- channel c8: skipped, AUTOBACKUP already found
- channel c1: restoring control file
- channel c1: restore complete, elapsed time: 00:00:08
- output file name=/u01/app/oracle/oradata/yourdb/control01.ctl
- output file name=/u01/app/oracle/oradata/yourdb/control02.ctl
- output file name=/u01/app/oracle/oradata/yourdb/control03.ctl
- Finished restore at 11-OCT-17
- database mounted
- Not connected to TARGET or TARGET not open, cannot verify that subset of tablespaces is self-contained
- Not connected to TARGET, cannot verify that set of tablespaces being duplicated does not have SYS objects
- Datafile 5 skipped by request
- contents of Memory Script:
- {
- set until scn 2145082;
- set newname for datafile 1 to
- "/u01/app/oracle/oradata/yourdb/system.256.816169553";
- set newname for datafile 2 to
- "/u01/app/oracle/oradata/yourdb/sysaux.257.816169553";
- set newname for datafile 3 to
- "/u01/app/oracle/oradata/yourdb/undotbs1.258.816169553";
- set newname for datafile 4 to
- "/u01/app/oracle/oradata/yourdb/users.259.816169553";
- set newname for datafile 6 to
- "/u01/app/oracle/oradata/yourdb/tbs1.267.957123085";
- restore
- clone database
- skip forever tablespace "EXAMPLE" ;
- }
- 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
- Starting restore at 11-OCT-17
- channel c1: starting datafile backup set restore
- channel c1: specifying datafile(s) to restore from backup set
- channel c1: restoring datafile 00002 to /u01/app/oracle/oradata/yourdb/sysaux.257.816169553
- channel c1: reading from backup piece /home/oracle/backup/2fsgp45t_1_1
- channel c2: starting datafile backup set restore
- channel c2: specifying datafile(s) to restore from backup set
- channel c2: restoring datafile 00003 to /u01/app/oracle/oradata/yourdb/undotbs1.258.816169553
- channel c2: reading from backup piece /home/oracle/backup/2esgp45t_1_1
- channel c3: starting datafile backup set restore
- channel c3: specifying datafile(s) to restore from backup set
- channel c3: restoring datafile 00004 to /u01/app/oracle/oradata/yourdb/users.259.816169553
- channel c3: reading from backup piece /home/oracle/backup/2isgp45v_1_1
- channel c4: starting datafile backup set restore
- channel c4: specifying datafile(s) to restore from backup set
- channel c4: restoring datafile 00006 to /u01/app/oracle/oradata/yourdb/tbs1.267.957123085
- channel c4: reading from backup piece /home/oracle/backup/2hsgp45u_1_1
- channel c5: starting datafile backup set restore
- channel c5: specifying datafile(s) to restore from backup set
- channel c5: restoring datafile 00001 to /u01/app/oracle/oradata/yourdb/system.256.816169553
- channel c5: reading from backup piece /home/oracle/backup/2dsgp45t_1_1
- channel c3: piece handle=/home/oracle/backup/2isgp45v_1_1 tag=TAG20171011T195957
- channel c3: restored backup piece 1
- channel c3: restore complete, elapsed time: 00:00:01
- channel c4: piece handle=/home/oracle/backup/2hsgp45u_1_1 tag=TAG20171011T195957
- channel c4: restored backup piece 1
- channel c4: restore complete, elapsed time: 00:00:01
- channel c1: piece handle=/home/oracle/backup/2fsgp45t_1_1 tag=TAG20171011T195957
- channel c1: restored backup piece 1
- channel c1: restore complete, elapsed time: 00:00:07
- channel c2: piece handle=/home/oracle/backup/2esgp45t_1_1 tag=TAG20171011T195957
- channel c2: restored backup piece 1
- channel c2: restore complete, elapsed time: 00:00:15
- channel c5: piece handle=/home/oracle/backup/2dsgp45t_1_1 tag=TAG20171011T195957
- channel c5: restored backup piece 1
- channel c5: restore complete, elapsed time: 00:00:15
- Finished restore at 11-OCT-17
- contents of Memory Script:
- {
- switch clone datafile all;
- }
- executing Memory Script
- datafile 1 switched to datafile copy
- input datafile copy RECID=6 STAMP=957127094 file name=/u01/app/oracle/oradata/yourdb/system.256.816169553
- datafile 2 switched to datafile copy
- input datafile copy RECID=7 STAMP=957127095 file name=/u01/app/oracle/oradata/yourdb/sysaux.257.816169553
- datafile 3 switched to datafile copy
- input datafile copy RECID=8 STAMP=957127095 file name=/u01/app/oracle/oradata/yourdb/undotbs1.258.816169553
- datafile 4 switched to datafile copy
- input datafile copy RECID=9 STAMP=957127095 file name=/u01/app/oracle/oradata/yourdb/users.259.816169553
- datafile 6 switched to datafile copy
- input datafile copy RECID=10 STAMP=957127096 file name=/u01/app/oracle/oradata/yourdb/tbs1.267.957123085
- contents of Memory Script:
- {
- set until scn 2145082;
- recover
- clone database
- skip forever tablespace "EXAMPLE" delete archivelog
- ;
- }
- executing Memory Script
- executing command: SET until clause
- Starting recover at 11-OCT-17
- Executing: alter database datafile 5 offline drop
- starting media recovery
- channel c1: starting archived log restore to default destination
- channel c1: restoring archived log
- archived log thread=1 sequence=117
- channel c1: reading from backup piece /home/oracle/backup/2jsgp465_1_1
- channel c1: piece handle=/home/oracle/backup/2jsgp465_1_1 tag=TAG20171011T200005
- channel c1: restored backup piece 1
- channel c1: restore complete, elapsed time: 00:00:01
- archived log file name=/u01/app/oracle/flash_recovery_area/YOURDB/archivelog/2017_10_11/o1_mf_1_117_dxw45t7b_.arc thread=1 sequence=117
- channel clone_default: deleting archived log(s)
- archived log file name=/u01/app/oracle/flash_recovery_area/YOURDB/archivelog/2017_10_11/o1_mf_1_117_dxw45t7b_.arc RECID=1 STAMP=957127098
- media recovery complete, elapsed time: 00:00:00
- Finished recover at 11-OCT-17
- Oracle instance started
- Total System Global Area 1068937216 bytes
- Fixed Size 2235208 bytes
- Variable Size 620758200 bytes
- Database Buffers 440401920 bytes
- Redo Buffers 5541888 bytes
- contents of Memory Script:
- {
- sql clone "alter system set db_name =
- ''YOURDB'' comment=
- ''Reset to original value by RMAN'' scope=spfile";
- sql clone "alter system reset db_unique_name scope=spfile";
- shutdown clone immediate;
- startup clone nomount;
- }
- executing Memory Script
- sql statement: alter system set db_name = ''YOURDB'' comment= ''Reset to original value by RMAN'' scope=spfile
- sql statement: alter system reset db_unique_name scope=spfile
- Oracle instance shut down
- connected to auxiliary database (not started)
- Oracle instance started
- Total System Global Area 1068937216 bytes
- Fixed Size 2235208 bytes
- Variable Size 620758200 bytes
- Database Buffers 440401920 bytes
- Redo Buffers 5541888 bytes
- allocated channel: c1
- channel c1: SID=63 device type=DISK
- allocated channel: c2
- channel c2: SID=129 device type=DISK
- allocated channel: c3
- channel c3: SID=192 device type=DISK
- allocated channel: c4
- channel c4: SID=6 device type=DISK
- allocated channel: c5
- channel c5: SID=67 device type=DISK
- allocated channel: c6
- channel c6: SID=130 device type=DISK
- allocated channel: c7
- channel c7: SID=193 device type=DISK
- allocated channel: c8
- channel c8: SID=7 device type=DISK
- sql statement: CREATE CONTROLFILE REUSE SET DATABASE "YOURDB" RESETLOGS ARCHIVELOG
- MAXLOGFILES 16
- MAXLOGMEMBERS 3
- MAXDATAFILES 100
- MAXINSTANCES 8
- MAXLOGHISTORY 292
- LOGFILE
- GROUP 1 ( '/u01/app/oracle/oradata/yourdb/redo01a.log', '/u01/app/oracle/oradata/yourdb/redo01b.log' ) SIZE 50 M REUSE,
- GROUP 2 ( '/u01/app/oracle/oradata/yourdb/redo02a.log', '/u01/app/oracle/oradata/yourdb/redo02b.log' ) SIZE 50 M REUSE,
- GROUP 3 ( '/u01/app/oracle/oradata/yourdb/redo03a.log', '/u01/app/oracle/oradata/yourdb/redo03b.log' ) SIZE 50 M REUSE
- DATAFILE
- '/u01/app/oracle/oradata/yourdb/system.256.816169553'
- CHARACTER SET AL32UTF8
- contents of Memory Script:
- {
- set newname for tempfile 1 to
- "/u01/app/oracle/oradata/yourdb/temp.264.816169645";
- switch clone tempfile all;
- catalog clone datafilecopy "/u01/app/oracle/oradata/yourdb/sysaux.257.816169553",
- "/u01/app/oracle/oradata/yourdb/undotbs1.258.816169553",
- "/u01/app/oracle/oradata/yourdb/users.259.816169553",
- "/u01/app/oracle/oradata/yourdb/tbs1.267.957123085";
- switch clone datafile all;
- }
- executing Memory Script
- executing command: SET NEWNAME
- renamed tempfile 1 to /u01/app/oracle/oradata/yourdb/temp.264.816169645 in control file
- cataloged datafile copy
- datafile copy file name=/u01/app/oracle/oradata/yourdb/sysaux.257.816169553 RECID=1 STAMP=957127125
- cataloged datafile copy
- datafile copy file name=/u01/app/oracle/oradata/yourdb/undotbs1.258.816169553 RECID=2 STAMP=957127125
- cataloged datafile copy
- datafile copy file name=/u01/app/oracle/oradata/yourdb/users.259.816169553 RECID=3 STAMP=957127126
- cataloged datafile copy
- datafile copy file name=/u01/app/oracle/oradata/yourdb/tbs1.267.957123085 RECID=4 STAMP=957127126
- datafile 2 switched to datafile copy
- input datafile copy RECID=1 STAMP=957127125 file name=/u01/app/oracle/oradata/yourdb/sysaux.257.816169553
- datafile 3 switched to datafile copy
- input datafile copy RECID=2 STAMP=957127125 file name=/u01/app/oracle/oradata/yourdb/undotbs1.258.816169553
- datafile 4 switched to datafile copy
- input datafile copy RECID=3 STAMP=957127126 file name=/u01/app/oracle/oradata/yourdb/users.259.816169553
- datafile 6 switched to datafile copy
- input datafile copy RECID=4 STAMP=957127126 file name=/u01/app/oracle/oradata/yourdb/tbs1.267.957123085
- Reenabling controlfile options for auxiliary database
- Executing: alter database enable block change tracking using file '+FRA/orcl/changetracking/ctf.260.829329115'
- ORACLE error from auxiliary database: ORA-19751: could not create the change tracking file
- ORA-19750: change tracking file: '+FRA/orcl/changetracking/ctf.260.829329115'
- ORA-17502: ksfdcre:4 Failed to create file +FRA/orcl/changetracking/ctf.260.829329115
- ORA-15046: ASM file name '+FRA/orcl/changetracking/ctf.260.829329115' is not in single-file creation form
- Ignoring error, reattempt command after duplicate finishes
- contents of Memory Script:
- {
- Alter clone database open resetlogs;
- }
- executing Memory Script
- database opened
- Dropping offline and skipped tablespaces
- Executing: drop tablespace "EXAMPLE" including contents cascade constraints
- released channel: c1
- released channel: c2
- released channel: c3
- released channel: c4
- released channel: c5
- released channel: c6
- released channel: c7
- released channel: c8
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of Duplicate Db command at 10/11/2017 20:38:56
- RMAN-05501: aborting duplication of target database
- RMAN-06136: ORACLE error from auxiliary database: ORA-29857: domain indexes and/or secondary objects exist in the tablespace
- Recovery Manager complete.
- [oracle@station30 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.3.0 Production on Wed Oct 11 20:39:15 2017
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> select open_mode from v$database;
- OPEN_MODE
- --------------------
- READ WRITE
- SQL> select tablespace_name from dba_tablespaces;
- TABLESPACE_NAME
- ------------------------------
- SYSTEM
- SYSAUX
- UNDOTBS1
- TEMP
- USERS
- EXAMPLE
- TBS1
- 7 rows selected.
- SQL>
复制代码 RMAN调优:
- SELECT s.sid, p.spid, s.client_info
- FROM v$process p, v$session s
- WHERE p.addr = s.paddr
- AND CLIENT_INFO LIKE '%id=botang%';
- ----
- SELECT s.sid, p.spid, s.client_info
- FROM v$process p, v$session s
- WHERE p.addr = s.paddr
- and program like '%rman%';
-
- ---
-
- select * from v$backup_sync_io;
-
- select * from v$backup_async_io ;
-
- -----
-
- SELECT OPNAME, CONTEXT, SOFAR, TOTALWORK,
- ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"
- FROM V$SESSION_LONGOPS
- WHERE OPNAME LIKE 'RMAN%'
- AND TOTALWORK != 0
- AND SOFAR <> TOTALWORK;
-
-
复制代码- RMAN> run {
- 2> set command id to 'botang';
- 3> allocate channel c1 device type sbt;
- 4> allocate channel c2 device type sbt;
- 5> backup tag 'MY4' duration 00:06 minimize load (datafile 1 channel c1 ) ( datafile 2,3,4,5,6 channel c2 ) ;
- 6> }
- executing command: SET COMMAND ID
- allocated channel: c1
- channel c1: SID=200 device type=SBT_TAPE
- channel c1: Oracle Secure Backup
- allocated channel: c2
- channel c2: SID=16 device type=SBT_TAPE
- channel c2: Oracle Secure Backup
- Starting backup at 11-OCT-17
- channel c1: starting full datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.256.816169553
- channel c1: starting piece 1 at 11-OCT-17
- channel c2: starting full datafile backup set
- channel c2: specifying datafile(s) in backup set
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.816169553
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.816169553
- input datafile file number=00005 name=+DATA/orcl/datafile/example.265.816169651
- input datafile file number=00006 name=+DATA/orcl/datafile/tbs1.267.957123085
- input datafile file number=00004 name=+DATA/orcl/datafile/users.259.816169553
- channel c2: starting piece 1 at 11-OCT-17
复制代码
|
|