Error Executing Script: PLS-00103: Encountered the symbol "DECLARE"
Re: Error Executing Script: PLS-00103: Encountered the symbol "DECLARE"
We will investigate this issue and will answer you as soon as possible.
Re: Error Executing Script: PLS-00103: Encountered the symbol "DECLARE"
The following script causes no errors on our side:
Code: Select all
--##REMARKS make sure we have permission to do things
DECLARE
SDDL settingsdatatype.datatypevarchar2000 % TYPE;
BEGIN
SDDL := 'PURGE RECYCLEBIN';
--DBMS_OUTPUT.Put_Line(sDDL);
EXECUTE IMMEDIATE SDDL;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
/
--##REMARKS First check there is at least some content in the LHAPPT
DECLARE
NCOUNT settingsdatatype.datatypeint % TYPE;
NODATA EXCEPTION;
BEGIN
SELECT COUNT(rpttaskid)
INTO NCOUNT
FROM lhappt_owner.rpttask;
IF NCOUNT = 0
THEN
RAISE NODATA;
END IF;
END;
/
--##REMARKS DISABLE ALL TRIGGERS IN LHAPP_OWNER
DECLARE
SDDL settingsdatatype.datatypevarchar2000 % TYPE;
CURSOR C1 IS
SELECT *
FROM SYS.ALL_TRIGGERS
WHERE OWNER = 'LHAPP_OWNER'
AND TRIGGER_NAME <> 'TRIG_LHSESSION'
AND TRIGGER_NAME <> 'TRIG_COMPUTEREXTEVENTHISTORY'
ORDER BY TABLE_NAME;
BEGIN
FOR C1REC IN C1
LOOP
SDDL := 'ALTER TRIGGER LHAPP_OWNER.' || C1REC.TRIGGER_NAME || ' DISABLE';
--DBMS_OUTPUT.Put_Line(sDDL);
EXECUTE IMMEDIATE SDDL;
END LOOP;
END;