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

Home -> Community -> Mailing Lists -> Oracle-L -> Using database links in a proc

Using database links in a proc

From: <Zabair.Ahmed_at_natwest.com>
Date: Tue, 23 May 2000 16:41:04 +0100
Message-Id: <10506.106386@fatcity.com>


I've got the following piece of pl/sql

create or replace procedure objectfit(s_dblink IN VARCHAR2) as

dblink VARCHAR2(30);

CURSOR objectfit_cur IS

   select   s.owner,
            s.segment_name,
            s.segment_type,
            s.next_extent,
            s.extents,
            s.pct_increase
   from     dba_segments_at_dblink s, dba_free_space_at_dblink f
   where    s.tablespace_name = f.tablespace_name
   and      s.segment_type in ('TABLE','INDEX')
   having   s.next_extent > (0.5 * max(f.bytes))
   group by f.tablespace_name,
            s.owner,
            s.segment_name,
            s.segment_type,
            s.next_extent;


BEGIN dblink := s_dblink;

etc

I want to pass the database link (dblink) as a parameter in the procedure (s_dblink),
my question is can i do this if so how.
When i run the above cursor i get an error message saying it can't find the database link, dblink (obvious).

Any ideas!!!!

TIA Regards

Zabair



The contents of this e-mail may be privileged and are confidential. It may not be disclosed to or used by anyone other than the addressee(s), nor copied in any way. If received in error, please advise the sender, then delete it from your system. National Westminster Bank Plc is regulated by the Personal Investment Authority and IMRO for investment business. A member of the NatWest and Gartmore Marketing Group advising on the life assurance, pensions and unit trust products only of that Marketing Group. Registered Office: 41 Lothbury London EC2P 2BP Registered Number: 929027 England
Received on Tue May 23 2000 - 10:41:04 CDT

Original text of this message

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