Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Beginners Question on Stored Procedures

Re: Beginners Question on Stored Procedures

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 31 May 2002 13:16:34 -0700
Message-ID: <ad8ln201mha@drn.newsguy.com>


In article <90a73003.0205310841.43586491_at_posting.google.com>, victorkaminsky_at_yahoo.de says...
>
>Hi all,
>
>I have created a stored procedure under 8.1.7 on Linux 7.3(Kernel
>2.4.12).
>There a some DBLinks and I wonder how I can create this procedure on
>every instance, not just on the one i am logged on. Do I have program
>a loop for every entry in oratab, or can I do this under SQL*Plus? I
>do not want to connect to each instance and type the Procedure over
>and over again.
>
>Thank you for your help.
>
>VK

You cannot do DDL over a dblink and CREATE PROCEDURE is DDL.

Put the stored procedure in a script (should be there anyway right) and do this:

SQL> connect u/p_at_database1
SQL> @script
SQL> connect u/p_at_database2
SQL> @script

.......
--
Thomas Kyte (tkyte@oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Fri May 31 2002 - 15:16:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US