-
I am setting TNS_ADMIN as NT system variable that will be loaded upon person loging to NT (part of login script). The command used is:
regedit /s i:\install\TNSNAMES\tns_winNT.reg
Once login is finished, TNS_ADMIN is visible in
ControlPanel->System->Environment->SystemVariables
, but not all Oracle tools will use it. SQL*Plus is happy and I can connect, but OEM or Developer will not recognise it and connections will fail with TNS error ‘…could not resolve the service’.
One workaround is to log-off and then log in again, which is not the perfect solution.
The other workaround is to go to
ControlPanel->System->Environment
click on any variable and then on Set -> Apply.
This last click on the 'Apply' button obviously forces NT to refresh environment and TNS_ADMIN becomes visible to OEM. Obviously this solution is not very good for end-users, but it contains a part that could make it a perfect.
So the perfect solution would be NT command that forces refresh of environment once TNS_ADMIN is set, and it would execute in the login script straight after TNS_ADMIN load.
Does anyone know how to do this ???
-
In the mean time I digged around for solutions and so far the only one that does not require re-boot or anything fancy is to use SETX utility from NTRESKIT. SETX will force NT to automatically refresh environment.
So in login script instead of having
regedit /s tnsnames.reg
you simply put:
setx TNS_ADMIN I:\ORACLE\NETWORK\ADMIN -m
and TNS_ADMIN will become available to all apps, including OEM or Developer etc.
-
Forgot to mention, I would still prefer standard NT solution instead of using NTRESKIT, so I'll leave thread open for a while.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|