Data Backup and Recovery

Oracle TNS error when cloning

jimshomer
3,692 Views

Hello all,

This worked very well in the past (several weeks ago) but suddenly it caused problem today. I am cloning from a backup to a new host (same host that worked for me before) and got the following error from SMO. It worked fine if I cloned to the same host (but this is not what we do in reality:)

--[ERROR] SMO-13032: Cannot perform operation: Clone Create.  Root  cause: ORACLE-00001: Error executing SQL: [STARTUP NOMOUNT EXCLUSIVE  PFILE=/home/oracle2/102/dbs/initdentoncl.ora;].  The command returned:  ORA-12154: TNS:could not resolve the connect identifier specified
ORA-12154: TNS:could not resolve the connect identifier specified

I would appreciate any help.

Many thanks,

JS

All messages from SMO (GUI or CLI):

--[ INFO] SMO-13046: Operation GUID 233989e22bd02e6d012bd02e70d70001 starting on Profile ORA10GF_PROFILE
--[ INFO] SMO-04030: Validating uniqueness of new SID "dentoncl".
--[ INFO] SMO-04040: Using ORACLE_HOME of "/home/oracle2/102" from clonespec for clone.
--[ INFO] SMO-04042: Using Oracle OS account "oracle" from clonespec for clone.
--[ INFO] SMO-04044: Using Oracle OS group "dba" from clonespec for clone.
--[ INFO] SMO-07127: Locked database for SnapManager operations - created lock file "/home/oracle2/102/dbs/.sm_lock_dentoncl" on host denton.se.houston.geoquest.slb.com.
--[ INFO] SD-00025: Beginning to connect filesystem(s) [/home/vol2_oracle, /home/oracle2] from snapshot smo_ora10gf_profile_ora10gf_f_h_at_122759_on_20101021_1_2339899f2bcfd512012bcfd51c050001_0_mybackup.
--[ INFO] SD-00016: Discovering storage resources for /home/vol2_oracle_DENTONCL.
--[ INFO] SD-00017: Finished storage discovery for /home/vol2_oracle_DENTONCL.
--[ INFO] SD-00016: Discovering storage resources for /home/oracle2_DENTONCL.
--[ INFO] SD-00017: Finished storage discovery for /home/oracle2_DENTONCL.
--[ INFO] SD-00026: Finished connecting filesystem(s) [/home/vol2_oracle, /home/oracle2] from snapshot smo_ora10gf_profile_ora10gf_f_h_at_122759_on_20101021_1_2339899f2bcfd512012bcfd51c050001_0_mybackup.
--[ INFO] SD-00025: Beginning to connect filesystem(s) [/home/oracle2] from snapshot smo_ora10gf_profile_ora10gf_f_h_at_122833_on_20101021_2_2339899f2bcfd512012bcfd51c050001_0_mybackup.
--[ INFO] SD-00016: Discovering storage resources for /opt/NetApp/smo/mnt/-home-oracle2-20101021140537689_0.
--[ INFO] SD-00017: Finished storage discovery for /opt/NetApp/smo/mnt/-home-oracle2-20101021140537689_0.
--[ INFO] SD-00026: Finished connecting filesystem(s) [/home/oracle2] from snapshot smo_ora10gf_profile_ora10gf_f_h_at_122833_on_20101021_2_2339899f2bcfd512012bcfd51c050001_0_mybackup.
--[ INFO] ORACLE-00502: Adding entry for database dentoncl in /etc/oratab.
--[ INFO] SMO-07300: Beginning clone of database "ORA10GF" to SID "dentoncl" on host "denton".
--[ INFO] SMO-07302: Generating parameter file for "dentoncl" at "/home/oracle2/102/dbs/initdentoncl.ora".
--[ INFO] SMO-07303: Generating password file for "dentoncl" at "/home/oracle2/102/dbs/orapwdentoncl".
--[ INFO] SMO-07304: Starting up database "dentoncl" in NOMOUNT mode.
--[ERROR] SMO-13032: Cannot perform operation: Clone Create.  Root cause: ORACLE-00001: Error executing SQL: [STARTUP NOMOUNT EXCLUSIVE PFILE=/home/oracle2/102/dbs/initdentoncl.ora;].  The command returned: ORA-12154: TNS:could not resolve the connect identifier specified
ORA-12154: TNS:could not resolve the connect identifier specified
--[ INFO] SMO-07316: Shutting down database "dentoncl".
--[ INFO] SMO-07317: Deleting file "/home/oracle2/102/dbs/initdentoncl.ora".
--[ INFO] SMO-07317: Deleting file "/home/oracle2/admin/dentoncl/bdump".
--[ INFO] SMO-07317: Deleting file "/home/oracle2/admin/dentoncl/cdump".
--[ INFO] SMO-07317: Deleting file "/home/oracle2/admin/dentoncl/udump".
--[ INFO] SMO-07317: Deleting file "/home/oracle2/102/dbs/orapwdentoncl".
--[ INFO] SMO-04038: Deleting now empty directory "/home/oracle2/admin/dentoncl"
--[ INFO] ORACLE-00503: Removing entry for database dentoncl from /etc/oratab.
--[ INFO] SD-00031: Beginning to disconnect filesystem(s) [/opt/NetApp/smo/mnt/-home-oracle2-20101021140537689_0].
--[ INFO] SD-00032: Finished disconnecting filesystem(s) [/opt/NetApp/smo/mnt/-home-oracle2-20101021140537689_0].
--[ INFO] SD-00031: Beginning to disconnect filesystem(s) [/home/oracle2_DENTONCL, /home/vol2_oracle_DENTONCL].
--[ INFO] SD-00032: Finished disconnecting filesystem(s) [/home/oracle2_DENTONCL, /home/vol2_oracle_DENTONCL].
--[ INFO] SMO-07131: Unlocked database for SnapManager operations - removed lock file "/home/oracle2/102/dbs/.sm_lock_dentoncl" on host denton.se.houston.geoquest.slb.com.
--[ INFO] SMO-13039: Successfully aborted operation: Clone Create
--[ERROR] SMO-13048: Clone Create Operation Status: FAILED
--[ INFO] SMO-13049: Elapsed Time: 0:00:56.197

3 REPLIES 3

nithyana
3,692 Views

Hi JS,

Can you please verify the tnsnames.ora and sqlnet.ora file. It seems some thing went wrong in these file, please verify and post me your comments.

Thanks,

Nithyananthan S

.

jimshomer
3,692 Views

Nithyananthan,

Yes it seemed so to me but I couldn't figure out why. After posting  yesterday I started a listener (with no services) on the host where I would  have the clone database and restarted the clone operation. I did  not have error "ORA-12154: TNS:could not resolve the connect identifier  specified" anymore, but exactly in the same place I now have "--[ERROR]  SMO-13032: Cannot perform operation: Clone Create.  Root cause:  ORACLE-00001: Error executing SQL: [STARTUP NOMOUNT EXCLUSIVE  PFILE=/home/oracle2/102/dbs/initcroden1.ora;].  The command returned:  ORA-01031: insufficient privileges
ORA-01031: insufficient privileges"

Interesting if I started the clone operation right from the host where  the clone database would be on on then it worked (previously I started it  on the host where the source database is). So this seemed like it is  something related to SMO doing the STARTUP NOMOUNT  from a remote host that  caused the problem. Not sure about how SMO sets itself up to connect to a  remote host where the clone database will be on. Any ideas? Here are my  sqlnet.ora and tnsnames.ora.

Many thanks,

JS



AUTOMATIC_IPC = ON
TRACE_LEVEL_CLIENT = OFF
SQLNET.EXPIRE_TIME = 0
NAMES.DEFAULT_DOMAIN = world
NAME.DEFAULT_ZONE = world
SQLNET.AUTHENTICATION_SERVICES = (ALL)
NAMES.DIRECTORY_PATH= (TNSNAMES, LDAP, EZCONNECT)

----

STARTUP_WAIT_TIME_LISTENER = 0

LISTENER =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = IPC)(KEY = mylistenerkey))
     (ADDRESS = (COMMUNITY = TCP.world)(PROTOCOL = TCP)(Host =  croix)(Port = 1521))
   )

LISTENER_DENTON =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = IPC)(KEY = mylistenerkey))
     (ADDRESS = (COMMUNITY = TCP.world)(PROTOCOL = TCP)(Host =  denton)(Port = 1521))
   )

CONNECT_TIMEOUT_LISTENER = 10

SID_LIST_LISTENER =
   (SID_LIST =
     (SID_DESC =
       (GLOBAL_DBNAME = rxprod)
       (ORACLE_HOME = /home/oracle2/102/)
       (SID_NAME = rxprod)
     )
     (SID_DESC =
       (GLOBAL_DBNAME = clone)
       (ORACLE_HOME = /home/oracle2/102/)
       (SID_NAME = clone)
     )
     (SID_DESC =
       (GLOBAL_DBNAME = smo)
       (ORACLE_HOME = /home/oracle/OraHome1)
       (SID_NAME = smo)
     )
   )

TRACE_LEVEL_LISTENER = OFF

nithyana
3,692 Views

The issue could be due to environment reason. Please verify that both the host has same oracle user and os group configuration. If this differs, the clone creation environment section needs to be modified accordingly.

If you are performing remote clone operation using CLI (Command Line Interface), then in the clone specification xml file please update the oracle-os-account's username and group tag values aligning to the remote host.

And If you are using GUI (Graphical User Interface) then in Clone Specification page please update the user and group in the environment section.

Thanks,

Nithyananthan S

Public