I have a problem creating an addm task in a remote database.
BEGIN DBMS_UTILITY.EXEC_DDL_STATEMENT@dblink ( ' begin DBMS_ADVISOR.create_task ( advisor_name => ''ADDM'', TASK_NAME => ''15991_16109_AWR_SNAPSHOT_T1'', TASK_DESC => ''Advisor for snapshots 15991 to 16109.''); end; ' ); END;
Also, executing locally in the target database does not produce a result.
BEGIN DBMS_UTILITY.EXEC_DDL_STATEMENT( ' begin DBMS_ADVISOR.create_task ( advisor_name => ''ADDM'', TASK_NAME => ''15991_16109_AWR_SNAPSHOT_T1'', TASK_DESC => ''Advisor for snapshots 15991 to 16109.''); end; ' ); END;
But it is executed locally in the target database without DBMS_UTILITY.EXEC_DDL_STATEMENT and quotes correction:
begin DBMS_ADVISOR.create_task ( advisor_name => 'ADDM', TASK_NAME => '15991_16109_AWR_SNAPSHOT_T1', TASK_DESC => 'Advisor for snapshots 15991 to 16109.'); end;
There are no problems with connection, dblinks, user grants, etc ... The problem with DBMS_UTILITY.EXEC_DDL_STATEMENT. The quotes seem correct, I checked with DBMS_OUTPUT.PUT_LINE.
Any ideas? Thanks.
source share