Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a database link using database link.

create public database link REMOTEDB connect to REMOTEUSER identified by REMOTEPWD using 'REMOTEDB';

then i create a table in remote db like,

create table MYTABLE@REMOTEDB (name varchar2(20)));

It says, ORA-02021 DDL operations are not allowed on| a remote database..

Will this Not work on any cost, or am i just missing some permissions to create ?

share|improve this question
up vote 1 down vote accepted

Creating a table through a database link looks like a very bad idea. I cannot see any reason for doing so, therefor i don't think that this can work.

share|improve this answer
its not for the usual purpose.. i had to export some data to another datbase (without using usual export/import .dmp) .. anyway, i worked around a little, created tables manually, and inserted datas remotely! – raj Apr 8 '10 at 9:30

You can call DBMS_SQL remotely to create a table

 v_cursor  NUMBER;
 v_ind      number;
 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 );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.