Data Pump throws an error












1















I am trying to do datapump.



DECLARE
hdnl NUMBER;
BEGIN
hdnl := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'TABLE', job_name=>null);
DBMS_DATAPUMP.ADD_FILE( handle => hdnl, filename => 'tab1.dmp', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_dump_file);
DBMS_DATAPUMP.add_file( handle => hdnl, filename => 'exp.log', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_log_file);
DBMS_DATAPUMP.METADATA_FILTER(hdnl,'SCHEMA_EXPR','IN (''USERS'')');
DBMS_DATAPUMP.METADATA_FILTER(handle => hdnl,name => 'NAME_EXPR',value => 'IN (''CA_FILE'')');
DBMS_DATAPUMP.start_job(hdnl);
END;
/


But this throws an error:



Error report -
ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3507
ORA-06512: at "SYS.DBMS_DATAPUMP", line 3756
ORA-06512: at line 5
39001. 00000 - "invalid argument value"
*Cause: The user specified API parameters were of the wrong type or
value range. Subsequent messages supplied by
DBMS_DATAPUMP.GET_STATUS will further describe the error.
*Action: Correct the bad argument and retry the API.


Please help.










share|improve this question



























    1















    I am trying to do datapump.



    DECLARE
    hdnl NUMBER;
    BEGIN
    hdnl := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'TABLE', job_name=>null);
    DBMS_DATAPUMP.ADD_FILE( handle => hdnl, filename => 'tab1.dmp', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_dump_file);
    DBMS_DATAPUMP.add_file( handle => hdnl, filename => 'exp.log', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_log_file);
    DBMS_DATAPUMP.METADATA_FILTER(hdnl,'SCHEMA_EXPR','IN (''USERS'')');
    DBMS_DATAPUMP.METADATA_FILTER(handle => hdnl,name => 'NAME_EXPR',value => 'IN (''CA_FILE'')');
    DBMS_DATAPUMP.start_job(hdnl);
    END;
    /


    But this throws an error:



    Error report -
    ORA-39001: invalid argument value
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3507
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3756
    ORA-06512: at line 5
    39001. 00000 - "invalid argument value"
    *Cause: The user specified API parameters were of the wrong type or
    value range. Subsequent messages supplied by
    DBMS_DATAPUMP.GET_STATUS will further describe the error.
    *Action: Correct the bad argument and retry the API.


    Please help.










    share|improve this question

























      1












      1








      1








      I am trying to do datapump.



      DECLARE
      hdnl NUMBER;
      BEGIN
      hdnl := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'TABLE', job_name=>null);
      DBMS_DATAPUMP.ADD_FILE( handle => hdnl, filename => 'tab1.dmp', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_dump_file);
      DBMS_DATAPUMP.add_file( handle => hdnl, filename => 'exp.log', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_log_file);
      DBMS_DATAPUMP.METADATA_FILTER(hdnl,'SCHEMA_EXPR','IN (''USERS'')');
      DBMS_DATAPUMP.METADATA_FILTER(handle => hdnl,name => 'NAME_EXPR',value => 'IN (''CA_FILE'')');
      DBMS_DATAPUMP.start_job(hdnl);
      END;
      /


      But this throws an error:



      Error report -
      ORA-39001: invalid argument value
      ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
      ORA-06512: at "SYS.DBMS_DATAPUMP", line 3507
      ORA-06512: at "SYS.DBMS_DATAPUMP", line 3756
      ORA-06512: at line 5
      39001. 00000 - "invalid argument value"
      *Cause: The user specified API parameters were of the wrong type or
      value range. Subsequent messages supplied by
      DBMS_DATAPUMP.GET_STATUS will further describe the error.
      *Action: Correct the bad argument and retry the API.


      Please help.










      share|improve this question














      I am trying to do datapump.



      DECLARE
      hdnl NUMBER;
      BEGIN
      hdnl := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'TABLE', job_name=>null);
      DBMS_DATAPUMP.ADD_FILE( handle => hdnl, filename => 'tab1.dmp', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_dump_file);
      DBMS_DATAPUMP.add_file( handle => hdnl, filename => 'exp.log', directory => 'DATA_PUMP_DIR', filetype => dbms_datapump.ku$_file_type_log_file);
      DBMS_DATAPUMP.METADATA_FILTER(hdnl,'SCHEMA_EXPR','IN (''USERS'')');
      DBMS_DATAPUMP.METADATA_FILTER(handle => hdnl,name => 'NAME_EXPR',value => 'IN (''CA_FILE'')');
      DBMS_DATAPUMP.start_job(hdnl);
      END;
      /


      But this throws an error:



      Error report -
      ORA-39001: invalid argument value
      ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
      ORA-06512: at "SYS.DBMS_DATAPUMP", line 3507
      ORA-06512: at "SYS.DBMS_DATAPUMP", line 3756
      ORA-06512: at line 5
      39001. 00000 - "invalid argument value"
      *Cause: The user specified API parameters were of the wrong type or
      value range. Subsequent messages supplied by
      DBMS_DATAPUMP.GET_STATUS will further describe the error.
      *Action: Correct the bad argument and retry the API.


      Please help.







      oracle






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 26 '16 at 19:55









      dangdang

      7618




      7618






















          2 Answers
          2






          active

          oldest

          votes


















          2














          You got the error from line 5. This is line 5:



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file
          );


          If the specified dumpfile already exists, this line throws the above error. You can add reusefile => 1 to overwrite the existing file and avoid this error.



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file,
          reusefile => 1
          );





          share|improve this answer
























          • The above was not needed, it worked automatically. I updated the question: dba.stackexchange.com/questions/127400/…

            – dang
            Jan 26 '16 at 20:33



















          -1














          I am getting this error while doing import






          share|improve this answer








          New contributor




          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





















          • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

            – Erik Darling
            12 mins ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f127393%2fdata-pump-throws-an-error%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          You got the error from line 5. This is line 5:



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file
          );


          If the specified dumpfile already exists, this line throws the above error. You can add reusefile => 1 to overwrite the existing file and avoid this error.



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file,
          reusefile => 1
          );





          share|improve this answer
























          • The above was not needed, it worked automatically. I updated the question: dba.stackexchange.com/questions/127400/…

            – dang
            Jan 26 '16 at 20:33
















          2














          You got the error from line 5. This is line 5:



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file
          );


          If the specified dumpfile already exists, this line throws the above error. You can add reusefile => 1 to overwrite the existing file and avoid this error.



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file,
          reusefile => 1
          );





          share|improve this answer
























          • The above was not needed, it worked automatically. I updated the question: dba.stackexchange.com/questions/127400/…

            – dang
            Jan 26 '16 at 20:33














          2












          2








          2







          You got the error from line 5. This is line 5:



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file
          );


          If the specified dumpfile already exists, this line throws the above error. You can add reusefile => 1 to overwrite the existing file and avoid this error.



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file,
          reusefile => 1
          );





          share|improve this answer













          You got the error from line 5. This is line 5:



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file
          );


          If the specified dumpfile already exists, this line throws the above error. You can add reusefile => 1 to overwrite the existing file and avoid this error.



          DBMS_DATAPUMP.ADD_FILE(
          handle => hdnl, filename => 'tab1.dmp',
          directory => 'DATA_PUMP_DIR',
          filetype => dbms_datapump.ku$_file_type_dump_file,
          reusefile => 1
          );






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 26 '16 at 20:26









          Balazs PappBalazs Papp

          26.6k2931




          26.6k2931













          • The above was not needed, it worked automatically. I updated the question: dba.stackexchange.com/questions/127400/…

            – dang
            Jan 26 '16 at 20:33



















          • The above was not needed, it worked automatically. I updated the question: dba.stackexchange.com/questions/127400/…

            – dang
            Jan 26 '16 at 20:33

















          The above was not needed, it worked automatically. I updated the question: dba.stackexchange.com/questions/127400/…

          – dang
          Jan 26 '16 at 20:33





          The above was not needed, it worked automatically. I updated the question: dba.stackexchange.com/questions/127400/…

          – dang
          Jan 26 '16 at 20:33













          -1














          I am getting this error while doing import






          share|improve this answer








          New contributor




          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





















          • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

            – Erik Darling
            12 mins ago
















          -1














          I am getting this error while doing import






          share|improve this answer








          New contributor




          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





















          • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

            – Erik Darling
            12 mins ago














          -1












          -1








          -1







          I am getting this error while doing import






          share|improve this answer








          New contributor




          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.










          I am getting this error while doing import







          share|improve this answer








          New contributor




          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          share|improve this answer



          share|improve this answer






          New contributor




          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered 39 mins ago









          SrikanthSrikanth

          1




          1




          New contributor




          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          Srikanth is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.













          • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

            – Erik Darling
            12 mins ago



















          • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

            – Erik Darling
            12 mins ago

















          This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

          – Erik Darling
          12 mins ago





          This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

          – Erik Darling
          12 mins ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f127393%2fdata-pump-throws-an-error%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Ronny Ackermann

          Köttigit

          MySQL 8.0.15 starts normally but any connection hangs