Home » RDBMS Server » Backup & Recovery » ORA-12154: TNS:could not resolve service name (Windows, 9i)
ORA-12154: TNS:could not resolve service name [message #338473] Tue, 05 August 2008 03:54 Go to next message
in.lukfai
Messages: 8
Registered: July 2008
Location: India
Junior Member
#########################################################################################################

C:\>set oracle_sid=katie3

C:\>net start oracleServiceKatie3
The OracleServicekatie3 service is starting.
The OracleServicekatie3 service was started successfully.


C:\>rman target sys/katie3@katie3

Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12154: TNS:could not resolve service name
############################################################################################


Whenever I connect to DB and mention @database_name then I always get this error:

ORA-12154: TNS:could not resolve service name


If I do not mention, just simply add user name and password then I can connect to database.

############################################################################################


C:\>rman target sys/katie3

Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database (not started)

RMAN>

############################################################################################


I have checked TNSNAMES.ORA file and service name is already there:



###########################################################################################

# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.


KATIE_LOCALHOAT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhoat)(PORT = 1521))
)
(CONNECT_DATA =
(SID = katie)
(SERVER = DEDICATED)
)
)
RMAN_LOCALHOST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SID = rman)
(SERVER = DEDICATED)
)
)
###########################################################################################

What is wrong? The main point is I would like to connect target database and then catalog database but if I mention @database_name then I could not log in.

At first, I thought it might be some wrong settings in TNSNAME.ORA file and catalog database then it was not let me connect to catalog DB. Then I try to connect only single database(target) then it shows me the same error above.

###########################################################################################

C:\>rman target sys/katie3

Recovery Manager: Release 9.2.0.1.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database (not started)

RMAN> connect catalog rman_u/rman@rman

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04004: error from recovery catalog database: ORA-12154: TNS:could not resolve service name

RMAN>

###########################################################################################
Re: ORA-12154: TNS:could not resolve service name [message #338475 is a reply to message #338473] Tue, 05 August 2008 03:57 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Read the OraFAQ Forum Guide before posting.
Re: ORA-12154: TNS:could not resolve service name [message #338517 is a reply to message #338473] Tue, 05 August 2008 05:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68653
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-12154: TNS:could not resolve the connect identifier specified
 *Cause:  A connection to a database or other service was requested using
 a connect identifier, and the connect identifier specified could not
 be resolved into a connect descriptor using one of the naming methods
 configured. For example, if the type of connect identifier used was a
 net service name then the net service name could not be found in a
 naming method repository, or the repository could not be
 located or reached.
 *Action:
   - If you are using local naming (TNSNAMES.ORA file):
      - Make sure that "TNSNAMES" is listed as one of the values of the
        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA)
      - Verify that a TNSNAMES.ORA file exists and is in the proper
        directory and is accessible.
      - Check that the net service name used as the connect identifier
        exists in the TNSNAMES.ORA file.
      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
        file.  Look for unmatched parentheses or stray characters. Errors
        in a TNSNAMES.ORA file may make it unusable.
   - If you are using directory naming:
      - Verify that "LDAP" is listed as one of the values of the
        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA).
      - Verify that the LDAP directory server is up and that it is
        accessible.
      - Verify that the net service name or database name used as the
        connect identifier is configured in the directory.
      - Verify that the default context being used is correct by
        specifying a fully qualified net service name or a full LDAP DN
        as the connect identifier
   - If you are using easy connect naming:
      - Verify that "EZCONNECT" is listed as one of the values of the
        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
        (SQLNET.ORA).
      - Make sure the host, port and service name specified
        are correct.
      - Try enclosing the connect identifier in quote marks.

   See the Oracle Net Services Administrators Guide or the Oracle
   operating system specific guide for more information on naming.

Regards
Michel
Re: ORA-12154: TNS:could not resolve service name [message #338694 is a reply to message #338473] Tue, 05 August 2008 12:14 Go to previous message
alanm
Messages: 284
Registered: March 2005
Senior Member

hi,

is the listener service up and running,
check this out from administrator services.

you tnsnames file looks for katie? not katie3


cheers

Alan
Previous Topic: Backup to tape device
Next Topic: Block Corruption through RMAN
Goto Forum:
  


Current Time: Sun May 19 19:55:53 CDT 2024