PACKAGE BODY dbms_trace IS
PBT3G_VERSION CONSTANT POSITIVE := 2;
FUNCTION PBT3GVCK(VERSION POSITIVE) RETURN BINARY_INTEGER IS
EXTERNAL
LIBRARY SYS.DBMS_TRACE_LIB
NAME "pbt3gvck"
WITH CONTEXT
PARAMETERS(CONTEXT, VERSION, RETURN);
FUNCTION PBT3GMT(FLAGS IN BINARY_INTEGER) RETURN BINARY_INTEGER IS
EXTERNAL
LIBRARY SYS.DBMS_TRACE_LIB
NAME "pbt3gmt"
WITH CONTEXT
PARAMETERS(CONTEXT, FLAGS, RETURN);
FUNCTION PBT3GRN RETURN BINARY_INTEGER IS
EXTERNAL
LIBRARY SYS.DBMS_TRACE_LIB
NAME "pbt3grn"
WITH CONTEXT
PARAMETERS(CONTEXT, RETURN);
FUNCTION PBT3GLM(LIMIT IN BINARY_INTEGER) RETURN BINARY_INTEGER IS
EXTERNAL
LIBRARY SYS.DBMS_TRACE_LIB
NAME "pbt3glm"
WITH CONTEXT
PARAMETERS(CONTEXT, LIMIT, RETURN);
FUNCTION PBT3GCO(COMMENT IN VARCHAR2) RETURN BINARY_INTEGER IS
EXTERNAL
LIBRARY SYS.DBMS_TRACE_LIB
NAME "pbt3gco"
WITH CONTEXT
PARAMETERS(CONTEXT, COMMENT, COMMENT LENGTH, RETURN);
FUNCTION PBT3GTL RETURN BINARY_INTEGER IS
EXTERNAL
LIBRARY SYS.DBMS_TRACE_LIB
NAME "pbt3gtl"
WITH CONTEXT
PARAMETERS(CONTEXT, RETURN);
FUNCTION INTERNAL_VERSION_CHECK RETURN BINARY_INTEGER IS
BEGIN
RETURN PBT3GVCK(PBT3G_VERSION);
END INTERNAL_VERSION_CHECK;
PROCEDURE SET_OR_CLEAR_TRACE(TRACE_LEVEL IN BINARY_INTEGER) IS
DISCARD INTEGER;
BEGIN
IF (INTERNAL_VERSION_CHECK <> 0) THEN
RETURN;
END IF;
DISCARD := PBT3GMT(TRACE_LEVEL);
END;
PROCEDURE SET_PLSQL_TRACE(TRACE_LEVEL IN BINARY_INTEGER) IS
BEGIN
SET_OR_CLEAR_TRACE(TRACE_LEVEL);
END;
FUNCTION GET_PLSQL_TRACE_LEVEL RETURN BINARY_INTEGER IS
BEGIN
IF (INTERNAL_VERSION_CHECK <> 0) THEN
RETURN NULL;
ELSE
RETURN PBT3GTL;
END IF;
END;
PROCEDURE CLEAR_PLSQL_TRACE IS
BEGIN
SET_OR_CLEAR_TRACE(TRACE_STOP);
END;
PROCEDURE PAUSE_PLSQL_TRACE IS
BEGIN
SET_OR_CLEAR_TRACE(TRACE_PAUSE);
END;
PROCEDURE RESUME_PLSQL_TRACE IS
BEGIN
SET_OR_CLEAR_TRACE(TRACE_RESUME);
END;
PROCEDURE LIMIT_PLSQL_TRACE(LIMIT IN BINARY_INTEGER := 8192) IS
DISCARD BINARY_INTEGER;
BEGIN
IF (INTERNAL_VERSION_CHECK <> 0) THEN
RETURN;
END IF;
DISCARD := PBT3GLM(LIMIT);
END;
FUNCTION GET
|