Results 1 to 5 of 5

Thread: Parallel Export

  1. #1
    Join Date
    Nov 2007
    Posts
    38

    Unanswered: Parallel Export

    Hi,

    I am trying to do parallel export for a table in partitioned database

    Using DB2 V9.7.8


    Command:

    db2_all "\"|| db2 connect to bherdb ;db2 \"export to /db/Export/NODE##/TXN_RECORD.del of del modified by timestampformat="YYYY-MM-DD HH.MM.SS.UUUUUU" select * from DBBLST01.TXN_RECORD where DBPARTITIONNUM (AP_RQ_MSG_DATE_ID)=##\""

    SQL3192N In the filetmod a user specified format "TIMESTAMPFORMAT" beginning with the string "YYYY-MM-DD" is not valid.
    db2 connect to bherdb completed rc=4

    Without timestamp clause it works fine, the data is getting exported.

    db2_all "\"|| db2 connect to bherdb ;db2 \"export to /db/Export/NODE##/TXN_RECORD.del of del modified by select * from DBBLST01.TXN_RECORD where DBPARTITIONNUM (AP_RQ_MSG_DATE_ID)=##\""

    If single threaded export then also it works fine provided I use a backslash before the format.

    db2 "export to /db/backup/BHERDB/Export/TXN_RECORD.del of del modified by coldel0xc7 datesiso striplzeros nochardel timestampformat=\"YYYY-MM-DD HH.MM.SS.UUUUUU" select * from DBBLST01.TXN_RECORD"


    Thank you all in advance.

  2. #2
    Join Date
    May 2005
    Posts
    29
    Probably stupid question, Did you try escaping in the very first command.

    Does your parallel export really work without the timestamp format?

    You are using db2_all which will end-up executing on all the nodes. Not just the node you want.

    You might want to specify the nodenumber in the db2_all like the example below to execute it just from that node

    db2_all "<<+11<db2 connect to testdb; db2 export to /backup/test_table.del.11 of del select * from test_table where nodenumber(ID) = 11; db2 terminate"

  3. #3
    Join Date
    Nov 2007
    Posts
    38
    Yes it does work without the timestamp clause. it generates files exporting data from all nodes at once. I want to export from all nodes and hence I used db2_all

    Effectively use DB2 data movement utilities in a data warehouse environment

  4. #4
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    try this:
    Code:
    db2_all "\"|| db2 connect to bherdb ;db2 'export to /db/Export/NODE##/TXN_RECORD.del of del modified by timestampformat=\"YYYY-MM-DD HH.MM.SS.UUUUUU\" select * from DBBLST01.TXN_RECORD where DBPARTITIONNUM (AP_RQ_MSG_DATE_ID)=##'"
    and it's better to add the following to the end of the command:
    Code:
    ; db2 connect reset; db2 terminate
    Regards,
    Mark.

  5. #5
    Join Date
    Nov 2007
    Posts
    38
    Hi Mark,

    Thank you that worked and I did add your recommendation at the end.

Posting Permissions

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