Toad World® Forums

Setting session identifier on startup. Toad for Oracle

Hi.

First of all, sorry for my poor english.

I tried to set the session identifier ussign the statement:
BEGIN
DBMS_SESSION.SET_IDENTIFIER(1234);
END;

I’ve created a file that is called when a new connection is executed. I’ve setted it on Toad Options> Startup> File to execute on new connections.

The scripts runs without any error, but the session identifier is not setted. When I check it with the query:
SELECT SYS_CONTEXT(‘USERENV’, ‘CLIENT_IDENTIFIER’) FROM DUAL;
I get a null value.

Any idea what am i doing wrong?

I use Toad for Oracle 10.1.1.8 and Oracle Database 10g Enterprise 10.2.0.5.0 64bi

Thanks.

Pato.

If you have option (Options|Oracle|Transactions) “Execute query in threads”, then you run each tab in own session-so result is as expected-all are totally different sessions.

But what do you try to achieve?

Rg
Damir Vadas

Yes, I have that option ("Execute query in threads) selected. I work with multiple tabs 'cause my querys take a long time.

I want to set a session identifier 'cause when I launch a DML query, there are some triggers that use this identifier. I’m not the trigger’s owner and I can’t change this policy.

It’s weary set the session identifier each time I open a new tab.

Do you have some idea about how I can set it once at the startup?