Sql Patch/Sql Profile is not picked up.
I need to know why a created Sql Patch/Sql Profile for a specific sql_id is not used when a query is executed in A PL/SQL Block but used if a query is issued explicitly.
The problems with the query that is called both through the EXEC DBMS_FEATURE_USAGE_INTERNAL.exec_db_usage_sampling(SYSDATE); and through the alter session set "_SWRF_TEST_ACTION"=53;
The body of the query is
select count(*) from seg$ s, ind$ i, obj$ o where s.type# = 6 AND s.user#
not in (select user# from user$ where name in ('SYS', 'SYSTEM' )) AND