We help IT Professionals succeed at work.

How do I resolve ORA-12514: TNS:listener does not currently know of service requested in

sikyala
sikyala used Ask the Experts™
on
When I type emca -repos create
I get prompted with the question:

Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 22, 2011 3:16:49 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /raquel/u01/app/oracle/product/10.2.0.1/cfgtoollogs/emca/tems/emca_2011-07-22_03-16-08-PM.log.
Jul 22, 2011 3:16:50 PM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: Dbcontrol Repository already exists.  Fix the error(s) and run EM Configuration Assistant again in standalone mode.

Now when I type emca -repos recreate

I get the following error in the log file:
WARNING: ORA-12514: TNS:listener does not currently know of service requested in
 connect descriptor
 
The database is online and the listener as well. I don't know how to fix this. Can someone help me?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012
Commented:
Make sure you have all the brackets properly placed in the listener. Make sure you have service name spelled properly

http://ora-12514.ora-code.com/
Chakravarthi AyyalaDatabase Administrator

Commented:
What is the output for the command "lsnrctl services"?
I doubt the listener is listening to any DB services.
sikyalaSenior Database Administrator

Author

Commented:
LSNRCTL for Solaris: Version 10.2.0.5.0 - Production on 04-AUG-2011 15:25:18

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

lsnrctl services LISTENER

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
Services Summary...
Service "tems.usae.bah.com" has 1 instance(s).
  Instance "tems", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:113571 refused:80
         LOCAL SERVER
The command completed successfully


The oracle sid is tems
Top Expert 2009
Commented:
If lsnrctl services doesn't show the database service you can try 2 things:

1) Try forcing registration: sqlplus sys / as sysdba
SQL> alter system register;

Then look at services again.

2) Edit the listener.ora and manually add the service for that instance. I prefer this anyway as it is less error prone.
Top Expert 2009

Commented:
So can you login to tems via TNS?

sqlplus system/<pass>@tems


Does tnsnames.ora have the correct alias for tems?
sikyalaSenior Database Administrator

Author

Commented:
yes

tnsnames.ora

tems.USAE.BAH.COM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = backupdb)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = tems.usae.bah.com)
    )
  )
Top Expert 2012

Commented:
Run alter system register
Chakravarthi AyyalaDatabase Administrator

Commented:
This "Instance "tems", status UNKNOWN, has 1 handler(s) for this service...
should go to a READY state and then you are good.

You can check the status of the service through "lsnrctl status" command too.

sikyalaSenior Database Administrator

Author

Commented:
I executed alter system register

$ lsnrctl status

LSNRCTL for Solaris: Version 10.2.0.5.0 - Production on 04-AUG-2011 15:39:07

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 10.2.0.5.0 - Production
Start Date                04-AUG-2011 15:38:57
Uptime                    0 days 0 hr. 0 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /raquel/u01/app/oracle/product/10.2.0.1/network/admin/listener.ora
Listener Log File         /raquel/u01/app/oracle/product/10.2.0.1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=backupdb)(PORT=1522)))
Services Summary...
Service "tems.usae.bah.com" has 1 instance(s).
  Instance "tems", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
Looks like you have domains set in the database.  What does your sqlnet.ora file look like?  You might need to set the default domain or specify the full name in your connects: tems.usae.bah.com

Fyi: is that not a 'sensitive' domain name?  In other words, should you be posting it in a public site?
sikyalaSenior Database Administrator

Author

Commented:
I didn't think it was sensitive because it isn't an IP address. in the sqlnet file the names.default_domain is set to usae.bah.com

NAMES.DEFAULT_DOMAIN = usae.bah.com

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES)
 
Most Valuable Expert 2012
Distinguished Expert 2018

Commented:
>>I didn't think it was sensitive because it isn't an IP address

C:\>nslookup usae.bah.com
Address:  10.128.0.5
Name:    usae.bah.com

>>NAMES.DEFAULT_DOMAIN = usae.bah.com

from a command prompt try: tnsping tems.usae.bah.com
sikyalaSenior Database Administrator

Author

Commented:
that is not the IP

tnsping comes back ok
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
Are you still getting the tnsnames error when you recreate the repository?

I suggest you drop and recreate the repository.  I never liked the rebuild option.
sikyalaSenior Database Administrator

Author

Commented:
thanks