bkreynolds48
asked on
oracle RMAN - trying to duplicate a database
have oracle 11g on aix 7
I am running the following commands
I usually just restore from a backup - but my manager wanted me to duplicate the database this time
I have a wrapper script that has the NLS - Oracle sid - log file - message log and command file in it that call this script
can someone tell me what I have wrong?
RMAN>RUN
allocate channel pymy1 type disk;
allocate channel pymy2 type disk;
{
set newname for datafile .............
..................
........
duplicate target database to database_name from active database:
}
get the following errors...............
RMAN-0051
RMAN-00569
RMAN-0051
RMAN-03002
RMAN-06403
RMAN-04006
ORA-27101
IBM AIX RISC system/6000 Error: 2: No such file or directory
Additional information: 2311
Additional information: -1108868217
I am running the following commands
I usually just restore from a backup - but my manager wanted me to duplicate the database this time
I have a wrapper script that has the NLS - Oracle sid - log file - message log and command file in it that call this script
can someone tell me what I have wrong?
RMAN>RUN
allocate channel pymy1 type disk;
allocate channel pymy2 type disk;
{
set newname for datafile .............
..................
........
duplicate target database to database_name from active database:
}
get the following errors...............
RMAN-0051
RMAN-00569
RMAN-0051
RMAN-03002
RMAN-06403
RMAN-04006
ORA-27101
IBM AIX RISC system/6000 Error: 2: No such file or directory
Additional information: 2311
Additional information: -1108868217
ASKER
so instead of set newname
I do
RMAN
{
RUN
allocate channel pymy1 type disk;
allocate channel pymy2 type disk;
duplicate target database to new_database_name
from active database
DB_FILE_NAME_CONVERT
SPFILE
PARAMETER_VALUE_CONVERT
'orginating file name ', 'destination file name'
'orginating file name ', 'destination file name'
'orginating file name ', 'destination file name'
'orginating file name ', 'destination file name'
.................
SET LOG_FILE_NAME_CONVERT
'orginating LOG file name ', 'destination LOG file name'
}
do that for each data file?
I do
RMAN
{
RUN
allocate channel pymy1 type disk;
allocate channel pymy2 type disk;
duplicate target database to new_database_name
from active database
DB_FILE_NAME_CONVERT
SPFILE
PARAMETER_VALUE_CONVERT
'orginating file name ', 'destination file name'
'orginating file name ', 'destination file name'
'orginating file name ', 'destination file name'
'orginating file name ', 'destination file name'
.................
SET LOG_FILE_NAME_CONVERT
'orginating LOG file name ', 'destination LOG file name'
}
do that for each data file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks so much
You are welcome!
So you have to convert the file names accordingly like here:
(snip from https://docs.oracle.com/cd/B28359_01/backup.111/b28270/rcmdupdb.htm#BRADV167)
DUPLICATE TARGET DATABASE TO dup1
FROM ACTIVE DATABASE
DB_FILE_NAME_CONVERT '/disk1','/disk2'
SPFILE
PARAMETER_VALUE_CONVERT '/disk1', '/disk2'
SET LOG_FILE_NAME_CONVERT '/disk1','/disk2'
SET SGA_MAX_SIZE '200M'
SET SGA_TARGET '125M';