Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2013
    Posts
    10

    Unanswered: Using Data Pump From Java

    Hallo Everybody,
    I am using Data Pump on Oracle 11.2 XE in Java over Pl/SQL.

    Is it possible to get Log information over the jdbc like a ResultSet or so?

    By default they are stored in Files on Server.



    Best Regards

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >By default they are stored in Files on Server.
    correct
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2013
    Posts
    10
    Yes

    But how can i get the information from that files over the jdbc?
    Maybe a query on the master table or so?

    Has anybode experience with that problem?

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    perhaps you are using the wrong tool for the task at hand;
    but since we have no idea what specifically you are trying to accomplish,
    we can't guess any better solution.

    How will you, I or anyone know when correct solution is posted here?

    What problem are you trying to solve?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Feb 2013
    Posts
    10
    I am starting PL/Sql Data Pump:

    CallableStatement callStmt = conn.prepareCall(datapumpcode);

    In the varibale datapumpcode is following code :

    DECLARE
    h1 NUMBER;
    status VARCHAR2(20);
    BEGIN

    h1 := dbms_datapump.open (operation => 'EXPORT', job_mode => 'TABLE', job_name => 'xyz', version => 'COMPATIBLE');
    dbms_datapump.metadata_filter(handle => h1, name => 'SCHEMA_EXPR', value => 'IN(''xyz'')');
    dbms_datapump.metadata_filter(handle => h1, name => 'NAME_EXPR', value => 'IN(''xyz'')');
    dbms_datapump.set_parallel(handle => h1, degree => 1);
    dbms_datapump.add_file(handle => h1, filename => xyz.LOG', directory => 'DATA_PUMP_DIR', filetype => 3,reusefile=>1);
    dbms_datapump.add_file(handle => h1, filename => xyz%U.DMP', directory => 'DATA_PUMP_DIR', filesize => '100M', filetype => 1,reusefile=>1);



    dbms_datapump.set_parameter(handle => h1, name => 'INCLUDE_METADATA', value => 0);
    dbms_datapump.set_parameter(handle => h1, name => 'DATA_ACCESS_METHOD', value => 'AUTOMATIC');
    dbms_datapump.set_parameter(handle => h1, name => 'ESTIMATE', value => 'BLOCKS');
    dbms_datapump.start_job(handle => h1);



    dbms_datapump.detach(h1);

    END;


    My Qustion is now:
    Is there any way to get Information from the log files over jdbc?
    like a ResultSet or so.

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Is there any way to get Information from the log files over jdbc?
    NO!

    JDBC is Java's interface to the Database.
    Files now reside in/on OS filesystem so different interface is required to access these files.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  7. #7
    Join Date
    Feb 2013
    Posts
    10
    I understand that JDBC cant't read files in OS
    But in other export utilities there is a way to say that the messages shouldnt be save on server,they should be give back as a ResultSet (virtaul table).

    My second qustion is now ,how can i say to keep the master table after a success unload?
    Is this line the right way:

    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value=> 1);

    Its shouldnt work for me.

    If i can keep the master tabel i can write a query to get the export information.

  8. #8
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >But in other export utilities
    post URL to other utilities
    >there is a way to say that the messages shouldnt be save on server,
    What "messages"?
    >how can i say to keep the master table
    post URL to where "master table" is documented

    I am not a mind reader & don't understand what you think should exist.

    Can you provide specific example for the details you seek?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  9. #9
    Join Date
    Feb 2013
    Posts
    10
    The D2LUW exort utility has the option.
    IBM DB2 9.7 Information Center for Linux, UNIX, and Windows

    I mean the errors and succes messages that are by default stored in DATA_PUMP LOGFILE.
    In my example it was the xyz.LOG-file.

    I have no documentation to "master table"
    but in the internet its a lot information about it:
    The Master Table - Data Pump - Process Architecture

  10. #10
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    "The keep_master parameter can be set to Y to retain the Master Table at the end of a successful job for debugging purposes. "
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  11. #11
    Join Date
    Feb 2013
    Posts
    10

    ORA-39001: invalid argument value

    That is what me oracle gives back for:
    dbms_datapump.set_parameter(handle => h1, name => 'KEEP_MASTER', value=> 'y');

  12. #12
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Tom Kyte has a sample chapter of his book "Effective Oracle By Design" as a free download:

    http://asktom.oracle.com/pls/asktom/...28923702383570

    In there you'll find a stored procedure (see the section "TKPROF for the Masses") which will allow any user to download trace files from a server directory using SQL. I'm sure that can be adapted to allow downloading a dump file as well (although it might be tricky to deal with the blobs).
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •