dynamic creation of database links? [message #39991] |
Mon, 02 September 2002 03:57 |
Jens Vogelgesang
Messages: 23 Registered: January 2002
|
Junior Member |
|
|
Hi all,
I want to create a dynamic database link.
I've tried
p_create_sql := 'CREATE DATABASE LINK ' || p_database_link_name ||
' CONNECT TO ' || user_name_in ||
' IDENTIFIED BY ' || user_name_in ||
' USING ''' || instance_name_in || '''';
DBMS_OUTPUT.PUT_LINE('# ' || p_create_sql);
EXECUTE IMMEDIATE p_create_sql;
but got an error. Within a sqlplus window it works. Are there any restriction to this
|
|
|
Re: dynamic creation of database links? [message #39992 is a reply to message #39991] |
Mon, 02 September 2002 05:53 |
|
Mahesh Rajendran
Messages: 10707 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
checkout the required privs!.
pl/sql cannot see the privs given via the roles.
so, grant the prives ( create db link etc...) explicitly to the user( using grant privlege command).
and try again.
|
|
|