This discussion is archived
11 Replies Latest reply: Oct 11, 2012 4:41 AM by 937383 RSS

rman 03002 030015 04006 duplicate db

937383 Newbie
Currently Being Moderated
Hi,

i am trying to duplicate database on another oracle server.
i am getting following errors when i use command in rman
orapwd was created on original /source/ db and transferred to destination server.

rman auxiliary sys/pwd@ORA

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Oct 2 02:37:51 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to auxiliary database: ORA (not mounted)

RMAN> duplicate database to "ora" backup location "O:\backup";

Starting Duplicate Db at 02-OCT-12

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

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 10/02/2012 02:38:36
RMAN-03015: error occurred in stored script Memory Script
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

RMAN>


when i try to reconnect to rman it throws:


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

i have to startup in nomount again

ORARCLE_SID is set to ora

backup of db was created from source db by:

RMAN> run{
2> configure controlfile autobackup format for device type disk to 'd:/backup/%F';
3> configure controlfile autobackup on;
4> allocate channel d1 type disk;
5> backup tag FULL_DB format 'd:/backup/db_%t_%s.bk' (database);
6> release channel d1;
7> }

please help, i am fighting with this for a while. let me know if i forgot to mention something.

Edited by: 934380 on Oct 2, 2012 3:10 AM

Edited by: 934380 on Oct 2, 2012 3:10 AM

Edited by: 934380 on Oct 2, 2012 3:11 AM
  • 1. Re: rman 03002 030015 04006 duplicate db
    mseberg Guru
    Currently Being Moderated
    Hello;

    Generally this error is caused by a wrong setting in listener static registration of standby database.

    Compare the Oracle Net Setup here to yours :

    http://www.visi.com/~mseberg/rman/active_database_duplicating.html

    Make sure the database in the SID_LIST_LISTENER section of LISTENER.ORA and your TNSNAMES. With out these setting duplication will fail.

    Best Regards

    mseberg
  • 2. Re: rman 03002 030015 04006 duplicate db
    937383 Newbie
    Currently Being Moderated
    thank you, i can see some differences.
  • 3. Re: rman 03002 030015 04006 duplicate db
    937383 Newbie
    Currently Being Moderated
    ok i fixed the issue with global db name in listener, but duplication failed.

    RMAN> duplicate database to orcl12 backup location "O:\backup";

    Starting Duplicate Db at 03-OCT-12

    contents of Memory Script:
    {
    sql clone "alter system set db_name =
    ''ORCL12'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    sql clone "alter system set db_unique_name =
    ''ORCL12'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    shutdown clone immediate;
    startup clone force nomount
    restore clone primary controlfile from 'O:\backup\C-3355586342-20121002-01';

    alter clone database mount;
    }
    executing Memory Script

    sql statement: alter system set db_name = ''ORCL12'' comment= ''Modified by RM
    AN duplicate'' scope=spfile

    sql statement: alter system set db_unique_name = ''ORCL12'' comment= ''Modifie
    d by RMAN duplicate'' scope=spfile

    Oracle instance shut down

    Oracle instance started

    Total System Global Area 24251756544 bytes

    Fixed Size 2186880 bytes
    Variable Size 11811160448 bytes
    Database Buffers 12415139840 bytes
    Redo Buffers 23269376 bytes

    Starting restore at 03-OCT-12
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=63 device type=DISK

    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:08
    output file name=O:\ORACLE_BASE\ORADATA\ORCL12\CONTROL01.CTL
    output file name=O:\ORACLE_BASE\FLASH_RECOVERY_AREA\ORCL12\CONTROL02.CTL
    Finished restore at 03-OCT-12

    database mounted
    released channel: ORA_AUX_DISK_1
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=63 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/03/2012 00:41:02
    RMAN-05541: no archived logs found in target database

    i wanted to try to alter system archive log current
    once i execute startup database i get

    SQL> startup
    ORACLE instance started.

    Total System Global Area 2.4252E+10 bytes
    Fixed Size 2186880 bytes
    Variable Size 1.1811E+10 bytes
    Database Buffers 1.2415E+10 bytes
    Redo Buffers 23269376 bytes
    Database mounted.
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

    then i did startup in nomount mode
    alter database open resetlogs gives me:


    alter database open resetlogs
    *
    ERROR at line 1:
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1: 'E:\APP\ORCLVV11\ORADATA\ORCL12\SYSTEM01.DBF' --> which is location in my old server

    how to fix it? any suggestions?

    Edited by: 934380 on Oct 3, 2012 1:18 AM
  • 4. Re: rman 03002 030015 04006 duplicate db
    937383 Newbie
    Currently Being Moderated
    should i manually alter db to fix paths to dbf files?
    from old to new paths?
  • 5. Re: rman 03002 030015 04006 duplicate db
    MahirM.Quluzade Guru
    Currently Being Moderated
    934380 wrote:
    ok i fixed the issue with global db name in listener, but duplication failed.

    RMAN> duplicate database to orcl12 backup location "O:\backup";

    Starting Duplicate Db at 03-OCT-12

    contents of Memory Script:
    {
    sql clone "alter system set db_name =
    ''ORCL12'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    sql clone "alter system set db_unique_name =
    ''ORCL12'' comment=
    ''Modified by RMAN duplicate'' scope=spfile";
    shutdown clone immediate;
    startup clone force nomount
    restore clone primary controlfile from 'O:\backup\C-3355586342-20121002-01';

    alter clone database mount;
    }
    executing Memory Script

    sql statement: alter system set db_name = ''ORCL12'' comment= ''Modified by RM
    AN duplicate'' scope=spfile

    sql statement: alter system set db_unique_name = ''ORCL12'' comment= ''Modifie
    d by RMAN duplicate'' scope=spfile

    Oracle instance shut down

    Oracle instance started

    Total System Global Area 24251756544 bytes

    Fixed Size 2186880 bytes
    Variable Size 11811160448 bytes
    Database Buffers 12415139840 bytes
    Redo Buffers 23269376 bytes

    Starting restore at 03-OCT-12
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=63 device type=DISK

    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:08
    output file name=O:\ORACLE_BASE\ORADATA\ORCL12\CONTROL01.CTL
    output file name=O:\ORACLE_BASE\FLASH_RECOVERY_AREA\ORCL12\CONTROL02.CTL
    Finished restore at 03-OCT-12

    database mounted
    released channel: ORA_AUX_DISK_1
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=63 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 10/03/2012 00:41:02
    RMAN-05541: no archived logs found in target database

    i wanted to try to alter system archive log current
    once i execute startup database i get

    SQL> startup
    ORACLE instance started.

    Total System Global Area 2.4252E+10 bytes
    Fixed Size 2186880 bytes
    Variable Size 1.1811E+10 bytes
    Database Buffers 1.2415E+10 bytes
    Redo Buffers 23269376 bytes
    Database mounted.
    ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

    then i did startup in nomount mode
    alter database open resetlogs gives me:


    alter database open resetlogs
    *
    ERROR at line 1:
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1: 'E:\APP\ORCLVV11\ORADATA\ORCL12\SYSTEM01.DBF' --> which is location in my old server

    how to fix it? any suggestions?

    Edited by: 934380 on Oct 3, 2012 1:18 AM
    Then you must use ALTER SYSTEM SWITCH LOGFILE; - for manually archive current logfile.

    Try again DUPLICATE command


    Regards
    Mahir M. Quluzade
    http://www.mahir-quluzade.com
  • 6. Re: rman 03002 030015 04006 duplicate db
    937383 Newbie
    Currently Being Moderated
    Hi Mahir,

    thanks but this command can be used only if db is open, right?
  • 7. Re: rman 03002 030015 04006 duplicate db
    mseberg Guru
    Currently Being Moderated
    Hello;

    With this error ( RMAN-05541 ) I believe you need to :
    SQL> alter system archive log current;
    Then proceed with the duplication :
    RMAN> duplicate target database to ...
    Supporting Oracle note :

    OERR:RMAN 5541 no archived logs found in target database [ID 1365397.1]

    Or follow this tested step by step :

    http://www.visi.com/~mseberg/rman/diff_database_duplicating.html

    Best Regards

    mseberg

    Edited by: mseberg on Oct 3, 2012 6:30 AM

    h2. Thanks Mahir!
  • 8. Re: rman 03002 030015 04006 duplicate db
    MahirM.Quluzade Guru
    Currently Being Moderated
    Sorry I'm late.

    Yes, you are right, when database is not opened you cannot call ALTER SYSTEM SWITCH LOGFILE command.

    But I thnk you must try :
    SQL> alter system archive log current;
    as written my friend mseberg

    Thanks
    Mahir M. Quluzade
    http://www.mahir-quluzade.com
  • 9. Re: rman 03002 030015 04006 duplicate db
    Shivananda Rao Guru
    Currently Being Moderated
    Cause: Target database was running in archived log mode, but
    control file did not have any archived log records.

    Action: Archive current log before retrying command.
    As said, archivelog current on the target database and try it. You have different methods of duplication, why not go with the "duplicate target database..from active database " method ? You can take a look at Mseberg's link.

    If any restriction on connecting to the target database and going for the duplication, then you can refer this http://shivanandarao.wordpress.com/2012/04/28/duplicating-database-without-connecting-to-target-database-or-catalog-database-in-oracle-11g/
  • 10. Re: rman 03002 030015 04006 duplicate db
    vaaru Newbie
    Currently Being Moderated
    just try

    alter database open resetlogs;
  • 11. Re: rman 03002 030015 04006 duplicate db
    937383 Newbie
    Currently Being Moderated
    i forgot to close this and i wanted to thank you guys.

    above commands helped me to complete duplication.
    thank you again.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points