1-
create TYPE fname_tab IS TABLE OF varchar2(1000);
2-
create or replace function get_fname (p_directory varchar2) return fname_tab
is
fname_tab_v fname_tab;
l_null varchar2(100);
l_directory varchar2(100);
begin
l_directory := p_directory;
sys.dbms_backup_restore.searchfiles (l_directory, l_null);
select fname_krbmsft fname
BULK COLLECT INTO fname_tab_v
from x$krbmsft;
return fname_tab_v;
Exception
when no_data_found then fname_tab_v:= null;
when others then fname_tab_v:= null;
End;
/
3-
grant execute on get_fname to <User_name>;
4-
select * from table
(sys.get_fname('d:\dba_temp'))
No comments:
Post a Comment