My Oracle Support Banner

FGA policy creation fails with PLS-00201: identifier 'DBMS_FGA_ADD_POLICY' must be declared (Doc ID 2869746.1)

Last updated on APRIL 17, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 19.15.0.0.0 and later
Information in this document applies to any platform.

Symptoms

 Creating a FGA on a schema table fails with PLS-00201: identifier 'DBMS_FGA_ADD_POLICY' must be declared

 

bash-4.1$ sqlplus <user-name>/<pwd>@<tnsalias>

SQL*Plus: Release 19.0.0.0.0 - Production on Sun May 15 06:55:57 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle. All rights reserved.

Last Successful login time: Sun May 15 2022 06:54:57 +00:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> begin
dbms_fga_add_policy(
object_schema => 'TEST',
object_name => 'TABLE',
policy_name => 'TEST_POL',
audit_column => 'COLUMN',
handler_schema => 'handler_schema',
handler_module => 'FUNCTION',
enable => 'TRUE',
statement_types => 'SELECT,UPDATE,DELETE,INSERT',
audit_trail => DBMS_FGA.DB + DBMS_FGA.EXTENDED,
audit_column_opts => DBMS_FGA.ALL_COLUMNS);
END;

/

dbms_fga_add_policy(
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00201: identifier 'DBMS_FGA_ADD_POLICY' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored

Changes

 Creating a new FGA policy on a schema to audit SQL statements

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
Changes
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.