Print Thread
Can't see Tempororay table data since debugging not allowed in Single Session
#33522 03/06/09 06:01 AM
Joined: Jan 2008
Posts: 11
I
iratta Offline OP
Member
OP Offline
Member
I
Joined: Jan 2008
Posts: 11
Version 7.1.5.1398

DB version:10gr2

If i try to debug in single session mode i'll get the error "debugging not possible in single session mode".

Once i've started debugging, I want to see the values from a GLOBAL TEMPORARY Table. But, one has to be in Multi-session mode to debug . Since data in GTT is session specific i can't get the data from the temporary table by opening another SQL window.

Is there a workaround for this?



Last edited by iratta; 03/06/09 06:12 AM.
Re: Can't see Tempororay table data since debugging not allowed in Single Session
iratta #33530 03/06/09 11:40 AM
Joined: Aug 1999
Posts: 22,216
Member
Offline
Member
Joined: Aug 1999
Posts: 22,216
There is no workaround for this. The data is only available for the session, but the session is busy executing your code.


Marco Kalter
Allround Automations
Re: Can't see Tempororay table data since debugging not allowed in Single Session
Marco Kalter #33560 03/11/09 03:04 PM
Joined: Apr 2003
Posts: 517
Portland, OR, USA
M
Member
Offline
Member
M
Joined: Apr 2003
Posts: 517
Portland, OR, USA
What I do is copy the global temporary table. I have a package that I call to copy the table. In my test script, I call the procedure to copy the global temporary table just after the package runs that inserts the data. Here is my code so you can modify it to suit your needs.


PROCEDURE COPY_TABLE(i_table_name IN VARCHAR2
,i_copied_table_name IN VARCHAR2 DEFAULT NULL
,i_where_clause IN VARCHAR2 DEFAULT 'WHERE 1 = 2') IS

l_copied_table_name all_tables.table_name%TYPE;
BEGIN

IF i_copied_table_name IS NOT NULL
THEN
l_copied_table_name := upper(i_copied_table_name);
ELSE
l_copied_table_name := substr(upper(i_table_name), 1, 26) || '_TST';
END IF;

zfnd_test_util.drop_table(i_table_name => l_copied_table_name);

EXECUTE IMMEDIATE 'CREATE TABLE ' || l_copied_table_name || ' AS
(SELECT *
FROM ' || i_table_name || '
' || i_where_clause || ')';

-- COMMIT;
EXCEPTION

WHEN OTHERS THEN
zfnd_debug.log('EXITING CREATE_TEST_TABLE AS EXCEPTION', 'N', 'ZFND_TEST_UTIL.CREATE_TEST_TABLE');
ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
ZFND_DEBUG.PUT_LINE('ERROR IN ZFND_TEST_UTIL.CREATE_TEST_TABLE');
ZFND_DEBUG.PUT_LINE('ERROR: ' || SQLCODE || ' ' || SQLERRM);
ZFND_DEBUG.PUT_LINE('i_test_table: ' || i_copied_table_name);
ZFND_DEBUG.PUT_LINE('i_template_table: ' || i_table_name);
ZFND_DEBUG.PUT_LINE('+---------------------------------------------------------------------------+');
RAISE_APPLICATION_ERROR(-20010, 'Error in ZFND_TEST_UTIL.CREATE_TEST_TABLE');

END COPY_TABLE;

Last edited by mike; 03/11/09 03:05 PM.

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.112s Queries: 14 (0.054s) Memory: 2.5093 MB (Peak: 3.0423 MB) Data Comp: Off Server Time: 2024-05-13 06:47:26 UTC
Valid HTML 5 and Valid CSS