Chapter 11. Managing Session Information

Oracle technologies allow for a great deal of user customization and security. Language preferences can be specified at the session level using the NLS (National Language Support) options of the ALTER SESSION command. Roles can be used to distinguish groups of users from each other and to modify application behavior accordingly. This chapter describes the following two packages that allow you to perform these operations:

DBMS_SESSION

Contains programs that can modify and inspect session roles and settings from within PL/SQL. This package also contains programs for manipulating session memory and package states; even if they aren’t used very often, these programs are very instructive to understand.

DBMS_SYSTEM

Lets administrators set various trace events in other users’ sessions. Setting these events can be invaluable when tracking down difficult application performance or database issues.

DBMS_SESSION: Managing Session Information

The DBMS_SESSION package lets you access and alter session-level settings, including features of the ALTER SESSION and SET ROLE commands in SQL. Some of the session modifications that can be made using DBMS_SESSION include the following:

  • Enabling and disabling roles

  • Setting National Language Support (NLS) characteristics

  • Resetting package states and releasing session package memory

  • Setting Trusted Oracle label characteristics

DBMS_SESSION is used primarily to set preferences and security levels for a user’s current ...

Get Oracle Built-in Packages now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.