1

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 ?

2 Answers 2

1

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.

1
  • 1
    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, 2010 at 9:30
4

You can call DBMS_SQL remotely to create a table

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;
/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .