s*******1 发帖数: 92 | 1 My script is used to drop a database link from another schema. It works good.
---------------------------------------------------------
connect deploy/deploy@qa
CREATE OR REPLACE PROCEDURE misc.drop_db_link AS
BEGIN
EXECUTE IMMEDIATE 'drop database link link_name';
END drop_db_link;
/
BEGIN
misc.drop_db_link;
END;
/
BEGIN
EXECUTE IMMEDIATE 'drop procedure misc.drop_db_link';
END;
/
--------------------------------------------------------------
But, I want to make it cleaner. So I moved the last statement to the second
procedure. This time, sqlplus shows the first procedure created successfully
and no further output. sqlplus is stuck.
------------------------------------------------------
connect deploy/deploy@qa
CREATE OR REPLACE PROCEDURE misc.drop_db_link AS
BEGIN
EXECUTE IMMEDIATE 'drop database link link_name';
END drop_db_link;
/
BEGIN
misc.drop_db_link;
EXECUTE IMMEDIATE 'drop procedure misc.drop_db_link';
END;
/
-------------------------------------------------------------
Any thought? Thanks ! | s****a 发帖数: 9912 | | B*****g 发帖数: 34098 | 3 BEGIN
EXECUTE IMMEDIATE 'BEGIN misc.drop_db_link END;';
EXECUTE IMMEDIATE 'drop procedure misc.drop_db_link';
END;
/ |
|