Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> 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
![]() |
![]() |