This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 问一个oracle procedure的问题一个procedure写好了之后,如何执行呢?
我在sqlplus下用exec执行,总是指出identifier 'procedure_name' must be declare?
以前没有用过oracle, oracle procedure运行之前是否要compile以下?或者说是把它存到数据库里面?
-xiagangle(xiagangle);
2002-11-5
{213}
(#838442@0)
-
do you use following statements to execute it: exec procedure_name? what is your procedure name?
-rabbitbug(兔八哥);
2002-11-5
(#838461@0)
-
yes, sql file and error message...
-xiagangle(xiagangle);
2002-11-5
{785}
(#838685@0)
-
自己up以下
-xiagangle(xiagangle);
2002-11-5
(#838882@0)
-
I am thinking that might be caused by different username.Look like you create a procedure and then try to execute it from SQL*Plus.
The schema name of the procedure should be your login name when you create the procedure.
If you still use the same login name to execute this procedure, there should be NO problem.
But, there will be a problem if you use a different user to execute this procedure under the condition that you didn't grant execute priviledge to the new user.
Just some thoughts, may need more detail to troubleshoot your problem.
-kew888(西竹);
2002-11-6
{495}
(#839396@0)
-
Hi, you should use "@raise_salary.sql to run the sql file to create the procedure , after that you can use "select * from dba_source where name='procedure_name';" to check whether your procedure hasbeen generated. If it's there,then you can "exec procedure_name' to exec it
-wander2001(猫行天下);
2002-11-6
{78}
(#839521@0)
-
thank you, this what I want.
-xiagangle(xiagangle);
2002-11-6
(#839544@0)
-
before the "end raise_salary; ", I think you also need add a "end;"
-ling7199(Michaell);
2002-11-15
(#856106@0)