Reconnect in a test window

Tim Scott

Member²
Hi all,

Seeking any tips, here.

I often find I have to disconnect and reconnect my test window because the session state of the package I'm working on has been invalidated and therefore I need a new database session. Sometimes there's an additional complication where several packages are involved in the process and this means more often I have to reconnect. Often a debug session will work, but as often it fails to find a dependent package that has its session state invalidated, so even debugging doesn't help.

I was wondering if there was a quicker way to get a new database session as this same user and then run the test, rather than navigating to the test window tab, disconnect, reconnect and then execute the test.

Any ideas?

Thanks,
Tim

PS: I've tried adding "EXECUTE IMMEDIATE" to the test script in order recompile the packages, but that doesn't always resolve it ;-(.
 
Last edited:
I gave the DBMS_SESSION.RESET_PACKAGE idea a try today by adding the call to my test script. It clearly did something as I got no dbms_output ;-(.
Recalling that dbms_output state is a package state setting, too, I added dbms_output.enable(); after the reset_package call - but this still didn't result in any dbms output.

It would appear that this is not a suitable workaround, but thank you for suggesting.
 
Yeah, that's rather tricky. You have to call DBMS_SESSION.RESET_PACKAGE from a separate execution block. So you have to do it in two phases and swap the content of your test window until PSD or a plugin can do it for you or someone comes up with a better idea.
 
Back
Top