Hi,
I'm having problem stablishing connection with OraDirect 3.50 when using tnsname based connectionString. Specifically my connectionString is:
"Server=test_db;User Id=admin;Password=admin"
and when i try to open the connection an exception occur:
"ORA-12154: TNS:Could not resolve service name".
The strange is that with the same info i can connect perfectly using SQLPlus; and i can connect to this oracle server using direct mode, i mean, using this connectionString:
"Direct=true;Server=sal-emp-dsk-06;Port=1521;SID=orcl;User Id=admin;Password=admin"
The tnsname entry test_db is:
test_db =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sal-emp-dsk-06)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
)
)
Please i will appraise any help. I already re-install my oracle server and client softwares, and i'm still having the same problem.
PD: I have a suggestion for the web site developers... please add a search functionality for the forum pages. THANKS!!
Problem opening a tnsname based connection (ORA-12154)...
You need a space in every line starting from the second:
Code: Select all
test_db =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sal-emp-dsk-06)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
)
)
Re: Problem opening a tnsname based connection (ORA-12154)...
Well, the spaces are there, seems like in the copy-paste where removed, but are there. Any way, i added more spaces in every line and the problem persist.
I have only one Oracle Home. I am really very amazed because these problem appear form one day to other, apparently without any change, because i was working very well one day and the next day, the problem appear; and the most surprised thing is that this problem only occur with the CoreLab, because with other tools that enable connections to Oracle (SQLPlus, TOAD, etc), that use the same OCI connection elements, this problem don't occur.
We have never experienced such problems.
Maybe there is some obsolete parts from another client on your PC. This can be verified if you attach to your application in unmanaged mode and see what DLLs and from what paths are loaded.
Alternatively, you can work around tnsnames.ora if you set your connection string like this:
Maybe there is some obsolete parts from another client on your PC. This can be verified if you attach to your application in unmanaged mode and see what DLLs and from what paths are loaded.
Alternatively, you can work around tnsnames.ora if you set your connection string like this:
Code: Select all
Server=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sal-emp-dsk-06)(PORT = 1521)) ) (CONNECT_DATA = (SID = orcl) ) )