ORA-12154: TNS:could not resolve service name when trying to connect to a newly created database [message #290525] |
Sat, 29 December 2007 08:19  |
Muddassar
Messages: 28 Registered: March 2007
|
Junior Member |
|
|
Hi,
I recently created a database manually named myDB (instance_name=myDB.
After successfully creating the database from sqlplus i exited. Later i tried to connect to the newly created instance as system/manager@myDB which throws the following tnsnames error:
ERROR:
ORA-12154: TNS:could not resolve service name
I could understand that the tnsnames.ora file does not contains the entry for my new instance. So, i added an entry for the same as:
MYDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = india)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = myDB)
)
)
I did this as looking into the entry for my already working instance 'test'.
I try to connect again, but am getting the same error.
I also did a tnsping myDB and get the following error:
TNS Ping Utility for 32-bit Windows: Version 9.0.1.1.1 - Production on 29-DEC-20
07 19:46:50
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
D:\oracle\ora90\network\admin\sqlnet.ora
D:\oracle\ora90\network\admin\tnsnames.ora
TNS-03505: Failed to resolve name
Any help would be appreciated.
|
|
|
|
|
|
Re: ORA-12154: TNS:could not resolve service name when trying to connect to a newly created database [message #290539 is a reply to message #290534] |
Sat, 29 December 2007 10:15   |
Muddassar
Messages: 28 Registered: March 2007
|
Junior Member |
|
|
Yes , you are right. When i connect to the test instance, i use the following:
sqlplus system/manager
Even doing a system/manager@test gives the no listener error:
ERROR:
ORA-12541: TNS:no listener
I tried to run lsnrctl services and get the following error:
LSNRCTL for 32-bit Windows: Version 9.0.1.1.1 - Production on 29-DEC-2007 2
20
Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
32-bit Windows Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=india)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
32-bit Windows Error: 61: Unknown error
Does this mean that the listener is not running. If so, how do i make it running and finally connect to the newly created database ?
|
|
|
|
|
|