Oracle PL/SQL Programming, 2nd Edition

Oracle PL/SQL Programming, 2nd EditionSearch this book
Previous: C.11 DBMS_ROWID (PL/SQL8 Only)Appendix C
Built-In Packages
Next: C.13 DBMS_SNAPSHOT
 

C.12 DBMS_SESSION

The DBMS_SESSION package provides you with a programmatic interface to several SQL ALTER SESSION commands and other session-level commands.

C.12.1 The CLOSE_DATABASE_LINK procedure

The CLOSE_DATABASE_LINK procedure closes the specified database link. The specification is:

PROCEDURE DBMS_SESSION.CLOSE_DATABASE_LINK (dblink VARCHAR2);

C.12.2 The IS_ROLE_ENABLED function

The IS_ROLE_ENABLED function determines whether the specified role is enabled for this session. The specification is:

FUNCTION DBMS_SESSION.IS_ROLE.ENABLED (rolename VARCHAR2) RETURN BOOLEAN;

C.12.3 The RESET_PACKAGE procedure

The RESET_PACKAGE procedure de-instantiates all packages in the current session. It comes in very handy for releasing all the memory associated with data structures and modules you may be using in your tests. However, this procedure should be used with extreme caution, since it literally wipes the slate clean for all packages in the session. The specification is:

PROCEDURE DBMS_SESSION.RESET_PACKAGE;

C.12.4 The SET_LABEL procedure

The SET_LABEL procedure changes the dbms_session label in Trusted Oracle. The specification is:

PROCEDURE DBMS_SESSION.SET_LABEL (lbl VARCHAR2);

C.12.5 The SET_NLS_LABEL procedure

The SET_NLS_LABEL procedure changes the default label format for your session in Trusted Oracle. The specification is:

PROCEDURE DBMS_SESSION.SET_NLS_LABEL (fmt VARCHAR2);

C.12.6 The SET_NLS procedure

The SET_NLS procedure provides you with a programmatic interface to change the value of a specified National Language Support parameter. The specification is:

PROCEDURE DBMS_SESSION.SET_NLS
   (param VARCHAR2,
    value VARCHAR2);

C.12.7 The SET_ROLE procedure

The SET_ROLE procedure enables or disables the role for the current session. The specification is:

PROCEDURE DBMS_SESSION.SET_ROLE (role_cmd VARCHAR2);

C.12.8 The SET_SQL_TRACE procedure

Use SET_SQL_TRACE to turn the trace facility on and off within your program. The specification is:

PROCEDURE DBMS_SESSION.SET_SQL_TRACE (sql_trace BOOLEAN);

C.12.9 The UNIQUE_SESSION_ID function

The UNIQUE_SESSION_ID function returns a name that is unique among the sessions currently connected to the database. The specification is:

FUNCTION DBMS_SESSION.UNIQUE_SESSION_ID RETURN VARCHAR2;


Previous: C.11 DBMS_ROWID (PL/SQL8 Only)Oracle PL/SQL Programming, 2nd EditionNext: C.13 DBMS_SNAPSHOT
C.11 DBMS_ROWID (PL/SQL8 Only)Book IndexC.13 DBMS_SNAPSHOT

The Oracle Library Navigation

Copyright (c) 2000 O'Reilly & Associates. All rights reserved.

Library Home Oracle PL/SQL Programming, 2nd. Ed. Guide to Oracle 8i Features Oracle Built-in Packages Advanced PL/SQL Programming with Packages Oracle Web Applications Oracle PL/SQL Language Pocket Reference Oracle PL/SQL Built-ins Pocket Reference