Read OS environment variables using DBMS_SYSTEM.GET_ENV()
March 27th, 2009
Check out this article by Vikram Das about how to read OS environment variables using PL/SQL.
I did not know that!
Check out this article by Vikram Das about how to read OS environment variables using PL/SQL.
I did not know that!
Trackbacks
Comments
Note that Oracle 9.2 doesn’t have this procedure, 10.2 has (and I didn’t test 10.1)
It depends, what the environment is referred to – in my quick test, it seems to return the actual environment for beq connections and the environment, oracle instance was started with – for Net 8 connections.
Best regards
Maxim
Yes, because the BEQ connections are spawned by your user shell, but Net8 connections by the listener.
For some troubleshooting purposes I’ve used such technique in past that I’ve created another “debug” listener which I started with LD_PRELOAD pointing to a custom library (which did some function call tracing) and only the users connecting through the debug listener would have the tracing enabled…
This API was introduced in 10.1, as I noted two years ago…!