我用数据库链接创build了一个数据库链接。
create public database link REMOTEDB connect to REMOTEUSER identified by REMOTEPWD using 'REMOTEDB';
然后我在远程数据库中创build一个表,
create table MYTABLE@REMOTEDB (name varchar2(20)));
它说, ORA-02021 DDL operations are not allowed on| a remote database.. ORA-02021 DDL operations are not allowed on| a remote database..
请问这不工作的任何成本,或者我只是缺less一些权限来创build?
通过数据库链接创build表看起来像一个非常糟糕的主意。 我看不出有什么理由这样做,所以我不认为这是可行的。
您可以远程调用DBMS_SQL来创build一个表
declare v_cursor NUMBER; v_ind number; begin v_cursor := dbms_sql.open_cursor@dblink; dbms_sql.parse@dblink(v_cursor, 'create table t_gm_x (id number)', dbms_sql.native); v_ind := dbms_sql.execute@dblink( v_cursor ); end; /