I have environment variable TNS_ADMIN=%USERPROFILE% set up so that the tnsnames.ora file can be found in the location defined in USERPROFILE. Both SQL Developer and SQL*Plus both recognize the location, but SQL Navigator doesn't recognize it and goes to the %Oracle Home%\Network\Admin folder instead. Is there any way for SQL Navigator to pick up this value?
SQL Navigator does not recognize the environment variable TNS_ADMIN if there is %USERPROFILE% or any other variable with % in the string.
WORKAROUND
Log on Windows as a member of Administrators.
1). Go to folder C:\Documents and Settings\All Users\Start Menu\Programs\Startup;
2). Create a new text file then put the line below into its content
reg add HKEY_CURRENT_USER\Environment /v TNS_ADMIN /t REG_SZ /d "%USERPROFILE%" /f
3). Save the text file and modify its extension to .bat;
4). Log off and log on using the normal user that uses SQLNav for development.
-- this workaround will create a user-scope enviroment variable TNS_ADMIN with the real path of current user's profile folder, then SQLNav will be able to read the tnsnames.ora from there correctly.
Â
© ALL RIGHTS RESERVED. Feedback 이용 약관 개인정보 보호정책 Cookie Preference Center