Re: CREATE DB-LINK with native dynamic SQL

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 11 Jan 2002 13:04:17 -0800
Message-ID: <a1nk0h01b54_at_drn.newsguy.com>


In article <80cb00f5.0201100559.74851599_at_posting.google.com>, antonin_at_mgi.de says...
>
>Hi,
>
>it is possible to create a db link with sql*plus.
>But the same statement in native dynamic sql used in a stored
>procedure returns with an error. Why ?
>

Well, we have to guess (this is sort of like a game show, like jepardy -- we have the guess the question).

I'll guess, you are getting ora-01031 Insufficient privs

read
http://osi.oracle.com/~tkyte/Misc/RolesAndProcedures.html for why

If not, hows about an example?? (with the errors of course!)

>The alternative I use now is, create the db link, then run the
>procedure, then
>drop the db link in a sql*plus-script. But this version can be running
>a little bit instabil. ( e.g. "rollback segment too small", etc )
>
>Is there anyone who knows a better way ?
>
>With thanks and kind regards
>
>Christian Antonin

--
Thomas Kyte (tkyte_at_us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Fri Jan 11 2002 - 22:04:17 CET

Original text of this message