由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - 问一个store procedure 问题
相关主题
How to let oracle execute a procedure every hour?Simple sqlplus question: execute stored procedure
Transact SQL问题请教sqlplus vs ODP.Net
问个问题Linked server problem
a Store Procedure question...请问如何DEPLOY STORED PROCEDURE啊
create linked server problem, please help怎么找工作啊?
How to creat user in Oracle?请各位帮我看看这个最简单的Stored Procedure (转载)
How to get SQL help in sqlplus?#在SQL里啥子意思
How to edit last sql statement in isqlwhy use anonymous block when calling stored procedure?
相关话题的讨论汇总
话题: link话题: procedure话题: end话题: begin话题: db
进入Database版参与讨论
1 (共1页)
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
2
store procedure不是用来干这些的
B*****g
发帖数: 34098
3
BEGIN
EXECUTE IMMEDIATE 'BEGIN misc.drop_db_link END;';
EXECUTE IMMEDIATE 'drop procedure misc.drop_db_link';
END;
/
1 (共1页)
进入Database版参与讨论
相关主题
why use anonymous block when calling stored procedure?create linked server problem, please help
mysql的问题How to creat user in Oracle?
德州招SQL DeveloperHow to get SQL help in sqlplus?
PL/SQL 输入DATAHow to edit last sql statement in isql
How to let oracle execute a procedure every hour?Simple sqlplus question: execute stored procedure
Transact SQL问题请教sqlplus vs ODP.Net
问个问题Linked server problem
a Store Procedure question...请问如何DEPLOY STORED PROCEDURE啊
相关话题的讨论汇总
话题: link话题: procedure话题: end话题: begin话题: db