Link to home
Start Free TrialLog in
Avatar of gs79
gs79

asked on

import via database link using data pump utility

I have a followup question data pump in PLSQL.

Stuck with this!

When I try to import a schema via dblink (this is ideal for our req - small schema), it fails at line where call to OPEN proc is made. Note sure if there is any other permissions required:

     BEGIN
                         v_handle :=   DBMS_DATAPUMP.open(operation => v_operation,
                                   job_mode => 'IMPORT',
                                   remote_link =>'mydblink',
                                   job_name => 'IMP_SCHEMA',
                                   version => 'COMPATIBLE');
            p_job_handle := v_handle;
            dbms_output.put_line('200: '||p_job_handle);
        EXCEPTION
            WHEN OTHERS
            THEN
                DBMS_OUTPUT.put_line(SUBSTR('Failure in dbms_datapump.open', 1, 255));
                RAISE;
        END;

please let me know if you need further details
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gs79
gs79

ASKER

Error at line where it calls open

*
ERROR at line 1:
ORA-39006: internal error
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4087
ORA-06512: at "SYS.DBMS_DATAPUMP", line 5926
ORA-06512: at "myschema.import_pkg", line 100
ORA-06512: at line 2
Avatar of gs79

ASKER

Ok the schema I was connecting to via dblink was locked. After unlocking i am getting different error:


ERROR at line 1:
ORA-31631: privileges are required
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 4087
ORA-06512: at "SYS.DBMS_DATAPUMP", line 5926
ORA-06512: at "myschema.import_pkg", line 100
ORA-06512: at line 2


I gave following priv and still getting error

grant imp_full_database to myuser
Avatar of gs79

ASKER

I had to give export privs to the schema i was importing from. After that it worked..

Thanks