Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling a procedure through a database link

DaggersAug 12 2009 — edited Aug 13 2009
I want to be able to execute procedures on remote databases. I do this after some lov's and text feilds have been entered and the submit button is clicked(this is a page process running PL/SQL anonymous block). Problem is the name of the procedure is dependant on the name of the database selected. For example this works:

dba_audit_pkg.create_user@remoteDB(
pi_username => :USERID
,pi_type => 'SUPPORT'
,pi_dbname => 'IB');

but this does not:

dba_audit_pkg.create_user@:P1_DATABASE(
pi_username => :USERID
,pi_type => 'SUPPORT'
,pi_dbname => 'IB');

Does anyone know how I can generate the name of a procedure depending on a variable ?

Thanks
Steve

Comments

Gaz in Oz

You could use XMLQUERY()

Paulzip
Answer

I could easily do this for you, but you won't learn anything.  However, here's a good article on how to go about it.

Marked as Answer by muttleychess · Sep 27 2020
muttleychess

wonderful !!

It seems the same example

Only I would like to know how to get the version of XML

xml version="1.0" encoding="UTF-8" standalone="yes

mNem

something like ...

select 

'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'

||

xmlserialize(document ... as clob indent) as xml_output

....

Paulzip

muttleychess wrote:

wonderful !!

It seems the same example

Only I would like to know how to get the version of XML

xml version="1.0" encoding="UTF-8" standalone="yes

The prolog is added (and only needed) if you serialise the data to a BLOB.  It's simply for the consumer's sake so they know how to decode the BLOB into character data.  If you are serialising into a CLOB, you don't need it, however if you really want to, use mNem's concat approach.

report error:
Oops, something went wrong!  We've notified our team to take a look. Please try again later. (Reference 300000.25.223.18258).
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 10 2009
Added on Aug 12 2009
2 comments
627 views