I was worried many times while I was trying to connect to a oracle data base server with this error.
For the first time when you install oracle10g client software select Administrator, so that you can configure your local machine to a remote data base server through configuration management tool provided iff you install administrator.
Once you have configured to a data base, you can find it in a text file (tnsnames.ora) located at oracle installation path sub directory network\admin.
Ex :-
DPG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbdev)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = dpg)
)
)
DPG | Database service name you configure |
dbdev | Oracle data base server name |
SID | Data base name on server |
Once it is configured, you can connect to this data base with any user name created to this data base. Funny thing is, I still observed TNS Error while doing all the above steps. I created a new application (.NET) and used oracleclient.dll to connect to this configured data base.Shocking is I am able to connect to this configured data base from other application but not with this new application. I believe this step surely avoids the error you get. Observe the path where application is, if there is any folder that contains ‘(‘or ‘)’ in folder name or path with ‘(‘or ‘)’ in it then definitely you will get this TNS error even if you are configured. The new application which is throwing TNS Error is because I saved this application in path having ‘)’ and ‘(‘. Hope this helps you :).
No comments:
Post a Comment