Oracle7 Server Application Developer's Guide

Contents Index Home Previous Next

Formatting Labels

The default format in which Trusted Oracle returns a label may not necessarily be the most appropriate format for a given display, report, or application. To accommodate different formatting needs, Trusted Oracle provides the ability to

The following sections describe how to use these features in more detail.

The TO_CHAR and TO_LABEL Functions

Depending upon your operating system, a label can have several components: sensitivity, integrity, information, and installation defined. Both the sensitivity and integrity components consists of one classification and zero or more categories.

Using the format parameter of the TO_CHAR and TO_LABEL functions, you can format the classification and categories of each of these components in one of several ways: numeric, short, or long. You can also specify whether you want the numeric, short, or long representation of a label to be displayed in the format used by the operating system on which Trusted Oracle is running, and you can specify whether you want a label displayed in full operating system format. Note that not all operating systems support separate long and short formats.

Setting the DBMS Label Format for Your Session

If you want to display labels in a format other than the system-wide default, you can alter the default format for your session with the SET MLS_LABEL_FORMAT parameter of the ALTER SESSION command. You need no special privileges to execute this command.

For example, assume that the system-wide default label format (set in the parameter file) is SEN; this displays the full sensitivity label in short format. However, you want the full sensitivity label to be displayed in numeric format just for your session or a portion of your session. To change the label format for your DBMS session to S, enter

ALTER SESSION SET MLS_LABEL_FORMAT = 's'

All labels will then be displayed in this format for the duration of your session, or until you issue another ALTER SESSION SET MLS_LABEL_FORMAT command.

Note that altering the MLS_LABEL_FORMAT parameter not only changes the format in which labels are displayed for your session; it also changes the format in which you must enter labels. For example, after altering the MLS_LABEL_FORMAT parameter as described in the above example, you must enter labels in numeric format for the rest of your session.

Changing the MLS_LABEL_FORMAT parameter does not affect constraint enforcement.

For more information about different label formats, see your Trusted Oracle7 Server Administrator's Guide.


Contents Index Home Previous Next