Q1: The source code of a SP is never logged to any system table. The ALTER was probably after a upgrade to a new release, there's a script to recreate the existing SPs.
Q2: '.compile filename' is just the way to create a SP in BTEQ, the file must have a single CREATE/REPLACE PROCEDURE.
Q3: There's one row in dbc.QryLogV for the CALL and each query within the SP is also logged in DBQL. All statements submitted from within the SP will share the same "RequestNum" while the "InternalRequestNum" increases.
If some statements were missing maybe it was due to a LIMIT THRESHOLD in BEGIN QUERY LOGGING?
Dieter
Q1: The source code of a SP is never logged to any system table. The ALTER was probably after a upgrade to a new release, there's a script to recreate the existing SPs.
Q2: '.compile filename' is just the way to create a SP in BTEQ, the file must have a single CREATE/REPLACE PROCEDURE.
Q3: There's one row in dbc.QryLogV for the CALL and each query within the SP is also logged in DBQL. All statements submitted from within the SP will share the same "RequestNum" while the "InternalRequestNum" increases.
If some statements were missing maybe it was due to a LIMIT THRESHOLD in BEGIN QUERY LOGGING?
Dieter