4 Getting Started with Oracle Label Security
Before using Oracle Label Security, you must register it with the database and then enable the LBACSYS Oracle Label Security account.
- Registering Oracle Label Security with an Oracle Database
You must register Oracle Label Security with the database in which you plan to use it. - Enabling the LBACSYS Oracle Label Security
After you complete the registration process, the default user account,LBACSYS, is granted theLBAC_DBAdatabase role, which provides the privileges necessary to manage Oracle Label Security. - Logging in to Cloud Control or SQL*Plus for Oracle Label Security
After you complete the Oracle Label Security registration and enablement process, you can begin using it.
Parent topic: Using Oracle Label Security Functionality
4.1 Registering Oracle Label Security with an Oracle Database
You must register Oracle Label Security with the database in which you plan to use it.
- About Registering Oracle Label Security
When you install Oracle Database, by default Oracle Label Security is not enabled. - Checking if Oracle Label Security Has Been Registered and Enabled
You can query theDBA_OLS_STATUSandCDB_OLS_STATUSdata dictionary views to find if Oracle Label Security has already been registered and enabled. - Registering and Enabling Oracle Label Security from SQL*Plus
You can both register and enable Oracle Label Security from SQL*Plus. - Registering and Enabling Oracle Label Security Using DBCA
You can both register and enable Oracle Label Security using Database Configuration Assistant.
Parent topic: Getting Started with Oracle Label Security
4.1.1 About Registering Oracle Label Security
When you install Oracle Database, by default Oracle Label Security is not enabled.
You must register Oracle Label Security with the database. Afterwards, you must enable the default Oracle Label Security user account, LBACSYS. After you register Oracle Label Security, you can disable and re-enable it when necessary.
If you are using a multitenant environment, then only register Oracle Label Security in the pluggable databases (PDBs) in which you plan to create Oracle Label Security policies. Because Oracle Label Security is not designed to protect data dictionary objects, you cannot create policies in the root.
4.1.2 Checking if Oracle Label Security Has Been Registered and Enabled
You can query the DBA_OLS_STATUS and CDB_OLS_STATUS data dictionary views to find if Oracle Label Security has already been registered and enabled.
4.1.3 Registering and Enabling Oracle Label Security from SQL*Plus
You can both register and enable Oracle Label Security from SQL*Plus.
4.2 Enabling the LBACSYS Oracle Label Security
After you complete the registration process, the default user account, LBACSYS, is granted the LBAC_DBA database role, which provides the privileges necessary to manage Oracle Label Security.
LBACSYS is created as a locked account with its password expired.
After you unlock user LBACSYS and provide a password, as a good practice, you may want to reserve this account as a back-up user account. For day-to-day use, consider granting the LBAC_DBA database role to trusted users who you want to administer Oracle Label Security.
If you plan to use Enterprise Manager Cloud Control to administer Oracle Label Security, then ensure that any users to whom you have granted the LBAC_DBA role also have the SELECT ANY DICTIONARY privilege. By default, the LBACSYS user already has this privilege.
Parent topic: Getting Started with Oracle Label Security
4.3 Logging in to Cloud Control or SQL*Plus for Oracle Label Security
After you complete the Oracle Label Security registration and enablement process, you can begin using it.
- Logging in to Oracle Label Security from Enterprise Manager Cloud Control
From Enterprise Manager Cloud Control, you use the Oracle Label Security pages to create and manage Oracle Label Security policies. - Logging in to Oracle Label Security from SQL*Plus
You can log in to Oracle Label Security from SQL*Plus if you have been granted theLBAC_DBAdatabase role.
Parent topic: Getting Started with Oracle Label Security
4.3.1 Logging in to Oracle Label Security from Enterprise Manager Cloud Control
From Enterprise Manager Cloud Control, you use the Oracle Label Security pages to create and manage Oracle Label Security policies.
4.3.2 Logging in to Oracle Label Security from SQL*Plus
You can log in to Oracle Label Security from SQL*Plus if you have been granted the LBAC_DBA database role.
-
To use Oracle Label Security from SQL*Plus, connect as user
LBACSYSor as a user who has been granted theLBAC_DBAdatabase role. To find if a user has been granted this role, query theGRANTEEandGRANTED_ROLEcolumns of theDBA_ROLE_PRIVSdata dictionary view.
For example:
sqlplus psmith_ols -- Or, sqlplus psmith_ols@hrpdb for a PDB named hrpdb Enter password: password
To find the available PDBs, query the DBA_PDBS data dictionary view. To check the current PDB, run the show con_name command.