我在服务器a上执行: 
SQL>create directory dump_dir as 'D:\dump_0210';
SQL>grant read,write on directory dump_dir to hid; 
C:\>expdp hid/scj directory=dump_dir dumpfile=bak_a.dmp logfile=a.log tables=t1,t2 
得到bak_a.dmp, 
然后再在服务器a上执行: SQL> drop user hid cascade; 
SQL> grant connect,resource to hid identified by scj; 
SQL> alter user hid default tablespace test_space temporary tablespace temp; 
SQL> grant read,write on directory dump_dir to hid; 
C:\>impdp hid/scj directory=dump_dir dumpfile=bak_a.dmp logfile=c.log table=t1,t2 一切都很正常。 
然而,我把bak_a.dmp放到服务器b的e:\0210目录下,服务器b上create directory dump_dir as 'e:\0210'; 
执行上面那段impdp代码时 ,却报错: ORA-39001: invalid argument value 
ORA-39000: bad dump file specification 
ORA-31619: invalid dump file "e:\0210\bak_a.dmp" 
问题: 
1,服务器b的导入怎么解决? 
2,象上面那样在dos中 
  每次导入或导出的时候都会出现“作业已于成功完成”, 
我在代码中没指定什么作业,我在oem里也没建job, 
    困惑是:执行完了,这个作业还会一直存在吗,会时不时的自动启动吗? 

解决方案 »

  1.   

    服务器b上hid用户是否已被授予dump_dir目录读权限?
      

  2.   


    授予了,
    在服务器B上执行的imp代码和服务器a上一样,
    服务器b上create directory dump_dir as 'e:\0210';
    只是dump_dir 的路径改成 'e:\0210';,和服务器a 的路径不同。SQL> drop user hid cascade; 
    SQL> grant connect,resource to hid identified by scj; 
    SQL> alter user hid default tablespace test_space temporary tablespace temp; 
    SQL> grant read,write on directory dump_dir to hid; 
    C:\>impdp hid/scj directory=dump_dir dumpfile=bak_a.dmp logfile=c.log table=t1,t2 
    另外一个oracel是英文版的,
    一个是中文版的
      

  3.   

    看看bak_a.dmp文件。在A,B服务器上大小是否完全一样。ORACLE的语言不重要,关键是版本(如10.2.0.1.0)
      

  4.   

    你IMPDP所在服务器(本例为B服务器)的ORACLE版本,必须>=EXPDP的ORACLE版本。
      

  5.   

    连sqlplus时出现:务器a
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    服务器b
    IMPDP所在服务器
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    这可咋办呢?
      

  6.   

    连sqlplus时出现: 服务器a 
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 
      

  7.   

    ORA-39001: invalid argument value
    ORA-39000: bad dump file specification 应该是版本问题。
      

  8.   

    你高版本EXPDP,低版本IMPDP,不出错才怪……以服务器B的客户端连接A,EXPDP吧。不过有可能过程会出现问题。若你不想升级B,这样也是个办法。10.1不稳定,早升级吧。