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 -> Call a sp from other intances

Call a sp from other intances

From: Virgilio Aray <virgilio_at_aray.ec>
Date: 19 Apr 2005 18:00:42 -0700
Message-ID: <9f78c8f4.0504191700.1fc1dc13@posting.google.com>


Hi

I have two instances of ORACLE db with similar information: ALFA & BRAVO, in Alfa i have a SP to insert/update a table called SP_UPDATE_ALFA then i want call a store procedure from BRAVO called SP_UPDATE_BRAVO inside SP_UPDATE_ALFA, ofcourse there is a database link in ALFA to connect to BRAVO.

Let me explain with a seudo SP (sorry i have a bad english)

create o replace procedure sp_update_alfa(

cust_code in customer.code%type,
cust_name in customer.name%type, 
cust_address in customer.address%type,
cust_city in customer.city%type

is
  dummy integer;
begin
  select count(code) into dummy from customer where customer.code=cust_code;
  if dummy = 0 then -- insert

     insert into customer (code,name,address,city) values (cust_code,cust_name,cust_address,cust_city);   else

     update customer set name=cust_name, address=cust_address, city=cust_city where code=cust_code;
  end if;
/*here i want call the other sp from bravo*/
/*but i dont know the syntax to call a sp from bravo inside the sp
from alfa */
  sp_update_bravo_at_BRAVO(cust_code,cust_name,cust_address,cust_city) end;

Somebody know how call a sp from antother instance inside a regular sp? Received on Tue Apr 19 2005 - 20:00:42 CDT

Original text of this message

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