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

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

Re: Using database links in a proc

From: <raman.yagna_at_db.com>
Date: Wed, 24 May 2000 15:20:03 +0800
Message-Id: <10507.106478@fatcity.com>


hi ,

      Use dynamic method to run this type of program.

Regards,
Raman

From: Zabair.Ahmed_at_natwest.com on 23/05/2000 16:47 GMT

Please respond to ORACLE-L_at_fatcity.com

To: ORACLE-L_at_fatcity.com
cc:
Subject: Using database links in a proc

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
--
Author:
  INET: Zabair.Ahmed_at_natwest.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
Received on Wed May 24 2000 - 02:20:03 CDT

Original text of this message

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