Re: CREATE DB-LINK with native dynamic SQL

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 11 Jan 2002 21:30:50 +0100
Message-ID: <bpiu3u46iq5tk8v5sk3c4qdk9u3a16mho4_at_4ax.com>


On 10 Jan 2002 05:59:10 -0800, antonin_at_mgi.de (Christian Antonin) wrote:

>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 ?
>
>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

You need to use execute immediate (8i and beyond) or dbms_sql (8.0 and before).
Doing so you can execute any ddl command. rollback segment too small errors have absolutely zilch to do with database links.

Hth

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Fri Jan 11 2002 - 21:30:50 CET

Original text of this message