This is my first time posting, so thanks all for this venue!
My cohort has been working on a script to duplicate a 10.2. oracle database using rman from target prod(different host) to auxiliary test using rman and NetBackup. (all aix) The directory structure is different on both so we use the convert commands in the run script:
clone/staging/rman_commands.lst
connect target 'sys/targetpw@hostP'
connect catalog 'rmanprod/rmanpw@rmanP'
connect auxiliary 'sys/auxpw@hostT'
run {
allocate auxiliary channel 'aux_01' type sbt;
allocate auxiliary channel 'aux_02' type sbt;
send 'NB_ORA_CLIENT=hostP.corp.dom';
set until time "to_date('24-Jun-11 10:22:00','DD-MON-YY HH24:MI:SS')";
duplicate target database to auxT nofilenamecheck;
set db_file_name_convert =
'/instP_oradata/oradata/','/instT_oradata/oradata/'
set log_file_name_convert =
'/instP_oradata/oradata/','/instT_oradata/oradata/'
release channel aux_01;
release channel aux_02;
}
but we are getting this error message:
RMAN> connect target *
2> connect catalog *
3> connect auxiliary *
4> run {
5> allocate auxiliary channel 'aux_01' type sbt;
6> allocate auxiliary channel 'aux_02' type sbt;
7>
8> send 'NB_ORA_CLIENT=hostP.corp.dom';
9> set until time "to_date('24-Jun-11 10:22:00','DD-MON-YY HH24:MI:SS')";
10> duplicate target database to auxT nofilenamecheck;
11> set db_file_name_convert
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "db_file_name_convert": expecting one of: "archivelog, auxiliary, auxname, autolocate, autobackup, backup, command, controlfile, clonename, decryption, dbid, duplex, echo, encryption, high, limit, maxcorrupt, maxseq, newname, nocfau, parallelmediarestore, rpc, snapshot, until"
I have a couple of questions:
1) these are two different hosts, but the file system names are different, should we be using nofilenamecheck?
2) when doing a cat of the spfile, even though we put the convert commands in the pfile and then created the spfile from the pfile, it doesn't show the convert commands.
3) can you use set commands in a run block for convert or should they just be in the pfile?
The basic path of what we are doing is:
create pfile with the last two commands of db_file_name_convert and log_file_name_convert
verify the password file
stop the listener (aux db)
shutdown immediate (aux db)
startup nomount with new pfile (aux db)
create spfile from new pfile (aux db)
shutdown abort (aux db)
startup (aux db)
start listener
run rman{ run block command - see above} --THIS IS WHERE WE ARE STUCK
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
"Prevents RMAN from checking whether target datafiles sharing the same names as the duplicated files are in use. Note that the NOFILENAMECHECK option is required when the standby and primary datafiles and logs have identical filenames."
You are using db_file_name_convert to rename the files, I don't think you nneed to use NOFILENAMECHECK option.
Thanks,
Thomas Saviour(royxavier@yahoo.com)
Technical Lead (Databases)
Thomson Reuters (Markets)
duplicate target database to dev nofilenamecheck
pfile=/u01/app/oracle/product/10g/dbs/initdev.ora
#### This is the exact end time of your full database backup on PROD
until time="TO_DATE('07/02/11:06:39:26','MM/DD/YY,HH24:MI:SS')";
exit
EOT
If the database was busy during the backup, you will have to apply archive files from
PROD to your dev machine.
If your stuck on that part open another thread and I can show you how to get the
arch files you need and apply them....
I am so GLAD I have a DEV database, because I horked it up pretty good. All my senior DBA cohorts are on vacation, working on other projects and in general being super busy, so I try to figure as much stuff as I can on my own before really bothering them, so this helps. I'm working with two DEV databases right now and I think I got them both in an interesting state. The first one is 11g which was GREAT because I figured out how to a duplicate from an active database which worked a little too wonderful, this one happened to also have TDE on a table and it had a wallet and now I am getting a master key not found even though the wallets both had the same password. Sigh. The second DEV database is 10 and again, I can't start it in anything but mount mode after trying to duplicate using RMAN and somehow losing something along the way. I have a question. My main goal is just to really duplicate them from Production using rman and whatever I read, I don't understand what happens to the currently existing datafiles, control files, etc. Are they just deleted or overwritten when the RMAN script runs a duplicate? Am I making my life more complicated by not just blowing everything away and then doing a duplicate? Thanks for any answers.
Also, another question is since the duplicate command is run from the auxiliary database, why does everyone say make sure there is a full backup on the prod machine since RMAN is being used to duplicate the files from tape?
Bookmarks