Home » RDBMS Server » Backup & Recovery » DUPLICATE DATABASE WITH RMAN
DUPLICATE DATABASE WITH RMAN [message #185984] Fri, 04 August 2006 11:55 Go to next message
srcarneiro
Messages: 1
Registered: August 2006
Junior Member
Hi,

I would like some help. I have two servers:
- production.host.com
- test.host.com
A need take a backup with RMAN and make a mirror of a production database on test database. I try the following:

RMAN> run {
2> CONFIGURE AUXNAME FOR DATAFILE 1 TO '/u02/oradata/oralab/system01.dbf';
3> CONFIGURE AUXNAME FOR DATAFILE 2 TO '/u02/oradata/oralab/undotbs01.dbf';
4> CONFIGURE AUXNAME FOR DATAFILE 3 TO '/u02/oradata/oralab/sysaux01.dbf';
5> CONFIGURE AUXNAME FOR DATAFILE 4 TO '/u02/oradata/oralab/users01.dbf';
6> CONFIGURE AUXNAME FOR DATAFILE 5 TO '/u02/oradata/oralab/integracao.dbf';
7> CONFIGURE AUXNAME FOR DATAFILE 6 TO '/u02/oradata/oralab/legis_data.dbf';
8> CONFIGURE AUXNAME FOR DATAFILE 7 TO '/u02/oradata/oralab/NOVA_INTERNET';
9> CONFIGURE AUXNAME FOR DATAFILE 8 TO '/u02/oradata/oralab/legis_text.dbf';
10> CONFIGURE AUXNAME FOR DATAFILE 9 TO '/u02/oradata/oralab/log01.dbf';
11> CONFIGURE AUXNAME FOR DATAFILE 10 TO '/u02/oradata/oralab/tecwin_web.dbf';
12>
13> SQL "alter database rename file ''/u03/integra/redo01.log'' to ''/u02/oradata/oralab/redo01.log''";
14> SQL "alter database rename file ''/u03/integra/redo02.log'' to ''/u02/oradata/oralab/redo02.log''";
15> SQL "alter database rename file ''/u03/integra/redo03.log'' to ''/u02/oradata/oralab/redo03.log''";
16> SQL "alter database rename file ''/u03/integra/redo04.log'' to ''/u02/oradata/oralab/redo04.log''";
17> SQL "alter database rename file ''/u03/integra/redo05.log'' to ''/u02/oradata/oralab/redo05.log''";
18> SQL "alter database rename file ''/u03/integra/redo01b.log'' to ''/u02/oradata/oralab/redo01b.log''";
19> SQL "alter database rename file ''/u03/integra/redo02b.log'' to ''/u02/oradata/oralab/redo02b.log''";
20> SQL "alter database rename file ''/u03/integra/redo03b.log'' to ''/u02/oradata/oralab/redo03b.log''";
21> SQL "alter database rename file ''/u03/integra/redo04b.log'' to ''/u02/oradata/oralab/redo04b.log''";
22> SQL "alter database rename file ''/u03/integra/redo05b.log'' to ''/u02/oradata/oralab/redo05b.log''";
23>
24> DUPLICATE TARGET DATABASE TO oralab;
25> }






But I receive the following message error:






using target database controlfile instead of recovery catalog
auxiliary name for datafile 1 set to: /u02/oradata/oralab/system01.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 2 set to: /u02/oradata/oralab/undotbs01.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 3 set to: /u02/oradata/oralab/sysaux01.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 4 set to: /u02/oradata/oralab/users01.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 5 set to: /u02/oradata/oralab/integracao.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 6 set to: /u02/oradata/oralab/legis_data.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 7 set to: /u02/oradata/oralab/NOVA_INTERNET
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 8 set to: /u02/oradata/oralab/legis_text.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 9 set to: /u02/oradata/oralab/log01.dbf
new RMAN configuration parameters are successfully stored

auxiliary name for datafile 10 set to: /u02/oradata/oralab/tecwin_web.dbf
new RMAN configuration parameters are successfully stored

sql statement: alter database rename file ''/u03/integra/redo01.log'' to ''/u02/oradata/oralab/redo01.log''
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of sql command on default channel at 08/04/2006 14:44:36
RMAN-11003: failure during parse/execution of SQL statement: alter database rename file '/u03/integra/redo01.log' to '/u02/oradata/oralab/redo01.log'
ORA-01511: error in renaming log/data files
ORA-01512: error renaming log file /u03/integra/redo01.log - new file /u02/oradata/oralab/redo01.log not found
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

RMAN> exit


Recovery Manager complete.



I make a mirror of the logfiles in the test database, but this error persists. What´s wrong?

Sorry my english. I´m trainning!

Thanks
Re: DUPLICATE DATABASE WITH RMAN [message #185989 is a reply to message #185984] Fri, 04 August 2006 12:30 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
RMAN will NOT backup the redolog file.
So create it manually within your script (also documented in Oracle RMAN documentation)
Do something like this ( this is not an exact working script).
{
...........
...........
...........
duplicate target database to oralab
PFILE = /yourfullpath_for_pfile/initoralab.ora
LOGFILE
  group 1 ('/yourpath/redo1.log',
	'/yourpath/redo2.log',
	'/yourpath/redo3.log',
	'/yourpath/redo4.log',
	'/yourpath/redo5.log') size your_size reuse,
  group 2 ('/yourpath/redo1.log',
	'/yourpath/redo1.log',
	'/yourpath/redo2.log',
	'/yourpath/redo3.log',
	'/yourpath/redo4.log',
        '/yourpath/redo5.log')  size your_size reuse;
}
Previous Topic: Incomplete restore of datafile to external location
Next Topic: Recovery from RMAN backup files
Goto Forum:
  


Current Time: Fri May 03 01:37:25 CDT 2024