Print Thread
Custom TNSNAMES.ORA location like TOAD?
#30638 09/01/08 02:18 PM
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Member
OP Offline
Member
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Is there any way to specify the location of a custom TNSNAMES.ORA in PL/SQL Developer?

I started work at a new Oracle site today where the common PL/SQL editor of choice is TOAD. The site has a convention of rolling out TNSNAMES.ORA automatically to each oracle home, with a custom set of SID entries etc. These are not modifiable by end users. However, as a security measure not all the SIDs etc are defined in this rolled out file. Instead, the development team take a copy of the TNSNAMES file and put it in the TOAD home directory. TOAD automatically recognises this and uses this TNSNAMES file to get the name entries, overriding anything else in any of the other Oracle Homes. What this means that I can't use PL/SQL Developer at this site, which is VERY disappointing, as PL/SQL Developer is limited to picking up the TNSNAMES from the Oracle Homes. Is there any way I can use a custom TNSNAMES file with PL/SQL Developer, or is there any way I can work around this issue to get the TNS entries I want?

Thankyou very much,
Peter Smith (PL/SQL Developer user for nearly 10 years).

Hmm, I vaguely remember a registry entry I can make just thinking about it - but all comments welcome.

Re: Custom TNSNAMES.ORA location like TOAD?
#30639 09/01/08 02:26 PM
Joined: Feb 2004
Posts: 92
UK
D. Offline
Member
Offline
Member
Joined: Feb 2004
Posts: 92
UK
Hi,

Not sure about what you can do in the tool, but Windows has a TNS_ADMIN environment variable that you can set to give the location of a tnsnames.ora file. We use this to centralise the TNS entries on a shared location, so we are all working from the same one.

Hope this helps,
D.

Re: Custom TNSNAMES.ORA location like TOAD?
#30640 09/01/08 02:46 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
You can also set a TNS_ADMIN string value in the local machine registry of your Oracle Home.


Marco Kalter
Allround Automations
Re: Custom TNSNAMES.ORA location like TOAD?
#30641 09/01/08 03:00 PM
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Member
OP Offline
Member
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Thankyou very much gentlemen - this looks like the solution I'm looking for. I'll give it a shot tomorrow.

Cheers,
Pete.

Re: Custom TNSNAMES.ORA location like TOAD?
#30642 09/02/08 02:29 AM
Joined: Aug 2005
Posts: 13
Christchurch
M
Member
Offline
Member
M
Joined: Aug 2005
Posts: 13
Christchurch
Pete, your memory is obviously failing you in you old age smile

Re: Custom TNSNAMES.ORA location like TOAD?
#30643 09/02/08 01:52 PM
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Member
OP Offline
Member
Joined: Sep 2008
Posts: 10
Melbourne, Australia
Ha!
Its true - soon I'll be writing in the forums about how to do SELECTs! wink I've set this variable many times in the past but didn't twig it would resolve this one..

Anyhoo, I set TNS_ADMIN in the environment, and cleared the Oracle Home setting in the options. PL/SQL Developer picked up the correct TNSNAMES just fine so all is good.

Cheers,
Grandpa smile


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.031s Queries: 13 (0.011s) Memory: 2.5214 MB (Peak: 3.0430 MB) Data Comp: Off Server Time: 2024-05-18 10:47:57 UTC
Valid HTML 5 and Valid CSS