برای اجرای دستورات DDLای از طریق Database Link می توان از پروسیجر dbms_utility.exec_ddl_statement استفاده کرد. مثالهای زیر را ببینید:
مثال 1:
SQL> exec dbms_utility.exec_ddl_statement@dblink(‘drop table EXCHTBL2’);
PL/SQL procedure successfully completed
SQL> exec dbms_utility.exec_ddl_statement@dblink(‘drop table EXCHTBL2’);
ORA-00942: table or view does not exist
مثال 2:
SQL> declare
2 stmt varchar2(4000);
3 begin
4 stmt:=’create user ali identified by a’;
5 execute immediate ‘begin dbms_utility.exec_ddl_statement@dblink(:stmt);end;’ using stmt;
6 end;
7 /
PL/SQL procedure successfully completed
SQL> /
ORA-01920: user name ‘ALI’ conflicts with another user or role name
ممنون