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.

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

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


Post a Comment