Before using Oracle Label Security, you must register it with the database and then enable the LBACSYS
Oracle Label Security account.
LBACSYS
, is granted the LBAC_DBA
database role, which provides the privileges necessary to manage Oracle Label Security.Parent topic: Using Oracle Label Security Functionality
You must register Oracle Label Security with the database in which you plan to use it.
DBA_OLS_STATUS
and CDB_OLS_STATUS
data dictionary views to find if Oracle Label Security has already been registered and enabled.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.
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.
You can both register and enable Oracle Label Security from SQL*Plus.
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.
After you complete the Oracle Label Security registration and enablement process, you can begin using it.
LBAC_DBA
database role.From Enterprise Manager Cloud Control, you use the Oracle Label Security pages to create and manage Oracle Label Security policies.
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 LBACSYS
or as a user who has been granted the LBAC_DBA
database role. To find if a user has been granted this role, query the GRANTEE
and GRANTED_ROLE
columns of the DBA_ROLE_PRIVS
data 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.