Toad World® Forums

sqlnavigator not accepting dinamic TNS_ADMIN

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?

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

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”

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