Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

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

  




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 Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software