For tables, IGNORE=Y causes rows to be imported into existing tables. No message is given. If a table already exists, IGNORE=N causes an error to be reported, and the table is skipped with no rows inserted. Also, objects dependent on tables, such as indexes, grants, and constraints, will not be created if a table already exists and IGNORE=N. When you choose to create tables manually before importing data into them from an export file, you should use either the same table definition previously used or a compatible format. For example, although you can increase the width of columns (列只能增加宽度)and change their order, you cannot do the following: Add NOT NULL columns --不能加非空列 Change the datatype of a column to an incompatible datatype (LONG to NUMBER, for example) --不能够改非兼容的数据类型 Change the definition of object types used in a table --不能修改表中对象类型的定义 最关键的可能是这个--‘变换个别字段名’you should use either the same table definition previously used or a compatible format
先将AA.DMP导入一个临时用户,然后实现数据的移植,既将临时用户下的数据插入到正式用户下。
如果需要处理的表特别多,则可以编写一个存储过程或编写客户端程序,根据ORACLE系统表信息,循环处理每一个表。
sys.user_tables 或sys.all_tables.
具我所知,如果库表已经存在,导入时除了覆盖就是忽略,好象没有追加记录的功能。
1)没执行成功。TRY:imp aa/aa@gg file=aa.dmp ignore=no
2)执行结果不符合你的要求。如果库表已经存在,导入时除了覆盖就是忽略。
imp system/system_password fromuser=你导出的用户名1,用户2... touser=你要导入的用户名1,用户2... file=c:\aa.dmp log=c:\logname ignore=no路径要写对!
然后你在该表的字段名、长度等属性
Add NOT NULL columns --不能加非空列
Change the datatype of a column to an incompatible datatype (LONG to NUMBER, for example) --不能够改非兼容的数据类型
Change the definition of object types used in a table --不能修改表中对象类型的定义
最关键的可能是这个--‘变换个别字段名’you should use either the same table definition previously used or a compatible format