Archives of the TeradataForum
Message Posted: Mon, 05 Mar 2012 @ 10:25:36 GMT
With TD 12 and above, GLOBAL TEMPORARY TRACE TABLE can be used to debug Stored Procedures, external SPs & UDFs.
CREATE MULTISET GLOBAL TEMPORARY TRACE TABLE tracetst, NO FALLBACK, NO LOG ( proc_id BYTE(2), sequence INTEGER, trace_str VARCHAR(100)) ON COMMIT PRESERVE ROWS;
Note that global temporary trace tables are user-defined except for first two columns, which are always fixed.
And turn on tracing with following SQL (decide what your options mean):
SET SESSION FUNCTION TRACE USING 'T' FOR TABLE tracetst;
Then call the procedure & once completed select * from the Trace table.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|