If You want to Drop Multiple Object at once use this script. Please
using
This script check cursor query and take update of your database
/* Formatted on 3/31/2020 1:40:01 am (QP5 v5.139.911.3011)
*/
DECLARE
CURSOR OBJECTLIST
IS
SELECT 'Drop
'
|| OBJECT_TYPE
|| ' '
|| OWNER
|| '.'
|| OBJECT_NAME
|| ''
DROPCOMMAND
FROM ALL_OBJECTS
WHERE OWNER = 'APPS' AND OBJECT_NAME LIKE 'EBA%';
BEGIN
FOR LDX IN OBJECTLIST
LOOP
DBMS_OUTPUT.PUT_LINE
(TO_CHAR (LDX.DROPCOMMAND));
BEGIN
EXECUTE IMMEDIATE
LDX.DROPCOMMAND;
DBMS_OUTPUT.PUT_LINE ('Object has been dropped.');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.
PUT_LINE (
SQLERRM
|| ' While performing this Command,'
|| TO_CHAR
(LDX.DROPCOMMAND));
END;
END LOOP;
END;
select 'Drop '||OBJECT_TYPE||' '||OWNER||'.'||OBJECT_NAME||';'
from all_objects
where owner='APPS'
AND OBJECT_NAME LIKE 'EBA%'
No comments:
Post a Comment