Executing DDL on a remote database via a dblink




Executing DDL on a remote database could not be simpler thanks to a very useful procedure inside the excellent DBMS_UTILITY package.

begin
  dbms_utility.exec_ddl_statement@EDGO('create table SCHEMA_NAME.TEST(col1 number)');
end;

This will create the table but be aware that the user must have the correct (explicit) rights to do the task.

In the example above the user must have "CREATE ANY TABLE" rights, roles will not work - giving the user DBA will fail to create the object.....

0 comments:

Post a Comment