我把问题说清楚些,就是我手上有一个数据库导出的3个DUMP文件,和一个导出时的LOG文件,我目前创建了一个DBA用户,想通过这3个DUMP 文件进行数据库还原。IMPDP命令如何写?

解决方案 »

  1.   

    Impdp xxx/xxx DIRECTORY=yyy DUMPFILE=zzz.dmp remap_schema=导出用户:导入用户
      

  2.   

    注意你每个数据文件里面的schema,remap_schema介绍:ExampleSuppose that you execute the following Export and Import commands to remap 
    the hr schema into the scott schema:> expdp SYSTEM/password SCHEMAS=hr DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp> impdp SYSTEM/password DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp 
    REMAP_SCHEMA=hr:scottIn this example, if user scott already exists before the import, 
    then the Import REMAP_SCHEMA command will add objects from the hr schema 
    into the existing scott schema. You can connect to the scott schema 
    after the import by using the existing password (without resetting it).If user scott does not exist before you execute the import operation, 
    Import automatically creates it with an unusable password. 
    This is possible because the dump file, hr.dmp, was created by SYSTEM, 
    which has the privileges necessary to create a dump file 
    that contains the metadata needed to create a schema.
     However, you cannot connect to scott on completion of the import, 
    unless you reset the password for scott on the target database 
    after the import completes.来自:http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_import.htm
      

  3.   


    1. 导入自身的方案 imp userid=scott/tiger file=d:\xxx.dmp 
    2. 导入其它方案 要求该用户具有dba的权限 imp userid=system/manager file=d:\xxx.dmp fromuser=system touser=scott
    3.  导入数据库 在默认情况下,当导入数据库时,会导入所有对象结构和数据,案例如下: imp userid=system/manager full=y file=d:\xxx.dmp