Sep 21 2009

Execute DDL in Remote database

Normally you are not allowed to run any DDL commands through DBLINK. If you want to run some DDL commands against remote database you need to us DBMS_SQL package. Here is the Example
      
DECLARE
c_handle INTEGER;
feedback INTEGER;
BEGIN
c_handle := DBMS_SQL.open_cursor@TEST;
DBMS_SQL.parse@TEST( c_handle, ‘create table test(eno number,ename varchar2(25))’, DBMS_SQL.V7);
feedback := DBMS_SQL.EXECUTE@TEST(c_handle);
DBMS_SQL.close_cursor@TEST(c_handle);
END;

Comments are closed.

Alibi3col theme by Themocracy