sql - Create PLSQL package on linked database -
have 2 databases. 1 contains packages , available. , 1 stores data , rebuild every day.
the packages on first database making queries on second. have queries, need functions. got star schema on second , need select includes details in on row.
select getdetails(master-pk) xyz abc;
the function getdetails(pk)
details key , return them in 1 string: 'detail1, detail2, ...'
because of performance can not put these functions on database other packages are, have put them on database rebuild every day.
so want create package each time, before start queries. locally works fine dbms_sql.parse(curid, varchar2<b>a</b>, first, last, 1);
dbms_sql.parse@dblink(..)
give me pls-306. wrong number or type of parameter.
my restrictions are:
- i can not include package in start script or ever.
- the package must available on second db.
no:dbms_sql.parse(id, 'select getdetails@firstdb(pk) from..',1);
not perform enough.
create synonym remote package. like
create synonym remote_dbms_sql dbms_sql@db_link /
then should able execute locally:
remote_dbms_sql.parse(curid, varchar2<b>a</b>, first, last, 1);
Comments
Post a Comment