....
If you need to get every bind, then I think you'd have to look at doing it via tracing.
....Other option would be to have FGA configured like this, that would help us to track all the bind variable values used in each execution. something like this.
demo@PDB1> create table t as select * from emp;
Table created.
demo@PDB1> begin
2 dbms_fga.add_policy(object_schema=>user,
3 object_name=>'T',
4 policy_name=>'T_ACCESS_POLICY' );
5 end;
6 /
PL/SQL procedure successfully completed.
demo@PDB1> variable x1 number
demo@PDB1> variable x2 varchar2(20)
demo@PDB1> variable x3 varchar2(20)
demo@PDB1> exec :x1 := 10; :x2 := 'KING'; :x3 := '15-Aug-2019';
PL/SQL procedure successfully completed.
demo@PDB1> select count(*) from t where deptno = :x1;
COUNT(*)
----------
3
demo@PDB1> col db_user format a5
demo@PDB1> col sql_text format a30
demo@PDB1> col sql_bind format a15
demo@PDB1> col policy_name format a15
demo@PDB1> select db_user,sql_text,sql_bind,policy_name
2 from dba_fga_audit_trail
3 where policy_name ='T_ACCESS_POLICY' ;
DB_US SQL_TEXT SQL_BIND POLICY_NAME
----- ------------------------------ --------------- ---------------
DEMO select count(*) from t where d #1(2):10 T_ACCESS_POLICY
eptno = :x1
demo@PDB1> select count(*) from t where ename = :x2;
COUNT(*)
----------
1
demo@PDB1> select db_user,sql_text,sql_bind,policy_name
2 from dba_fga_audit_trail
3 where policy_name ='T_ACCESS_POLICY' ;
DB_US SQL_TEXT SQL_BIND POLICY_NAME
----- ------------------------------ --------------- ---------------
DEMO select count(*) from t where d #1(2):10 T_ACCESS_POLICY
eptno = :x1
DEMO select count(*) from t where e #1(4):KING T_ACCESS_POLICY
name = :x2
demo@PDB1> select count(*) from t where hiredate < to_date(:x3,'dd-mon-yyyy');
COUNT(*)
----------
14
demo@PDB1> select db_user,sql_text,sql_bind,policy_name
2 from dba_fga_audit_trail
3 where policy_name ='T_ACCESS_POLICY' ;
DB_US SQL_TEXT SQL_BIND POLICY_NAME
----- ------------------------------ --------------- ---------------
DEMO select count(*) from t where d #1(2):10 T_ACCESS_POLICY
eptno = :x1
DEMO select count(*) from t where e #1(4):KING T_ACCESS_POLICY
name = :x2
DEMO select count(*) from t where h #1(11):15-Aug- T_ACCESS_POLICY
iredate < to_date(:x3,'dd-mon- 2019
yyyy')
demo@PDB1>
demo@PDB1>
demo@PDB1> exec :x1 := 20;
PL/SQL procedure successfully completed.
demo@PDB1> select count(*) from t where deptno = :x1;
COUNT(*)
----------
5
demo@PDB1> select db_user,sql_text,sql_bind,policy_name
2 from dba_fga_audit_trail
3 where policy_name ='T_ACCESS_POLICY';
DB_US SQL_TEXT SQL_BIND POLICY_NAME
----- ------------------------------ --------------- ---------------
DEMO select count(*) from t where d #1(2):10 T_ACCESS_POLICY
eptno = :x1
DEMO select count(*) from t where e #1(4):KING T_ACCESS_POLICY
name = :x2
DEMO select count(*) from t where h #1(11):15-Aug- T_ACCESS_POLICY
iredate < to_date(:x3,'dd-mon- 2019
yyyy')
DEMO select count(*) from t where d #1(2):20 T_ACCESS_POLICY
eptno = :x1
demo@PDB1>