ORA-47401 while granting privilege on Database Vault protected object as object owner
(Doc ID 1341292.1)
Last updated on JUNE 17, 2024
Applies to:
Oracle Database Vault - Version 11.1 and laterInformation in this document applies to any platform.
Symptoms
-- Database Vault is enabled in the database.
-- While granting access / SELECT privilege on a table as the owner of the table ORA-47401 error is reported.
SQL> connect Username/******
Connected.
SQL> show user
USER is "USERNAME"
SQL> grant select on username.test to username_role;
grant select on username.test to username_role
*
ERROR at line 1:
ORA-47401: Realm violation for GRANT on USERNAME.TEST
-- The table, schema owning the table and the role to which the privilege is being granted have been added to the same realm that protects the table.
SQL> BEGIN
DVSYS.DBMS_MACADM.CREATE_REALM(
realm_name => 'Test_Realm',
description => 'Test',
enabled => DBMS_MACUTL.G_YES,
audit_options => 0);
END;
/
SQL> BEGIN
DVSYS.DBMS_MACADM.ADD_OBJECT_TO_REALM(
realm_name => 'Test_Realm',
object_owner => 'USERNAME',
object_name => 'TEST',
object_type => 'TABLE');
END;
/
SQL> BEGIN
DVSYS.DBMS_MACADM.ADD_AUTH_TO_REALM(
realm_name => 'Test_Realm',
grantee => 'USERNAME');
END;
/
SQL> BEGIN
DVSYS.DBMS_MACADM.ADD_OBJECT_TO_REALM(
realm_name => 'Test_Realm',
object_owner => 'SYS',
object_name => 'USERNAME_ROLE',
object_type => 'ROLE');
END;
/
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |