Topic: SQL*Plus and PL/SQL >> Scripts Containing Multiple Stored Procedures
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: Scripts Containing Multiple Stored Procedures |
| Tony |
Posted: Apr 04, 2007 04:25:29 PM |
Total Post: 1
Joined: Apr, 2007
|
Hi, and thanks for all of your help in advance. If I've posted this in the wrong forum, please let me know.
It's a simple question really: I'm writing a SQL Script that creates multiple stored procedures. Unfortunately, when I execute the script, all of the text for the stored procedures is stored in the first one, and the rest are not created.
For example, the following SQL Script:
CREATE OR REPLACE PROCEDURE proc_1()
AS
BEGIN
-- Some SQL
END proc_1;
CREATE OR REPLACE PROCEDURE proc_2()
AS
BEGIN
-- Some SQL
END proc_2;
will create a single stored procedure named proc_1, and have the entirety of the above as its code. Is there a way to let Oracle know that there are two seperate stored procedures? Or is there another problem I'm not aware of?
Regards,
Anthony Frasso |
|
|
Sentha |
| Posted: Apr 06, 2007 05:14:02 PM | |
|
Total Post: 2
Joined: Jan, 2007
|
Hi,
create a file :data.sql
add all the proc u want. after each proc added a following '/' to
execute.
Example
create or replace procedure p1(a1 in number)
is
begin
dbms_output.put_line('p1 - ' || a1);
end p1;
/
create or replace procedure p2
is
begin
dbms_output.put_line('p2');
end p2;
/
now u can deploy all the proc at once,
@data.sql
/sentha
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Vinoth Kumar | 357 |
| Gopu Gopi | 340 |
| Gitesh Trivedi | 322 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|