Print Thread
Reconnect in a test window
#62026 09/10/20 10:03 AM
Joined: Jun 2009
Posts: 65
Sheffield, UK
T
Member
OP Offline
Member
T
Joined: Jun 2009
Posts: 65
Sheffield, UK
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 by Tim Scott; 09/10/20 10:21 AM.

Tim Scott
Senior Developer, DBA

OCLC (UK) Ltd
Re: Reconnect in a test window
Tim Scott #62027 09/10/20 07:46 PM
Joined: Aug 2011
Posts: 339
T
Member
Offline
Member
T
Joined: Aug 2011
Posts: 339
Can't you call DBMS_SESSION.RESET_PACKAGE somehow?

Re: Reconnect in a test window
Tim Scott #62104 10/15/20 08:48 AM
Joined: Jun 2009
Posts: 65
Sheffield, UK
T
Member
OP Offline
Member
T
Joined: Jun 2009
Posts: 65
Sheffield, UK
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.


Tim Scott
Senior Developer, DBA

OCLC (UK) Ltd
Re: Reconnect in a test window
Tim Scott #62106 10/15/20 08:45 PM
Joined: Aug 2011
Posts: 339
T
Member
Offline
Member
T
Joined: Aug 2011
Posts: 339
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.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.036s Queries: 14 (0.012s) Memory: 2.5093 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-07 07:56:42 UTC
Valid HTML 5 and Valid CSS