# sqlnavigator not accepting dinamic TNS\_ADMIN

**URL:** <https://forums.toadworld.com/t/sqlnavigator-not-accepting-dinamic-tns-admin/4629>\
**Category:** SQL Navigator\
**Created:** [April 23, 2012, 8:09am UTC](https://forums.toadworld.com/t/sqlnavigator-not-accepting-dinamic-tns-admin/4629 "2012-04-23T08:09:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduardo\_125](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@eduardo\_125](https://forums.toadworld.com/u/eduardo_125)\
**Post date:** [April 23, 2012, 8:09am UTC](https://forums.toadworld.com/t/sqlnavigator-not-accepting-dinamic-tns-admin/4629/1 "2012-04-23T08:09:22Z")

</div>

I’m setup the TNS\_ADMIN dynamicly for some notebook where I have sqlnavigator installed, but it is not working.  
The scripts run Ok and FORMS/REPORTS read the tnsnames.ora that is setup at login script without any problem, but sqlnavigator don’t.  
If I set it using control panel, environment variable it works fine.  
I need use script because the value of variable change according to the site where the user is.  
Any idea?

---

<div class="post-metadata">

**Author:** ![bruceduong](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/bruceduong/32/69_2.png) [@bruceduong](https://forums.toadworld.com/u/bruceduong)\
**Post date:** [April 24, 2012, 2:15am UTC](https://forums.toadworld.com/t/sqlnavigator-not-accepting-dinamic-tns-admin/4629/2 "2012-04-24T02:15:25Z")

</div>

Hi,

The home selection/siwtching feature in Oracle logon window in SQL Navigator will create at run time a TNS\_ADMIN system variable using the path of the selected Oracle home, and it is applied for that particular SQL Navigator running session.

If there a TNS\_ADMIN environment varilable setup in the Control Panel, it will be the one to be used.

Could you please share with us the script you have to generate the TNS\_ADMIN dynamic, that would help us to investigate this issue for you.

Thanks and regards,  
Bruce

---

<div class="post-metadata">

**Author:** ![eduardo\_125](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@eduardo\_125](https://forums.toadworld.com/u/eduardo_125)\
**Post date:** [April 25, 2012, 1:14pm UTC](https://forums.toadworld.com/t/sqlnavigator-not-accepting-dinamic-tns-admin/4629/3 "2012-04-25T13:14:34Z")

</div>

Set objShell = wscript.createobject(“wscript.shell”)  
Set objSRV = CreateObject(“Scripting.Dictionary”)  
Set objSysInfo = CreateObject(“ADSystemInfo”)  
objSRV.Add “Site1”, “Server1”  
objSRV.Add “Site2”, “Server2”  
’ this works  
objShell.Environment(“User”).Item(“TNS\_ADMIN”) = “\” & \_  
objSRV.item(objSysInfo.SiteName) & “\SYS\APPLS\ORANT\NET80\ADMIN”  
’ this does not works  
objShell.Environment(“VOLATILE”).Item(“TNS\_ADMIN”) = “\” & \_  
objSRV.item(objSysInfo.SiteName) & “\SYS\APPLS\ORANT\NET80\ADMIN”

---

<div class="post-metadata">

**Author:** ![bruceduong](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/bruceduong/32/69_2.png) [@bruceduong](https://forums.toadworld.com/u/bruceduong)\
**Post date:** [April 27, 2012, 12:47am UTC](https://forums.toadworld.com/t/sqlnavigator-not-accepting-dinamic-tns-admin/4629/4 "2012-04-27T00:47:09Z")

</div>

Hi,

Thanks for sending the script.

We can confirm that SQL Navigator could not handle the dynamic user variables yet as reported.

We have raise Story id# 28717729 for you to add support for Volative Environment tns\_admin.

Thanks and regards,  
Bruce
