How to duplicate oracle database in multiple channels? [message #667668] |
Wed, 10 January 2018 02:45 |
|
kalenko
Messages: 40 Registered: January 2018
|
Member |
|
|
I saw on the internet, some oracle duplication commands used multi channels:
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_DISK_3
using channel ORA_AUX_DISK_4
However, when I perform duplication, the rman uses only one channel ORA_AUX_DISK_1. And the performance is very bad. Please tell me how to configure rman when backup to use multi channels to improve duplication performance when duplication. (I duplicate oracle database without target connection.)
Thanks.
[Updated on: Wed, 10 January 2018 03:44] Report message to a moderator
|
|
|
|
|
|
Re: How to duplicate oracle database in multiple channels? [message #667684 is a reply to message #667675] |
Wed, 10 January 2018 08:40 |
|
kalenko
Messages: 40 Registered: January 2018
|
Member |
|
|
Here is the command I use:
duplicate database to vbtest nofilenamecheck backup location '/opt/app/backup/';
and here is the entire log:
Starting Duplicate Db at 10-JAN-18
contents of Memory Script:
{
sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 246349824 bytes
Fixed Size 2212288 bytes
Variable Size 213913152 bytes
Database Buffers 25165824 bytes
Redo Buffers 5058560 bytes
contents of Memory Script:
{
sql clone "alter system set db_name =
''VBCMS'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''VBTEST'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile from '/opt/app/backup/ctl_LVL0_20171111_c-3202654855-20171111-01';
alter clone database mount;
}
executing Memory Script
sql statement: alter system set db_name = ''VBCMS'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''VBTEST'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 246349824 bytes
Fixed Size 2212288 bytes
Variable Size 213913152 bytes
Database Buffers 25165824 bytes
Redo Buffers 5058560 bytes
Starting restore at 10-JAN-18
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=771 device type=DISK
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/opt/app/database/vbtest/controlfile/control01.ctl
output file name=/opt/app/database/flash_recovery_area/vbtest/controlfile/control02.ctl
Finished restore at 10-JAN-18
database mounted
released channel: ORA_AUX_DISK_1
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=771 device type=DISK
contents of Memory Script:
{
set until scn 2404015;
set newname for datafile 1 to
"/opt/app/database/vbtest/datafile/system01.dbf";
set newname for datafile 2 to
"/opt/app/database/vbtest/datafile/sysaux01.dbf";
set newname for datafile 3 to
"/opt/app/database/vbtest/datafile/undotbs01.dbf";
set newname for datafile 4 to
"/opt/app/database/vbtest/datafile/users01.dbf";
restore
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 10-JAN-18
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /opt/app/database/vbtest/datafile/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /opt/app/database/vbtest/datafile/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /opt/app/database/vbtest/datafile/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /opt/app/database/vbtest/datafile/users01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /opt/app/backup/DB_LVL0_20171111_30sjb94o_s96_p1
channel ORA_AUX_DISK_1: piece handle=/opt/app/backup/DB_LVL0_20171111_30sjb94o_s96_p1 tag=TAG20171111T234736
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:06
Finished restore at 10-JAN-18
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=965025092 file name=/opt/app/database/vbtest/datafile/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=7 STAMP=965025092 file name=/opt/app/database/vbtest/datafile/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=8 STAMP=965025092 file name=/opt/app/database/vbtest/datafile/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=9 STAMP=965025092 file name=/opt/app/database/vbtest/datafile/users01.dbf
contents of Memory Script:
{
set until scn 2404015;
recover
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 10-JAN-18
using channel ORA_AUX_DISK_1
starting media recovery
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=159
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=160
channel ORA_AUX_DISK_1: reading from backup piece /opt/app/backup/AL_LVL0_20171111_32sjb96v_s98_p1
channel ORA_AUX_DISK_1: piece handle=/opt/app/backup/AL_LVL0_20171111_32sjb96v_s98_p1 tag=TAG20171111T234847
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
archived log file name=/opt/app/database/vbtest/archivelog/1_159_956019402.dbf thread=1 sequence=159
channel clone_default: deleting archived log(s)
archived log file name=/opt/app/database/vbtest/archivelog/1_159_956019402.dbf RECID=1 STAMP=965025100
archived log file name=/opt/app/database/vbtest/archivelog/1_160_956019402.dbf thread=1 sequence=160
channel clone_default: deleting archived log(s)
archived log file name=/opt/app/database/vbtest/archivelog/1_160_956019402.dbf RECID=2 STAMP=965025102
media recovery complete, elapsed time: 00:00:01
Finished recover at 10-JAN-18
contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
sql clone "alter system set db_name =
''VBTEST'' 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
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 246349824 bytes
Fixed Size 2212288 bytes
Variable Size 230690368 bytes
Database Buffers 8388608 bytes
Redo Buffers 5058560 bytes
sql statement: alter system set db_name = ''VBTEST'' 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 246349824 bytes
Fixed Size 2212288 bytes
Variable Size 230690368 bytes
Database Buffers 8388608 bytes
Redo Buffers 5058560 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "VBTEST" RESETLOGS ARCHIVELOG
MAXLOGFILES 30
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '/opt/app/database/vbtest/onlinelog/redo01.log' ) SIZE 50 M REUSE,
GROUP 2 ( '/opt/app/database/vbtest/onlinelog/redo02.log' ) SIZE 50 M REUSE,
GROUP 3 ( '/opt/app/database/vbtest/onlinelog/redo03.log' ) SIZE 50 M REUSE
DATAFILE
'/opt/app/database/vbtest/datafile/system01.dbf'
CHARACTER SET AL32UTF8
contents of Memory Script:
{
set newname for tempfile 1 to
"/opt/app/database/vbtest/datafile/temp01.dbf";
switch clone tempfile all;
catalog clone datafilecopy "/opt/app/database/vbtest/datafile/sysaux01.dbf",
"/opt/app/database/vbtest/datafile/undotbs01.dbf",
"/opt/app/database/vbtest/datafile/users01.dbf";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /opt/app/database/vbtest/datafile/temp01.dbf in control file
cataloged datafile copy
datafile copy file name=/opt/app/database/vbtest/datafile/sysaux01.dbf RECID=1 STAMP=965025120
cataloged datafile copy
datafile copy file name=/opt/app/database/vbtest/datafile/undotbs01.dbf RECID=2 STAMP=965025120
cataloged datafile copy
datafile copy file name=/opt/app/database/vbtest/datafile/users01.dbf RECID=3 STAMP=965025120
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=965025120 file name=/opt/app/database/vbtest/datafile/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=965025120 file name=/opt/app/database/vbtest/datafile/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=965025120 file name=/opt/app/database/vbtest/datafile/users01.dbf
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 10-JAN-18
You can notice that my duplication process uses only one channel ORA_AUX_DISK_1. So my question is: what do I have to configure rman backup so that when I duplicate database, It will use multi channels.
|
|
|
|
|
|
|
|
Re: How to duplicate oracle database in multiple channels? [message #667700 is a reply to message #667694] |
Thu, 11 January 2018 01:24 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
run{allocate auxiliary channel a1 type disk;
allocate auxiliary channel a2 type disk;
allocate auxiliary channel a3 type disk;
allocate auxiliary channel a4 type disk;
duplicate database to vbtest nofilenamecheck backup location '/opt/app/backup/';}
However, there is no point because your entire backup is in one backup set. So you can't parallelize anything.
|
|
|
Re: How to duplicate oracle database in multiple channels? [message #667703 is a reply to message #667700] |
Thu, 11 January 2018 03:10 |
|
kalenko
Messages: 40 Registered: January 2018
|
Member |
|
|
John Watson wrote on Thu, 11 January 2018 01:24run{allocate auxiliary channel a1 type disk;
allocate auxiliary channel a2 type disk;
allocate auxiliary channel a3 type disk;
allocate auxiliary channel a4 type disk;
duplicate database to vbtest nofilenamecheck backup location '/opt/app/backup/';}
However, there is no point because your entire backup is in one backup set. So you can't parallelize anything.
OK, I will backup using multi channels and there will be multi backup sets.
By the way, can we configure automatic multi channels for duplication?
[Updated on: Thu, 11 January 2018 03:21] Report message to a moderator
|
|
|
|
|
Re: How to duplicate oracle database in multiple channels? [message #667726 is a reply to message #667718] |
Thu, 11 January 2018 20:12 |
|
kalenko
Messages: 40 Registered: January 2018
|
Member |
|
|
Michel Cadot wrote on Thu, 11 January 2018 09:34
kalenko wrote on Thu, 11 January 2018 10:10
By the way, can we configure automatic multi channels for duplication?
Michel Cadot wrote on Wed, 10 January 2018 16:42
CONFIGURE DEVICE TYPE DISK PARALLELISM <n>;
Before running the duplicate command, I start nomount instance, so I cannot apply the command you give.
SQL> startup nomount pfile='/opt/app/temp/initvbtest.ora';
$ rman auxiliary /
RMAN> duplicate database to vbtest nofilenamecheck backup location '/opt/app/backup/';
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 4;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 01/11/2018 18:17:56
RMAN-06136: ORACLE error from auxiliary database: ORA-01507: database not mounted
RMAN>
[Updated on: Thu, 11 January 2018 20:29] Report message to a moderator
|
|
|
|
|
|
|
|
|