Toad World® Forums

SQLNAV asks to close the session after auto run script


I noticed this strange behaviour:
I set a script to run automatically at connect (General/Session/Auto run script at connect) and when I start SQLNAV everything is fine.

But if I close all the sessions and then I open a new one, SQLNav will prompt me to close the session I just opened just after having run the auto run script (screenshot attached). Anyway, if I press the Yes or No button doesn’t make any difference and the session will stay open.

Estimated Sales Queries.sql (1.72 KB)


Hi Paolo,

Thanks for your feedback. We will investigate this behaviour further.




Hi Paolo,

I am not able to reproduce this issue on a number of machines. Was your “Close when last session window closes” preference (located in Preferences | General | Session) checked ? Thanks.




Hi Bernard,
I would like to check, but my beta test key expired and I cannot use the program anymore. Could you send me another one?



Hi Paolo,

Please check your PM. Thanks.




attached you can see my Session preferences. You can see that “Close when last session window closes” is not checked, but I have close script on successful execution checked.

If I uncheck the “close on successful execution”, I just delay therequester asking me to close the session, because it will reappear whenI close the window manually.

Now, I guess it’s clear for you that if someone needs or wants to execute a script to initialize his database session, he really doesn’t want SQLNAV to close that freshly initialized session when the script window is being closed.

I think that you should treat the session init script in a different way than all the other scripts.

Besides that, I noticed that the session init script is being opened in the old SQL editor, not in the unified one.

I hope you can solve this issue, as it’s quite annoying.

Thanks a lot,


I forgot the screenshot.



Hi paolo,

It will be addressed in one of future builds.Once again thank you very much for you feedback.