Print Thread
TNS path change
#44577 09/17/12 01:35 PM
Joined: Sep 2012
Posts: 2
J
Jim123 Offline OP
Member
OP Offline
Member
J
Joined: Sep 2012
Posts: 2
Hi,

I'm using PL/SQL 7.1.5.1398. My TNS file is place in "C:\Program Files\Common Files\Oracle\NETWORK\ADMIN". But I dont have write access in this location. I need to add more TNS entries and place it to a different location(Say D:\TNS.ora) and I want my PL/SQL developer to point to this new location.

I request you to please guide me how to do this? Thanks.

Jim.

Re: TNS path change
Jim123 #44578 09/17/12 01:54 PM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
You will need to define TNS_ADMIN, which is the directory where the tnsnames.ora and sqlnet.ora file are searched by the Oracle client. You can either define it in the registry for a specific Oracle Home (HKEY_LOCAL_MACHINE\Software\Oracle\Key_<HomeName>\TNS_ADMIN) or as an environment variable for all Oracle Homes.


Marco Kalter
Allround Automations
Re: TNS path change
Marco Kalter #44604 09/21/12 06:38 AM
Joined: Sep 2012
Posts: 2
J
Jim123 Offline OP
Member
OP Offline
Member
J
Joined: Sep 2012
Posts: 2
Thanks Marco. I don't have admin rights. Is it possible to solve the issue?

Rgds,
Jim

Re: TNS path change
Jim123 #44610 09/21/12 09:26 AM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
You don't need admin rights to set a user environment variable. You can even set it from a script:

Code
set tns_admin=<directory>
"C:\Program Files\PLSQL Developer\plsqldev.exe"


Marco Kalter
Allround Automations
Re: TNS path change
Marco Kalter #51533 05/27/15 10:52 AM
Joined: May 2015
Posts: 2
D
Member
Offline
Member
D
Joined: May 2015
Posts: 2
Hi,
I have the same problem with tnsnames.ora.
I do not have a permitions for changing default folder for TNS.
So, i used your advise. I changed TNS_ADMI directory.
SQL Developer found my TNS file, but PL/SQL developer did not change TNS path.
Reboot does not help frown
Please advice.

Re: TNS path change
DoNotPanic #51539 05/28/15 09:55 AM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
How exactly did you change your TNS_ADMIN directory?


Marco Kalter
Allround Automations
Re: TNS path change
Marco Kalter #51545 05/28/15 02:05 PM
Joined: May 2015
Posts: 2
D
Member
Offline
Member
D
Joined: May 2015
Posts: 2
It really works. Thx smile
I used PL/SQL developer from remote PC.
So, it was updated only after parent PC's reboot.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.036s Queries: 15 (0.009s) Memory: 2.5211 MB (Peak: 3.0397 MB) Data Comp: Off Server Time: 2024-03-28 21:27:28 UTC
Valid HTML 5 and Valid CSS