We use a login script in Toad to set some session and application variables. This has worked great for us to be able to look at the session browser and know whether the session is called from Toad and who the os user is when a shared schema is the one logged in.
We do use threaded queries and I’ve noticed that though I can see the correct data in the session browser, when I run a query that pulls SYS_CONTEXT(‘USERENV’, ‘CLIENT_IDENTIFIER’) in a separate window from the one I ran the login script in, I do not get the new client_identifier, but if I run this in the same window, then I correctly get this value.
Is this something we are doing wrong, or is is something in the way Toad handles the threaded queries?
This is the code in my login script.
Digital Products & Strategies, Cru | Data Sciences & Analytics