Is there any way to automatically execute an ALTER SESSION command for each of my Toad sessions when it connects. The “File to execute on new connections” executes in a background thread, as documented, so does nothing for my current connection (which doesn’t seem all that useful to me but maybe it has purpose). I’ve tried the checking and unchecking the “Execute on new threaded query sessions”, but it always executes in a background thread and doesn’t affect my current session.
Interesting. This does not seem to be possible. Toad loads the script into an editor and executes it as a script. This in turn executes it in a newly spawned threaded session if you use threaded queries. The "execute on new threaded query sessions" option ensures
it executes on subsequent threaded sessions. At no time does it hit the main session. It would seem logical that the option always affects the main session and never the threaded sessions unless that sub-option is checked. To do this effectively Toad would
need to silently execute the script outside of an Editor instance. This would be a change that some may not agree with.
To complicate matters further if you have the option to execute scripts in the Toad session unchecked then even your spawned threaded sessions are not affected by the startup script. Something is definitely off here. I'll open an issue to revisit this. I won't
have time to look at it for a bit though.
To recap, it seems that startup scripts should always execute in the main session. The sub-option determines if they also are executed in threaded sessions. The script option to use the Toad session should not affect anything here. Objections?
Michael
On 10/24/2014 11:32 AM, droeschley_109 wrote:
Thread created by droeschley_109
Is there any way to automatically execute an ALTER SESSION command for each of my Toad sessions when it connects. The "File to execute on new connections" executes in a background thread, as documented, so does nothing for my current connection (which doesn't
seem all that useful to me but maybe it has purpose). I've tried the checking and unchecking the "Execute on new threaded query sessions", but it always executes in a background thread and doesn't affect my current session.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - Beta notifications altogether.Toad for Oracle - Beta Discussion Forum
Flag
this post as spam/abuse.
Executing outside of the Editor wouldn't work because that would lose script output. Additional thought is needed here.
On 10/24/2014 11:51 AM, Michael Staszewski wrote:
Reply by Michael Staszewski
Interesting. This does not seem to be possible. Toad loads the script into an editor and executes it as a script. This in turn executes it in a newly spawned threaded session if you use threaded queries. The "execute on new threaded query sessions" option
ensures it executes on subsequent threaded sessions. At no time does it hit the main session. It would seem logical that the option always affects the main session and never the threaded sessions unless that sub-option is checked. To do this effectively Toad
would need to silently execute the script outside of an Editor instance. This would be a change that some may not agree with.To complicate matters further if you have the option to execute scripts in the Toad session unchecked then even your spawned threaded sessions are not affected by the startup script. Something is definitely off here. I'll open an issue to revisit this. I won't
have time to look at it for a bit though.To recap, it seems that startup scripts should always execute in the main session. The sub-option determines if they also are executed in threaded sessions. The script option to use the Toad session should not affect anything here. Objections?
Michael
On 10/24/2014 11:32 AM, droeschley_109 wrote:
Thread created by droeschley_109
Is there any way to automatically execute an ALTER SESSION command for each of my Toad sessions when it connects. The "File to execute on new connections" executes in a background thread, as documented, so does nothing for my current connection (which doesn't
seem all that useful to me but maybe it has purpose). I've tried the checking and unchecking the "Execute on new threaded query sessions", but it always executes in a background thread and doesn't affect my current session.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - Beta notifications altogether.Toad for Oracle - Beta Discussion Forum
Flag
this post as spam/abuse.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - Beta notifications altogether.Toad for Oracle - Beta Discussion Forum
Flag
this post as spam/abuse.
how about a logon trigger?
login or glogin?
From: John Dorlon [mailto:bounce-jdorlon@toadworld.com]
Sent: Friday, October 24, 2014 12:07 PM
To: toadoraclebeta@toadworld.com
Subject: RE: [Toad for Oracle - Beta Discussion Forum] question regarding startup scripts
RE: question regarding startup scripts
Reply by John Dorlon
how about a logon trigger?
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - Beta notifications altogether.
Toad for Oracle - Beta Discussion Forum
Flag
this post as spam/abuse.
login trigger would require implementing in all our databases for all my accounts - which is doable, just not what I was hoping for. I do have a login.sql, which works great for SQL*Plus and I thought I could just use it for Toad, but isn’t working as expected. I’m hoping Michael will find some solution when he has time to look into it.