1,make sure that you can connect the remote database. 2,enter into the sqlplus,and execute the command:select dbms_metadata.getddl('TABLE',tablename) from user_tables and you will get all the tables definition of the current user.
can't implement the command,could you say it clearly?
最简单的,用PLSQLDev连接上数据库,然后 Tools->exprot user objects 就可以活动脚本了
exp 用户名/密码 tables=,,,, rows=n 具体表名可从tab中查询得到:select tname from tab where tabtype='TABLE'
2楼说的就是用oracle提供的dbms_metadata包里面的get_ddl来得到建表脚本,写的有点问题就是了,少了两个下划线。select dbms_metadata.get_ddl('TABLE',table_name) from user_tables;不过上面会把该用户的所用表的脚本都取出来。 如果只是取一个:select dbms_metadata.get_ddl('TABLE','MYTABLE') from dual;如果在sqlplus里面执行,建表语句很长的话,一般要设置一下: set long 9999;
2,enter into the sqlplus,and execute the command:select dbms_metadata.getddl('TABLE',tablename) from user_tables
and you will get all the tables definition of the current user.
2楼说的就是用oracle提供的dbms_metadata包里面的get_ddl来得到建表脚本,写的有点问题就是了,少了两个下划线。select dbms_metadata.get_ddl('TABLE',table_name) from user_tables;不过上面会把该用户的所用表的脚本都取出来。 如果只是取一个:select dbms_metadata.get_ddl('TABLE','MYTABLE') from dual;如果在sqlplus里面执行,建表语句很长的话,一般要设置一下:
set long 9999;