[Developer] #567 add VPD SQL execution evidence
This commit is contained in:
23
sql/adb/34_agent_ords_execution_evidence_grant.sql
Normal file
23
sql/adb/34_agent_ords_execution_evidence_grant.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
-- ============================================================
|
||||
-- 34_agent_ords_execution_evidence_grant.sql
|
||||
-- Enable SQL_ID and DBMS_XPLAN evidence for VPD probe requests.
|
||||
--
|
||||
-- Run as SYS or a DBA account that can grant SYS.V_$ dynamic-performance
|
||||
-- views. Typical Autonomous ADMIN accounts cannot delegate these views.
|
||||
-- The grants are read-only and scoped to the ORDS parsing schema. They do
|
||||
-- not grant table DML or alter DBMS_RLS enforcement.
|
||||
-- ============================================================
|
||||
WHENEVER SQLERROR EXIT SQL.SQLCODE
|
||||
SET ECHO ON
|
||||
SET FEEDBACK ON
|
||||
|
||||
PROMPT === Granting ORDS cursor-evidence read access ===
|
||||
GRANT SELECT ON V_$SQL TO CB_ORDS;
|
||||
GRANT SELECT ON V_$SQL_PLAN TO CB_ORDS;
|
||||
GRANT SELECT ON V_$SQL_PLAN_STATISTICS_ALL TO CB_ORDS;
|
||||
GRANT SELECT ON V_$SESSION TO CB_ORDS;
|
||||
GRANT EXECUTE ON DBMS_XPLAN TO CB_ORDS;
|
||||
|
||||
PROMPT === ORDS cursor-evidence grants ready ===
|
||||
PROMPT SQL_ID evidence will appear after the next /probe call.
|
||||
EXIT;
|
||||
Reference in New Issue
Block a user