This discussion is archived
7 Replies Latest reply: Sep 1, 2013 12:35 AM by Dacoco RSS

Creating new database from RMAN Backup - TNS Problems

Dacoco Newbie
Currently Being Moderated

Hi,

 

as my productive database has a problem with oracle net and i can't fix it by now (see another thread), i created a backup of the productive machine and tried to recreate the database on the development machine as described by e.g. here http://dba-oracle.com/t_rman_clone_copy_database.htm.

 

 

The very first steps are to set the ORACLE_SID and HOME to the new databasename and restore the controlfile via rman. This is where i encounter the problem:

 

 

C:\>SET ORACLE_HOME=newdb

C:\>edit initnewdb.ora (and change paths for controlfiles, trace etc.)

C:\>copy initnewdb.ora C:\app\oracle\product\11.2.0\dbhome_1\database

C:\>edit tnsnames.ora (and add newdb)

C:\>orapwd file=C:\app\oracle\product\11.2.0\dbhome_1\database\PWDnewdb.ora password=pass

C:\>rman target sys/pass@newdb

 

Recovery Manager: Release 11.2.0.3.0 - Production on Sa Aug 31 12:30:59 2013

 

[..]

RMAN-04005: Fehler aus Zieldatenbank:

ORA-12514: TNS: Listener kann in Connect-Deskriptor angegbenen Service aktuell nicht auflösten

 

 

C:\>rman target/

 

 

Recovery Manager: Release 11.2.0.3.0 - Production on Sa Aug 31 12:30:59 2013

[..]

RMAN-04005: Fehler aus Zieldatenbank:

ORA-12560: TNS: Fehler bei Protokolladapter

 

 

 

 

Why does it not work to connect to the database like in the example ("connected to target database (not started)")?

 

 

Thank you!

  • 1. Re: Creating new database from RMAN Backup - TNS Problems
    sb92075 Guru
    Currently Being Moderated

    >ORA-12560: TNS: Fehler bei Protokolladapter

    Do both database & listener OS Service exist & is running  prior to invoking RMAN?

     

    >ORA-12514: TNS: Listener kann in Connect-Deskriptor angegbenen Service aktuell nicht auflösten

     

    The listener log file recorded this failed attempt.

    locate the line in listener log file which contains 12514 status code.

     

    Post excerpt from listener log file which contains a few lines above & a few line below the lines with 12514 status code.

  • 2. Re: Creating new database from RMAN Backup - TNS Problems
    Dacoco Newbie
    Currently Being Moderated
    Do both database & listener OS Service exist & is running  prior to invoking RMAN?

    Yes, because another database (the development one) is up and running on the machine (same oracle home)

     

    Post excerpt from listener log file which contains a few lines above & a few line below the lines with 12514 status code.

     

    Sat Aug 31 20:53:01 2013
    WARNING: Subscription for node down event still pending
    31-AUG-2013 20:53:01 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=SYSTEM))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647296)) * status * 0
    Sat Aug 31 20:53:31 2013
    31-AUG-2013 20:53:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=lkadb_restored_from_backup)(CID=(PROGRAM=c:\app\oracle\product\11.2.0\dbhome_1\bin\rman.exe)(HOST=MEINSERVER)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::f415:5be6:1f53:ab8c%10)(PORT=61220)) * establish * newdb * 12514
    TNS-12514: TNS: Listener kann in Connect-Deskriptor angegebenen Service aktuell nicht auflösen
    31-AUG-2013 20:53:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=lkadb_restored_from_backup)(CID=(PROGRAM=c:\app\oracle\product\11.2.0\dbhome_1\bin\rman.exe)(HOST=
    MEINSERVER)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2002:102:4bb::102:4bb)(PORT=61221)) * establish * newdb * 12514
    TNS-12514: TNS: Listener kann in Connect-Deskriptor angegebenen Service aktuell nicht auflösen
    31-AUG-2013 20:53:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=lkadb_restored_from_backup)(CID=(PROGRAM=c:\app\oracle\product\11.2.0\dbhome_1\bin\rman.exe)(HOST=
    MEINSERVER)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=1.2.4.187)(PORT=61222)) * establish * newdb * 12514
    TNS-12514: TNS: Listener kann in Connect-Deskriptor angegebenen Service aktuell nicht auflösen

     

  • 3. Re: Creating new database from RMAN Backup - TNS Problems
    sb92075 Guru
    Currently Being Moderated

    Dacoco wrote:

     

    Do both database & listener OS Service exist & is running  prior to invoking RMAN?

    Yes, because another database (the development one) is up and running on the machine (same oracle home)

     

    Post excerpt from listener log file which contains a few lines above & a few line below the lines with 12514 status code.

     

    Sat Aug 31 20:53:01 2013
    WARNING: Subscription for node down event still pending
    31-AUG-2013 20:53:01 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=SYSTEM))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647296)) * status * 0
    Sat Aug 31 20:53:31 2013
    31-AUG-2013 20:53:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=lkadb_restored_from_backup)(CID=(PROGRAM=c:\app\oracle\product\11.2.0\dbhome_1\bin\rman.exe)(HOST=MEINSERVER)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::f415:5be6:1f53:ab8c%10)(PORT=61220)) * establish * newdb * 12514
    TNS-12514: TNS: Listener kann in Connect-Deskriptor angegebenen Service aktuell nicht auflösen
    31-AUG-2013 20:53:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=lkadb_restored_from_backup)(CID=(PROGRAM=c:\app\oracle\product\11.2.0\dbhome_1\bin\rman.exe)(HOST=
    MEINSERVER)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2002:102:4bb::102:4bb)(PORT=61221)) * establish * newdb * 12514
    TNS-12514: TNS: Listener kann in Connect-Deskriptor angegebenen Service aktuell nicht auflösen
    31-AUG-2013 20:53:31 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=lkadb_restored_from_backup)(CID=(PROGRAM=c:\app\oracle\product\11.2.0\dbhome_1\bin\rman.exe)(HOST=
    MEINSERVER)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=1.2.4.187)(PORT=61222)) * establish * newdb * 12514
    TNS-12514: TNS: Listener kann in Connect-Deskriptor angegebenen Service aktuell nicht auflösen

     

     

    Each database requires its own OS Service.

     

    >(SERVICE_NAME=lkadb_restored_from_backup)

    listener throws error because it does not know about the requested SERVICE_NAME above

     

    You can see all services the listener knows about by issuing OS command below

     

    lsnrctl service

     

    RMAN must utilize a SERVICE_NAME that  is known by the listener

  • 4. Re: Creating new database from RMAN Backup - TNS Problems
    Dacoco Newbie
    Currently Being Moderated

    But there is no really database by now, i just wanted to restore the controlfile to restore the database to the new destination.

     

    Okay - how can i create the OS Service for the database?

    When i type "lsnrctl service" the new sid is (of course) not there.

     

    How can i fix this? I use dynamic registration and i don't have a listener file configured yet.

  • 5. Re: Creating new database from RMAN Backup - TNS Problems
    sb92075 Guru
    Currently Being Moderated

    Dacoco wrote:

     

    But there is no really database by now, i just wanted to restore the controlfile to restore the database to the new destination.

     

    Okay - how can i create the OS Service for the database?

    When i type "lsnrctl service" the new sid is (of course) not there.

     

    How can i fix this? I use dynamic registration and i don't have a listener file configured yet.

     

    GOOGLE using the keywords below

     

    oracle listener static registration

  • 6. Re: Creating new database from RMAN Backup - TNS Problems
    Justin_Mungal Journeyer
    Currently Being Moderated

    Not sure why no one mentioned it, but you can create the OS-level service with the oradim utility.

     

    Using ORADIM to Administer an Oracle Database Instance:

    Postinstallation Database Creation on Windows

  • 7. Re: Creating new database from RMAN Backup - TNS Problems
    Dacoco Newbie
    Currently Being Moderated

    Not sure why no one mentioned it, but you can create the OS-level service with the oradim utility.

     

    Using ORADIM to Administer an Oracle Database Instance:

    Postinstallation Database Creation on Windows

     

    Thank you, that worked fine and was exactly what i needed.

Legend

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