Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Extract Speed from DB2


Extract Speed from DB2

Author
Message
Ross McMicken
Ross McMicken
Old Hand
Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)

Group: General Forum Members
Points: 388 Visits: 2195
Jeff Moden (4/29/2013)
I guess I'll ask a similar question on these thread. Is there any way to bulk export data from DB2 to a Tab delimited file? One of the "fixes" we made for previous large data/long haul problems (between like servers, though) was to do such an export and Fedex the table backup of the export. Compared to an 'over the line' transfer for the same amout of data, it was a lot faster.

I'd like to do the same thing locally but no one here (not even the AS400 guys) know how to export DB2 files (tables) to delimited files.


For an AS400, take a look at the CPYTOIMPF and CPYTOSTMF commands. They can copy to the integrated file system that's accessible from a PC. It's been a while since I used an AS400, but I was copying data to text and dbase files in 1996, and it was very fast. If the DB2 is the mainframe version, I have no clue as to how to export data.
dg227
dg227
SSC Veteran
SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)SSC Veteran (268 reputation)

Group: General Forum Members
Points: 268 Visits: 808
Another thing to consider, too, is do you have any sort of identifier or key in the DB2 source that could allow you to effectively break your source data into multiple sets/processes in your SSIS export package? If so, you could design your SSIS package(s) so that you can have multiple data flow tasks running concurrently, each with its own specific range of data to extract from the source, likely reducing the overall export time to your stage table.
David.Lester
David.Lester
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 492
Thanks dg.
Actually, this is connected to a large warehouse staging SSIS process, we are pulling roughly 50 tables from the db2 source, and it already uses concurrency. We still need to find a way to reduce the extract times beyond this.
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45022 Visits: 39887
Ross McMicken (5/1/2013)
Jeff Moden (4/29/2013)
I guess I'll ask a similar question on these thread. Is there any way to bulk export data from DB2 to a Tab delimited file? One of the "fixes" we made for previous large data/long haul problems (between like servers, though) was to do such an export and Fedex the table backup of the export. Compared to an 'over the line' transfer for the same amout of data, it was a lot faster.

I'd like to do the same thing locally but no one here (not even the AS400 guys) know how to export DB2 files (tables) to delimited files.


For an AS400, take a look at the CPYTOIMPF and CPYTOSTMF commands. They can copy to the integrated file system that's accessible from a PC. It's been a while since I used an AS400, but I was copying data to text and dbase files in 1996, and it was very fast. If the DB2 is the mainframe version, I have no clue as to how to export data.


Thanks, Ross. I'll check it out.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Ross McMicken
Ross McMicken
Old Hand
Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)

Group: General Forum Members
Points: 388 Visits: 2195
Jeff, you should also check to see if the AS400 you need to extract from has any third party query tools on it, or Query/400. Those generally have th eability to save data to the area that's accessible from other computers.
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45022 Visits: 39887
Ross McMicken (5/1/2013)
Jeff, you should also check to see if the AS400 you need to extract from has any third party query tools on it, or Query/400. Those generally have th eability to save data to the area that's accessible from other computers.


Thanks, Ross. I already checked with the AS400 guys and they said they used to have one but didn't see the utility in it so they got rid of it and never renewed the license. Crying Guess I'll have to hit Google a little harder and see if I can come up with a free tool because they don't want to spend any money on it even if it were to turn a memory sucking, CPU burning, network churning 4+ job into a 10 or 15 minute breath of fresh air. :-P

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
nick.mcdermaid
nick.mcdermaid
SSC Veteran
SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)

Group: General Forum Members
Points: 201 Visits: 766
In my past experience (admittedly with an old AS/400 version and a dysfunctional IT team), the only reliable way to get data out of an AS400 was to use one of the supplied AS/400 windows client tools to dump it down to a text file and then load the text file into SQL Server. This was quite some time ago - some technical aspects may have changed since then.
Ross McMicken
Ross McMicken
Old Hand
Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)Old Hand (388 reputation)

Group: General Forum Members
Points: 388 Visits: 2195
Jeff, the IBM documentation is very good. You can find it at http://publib.boulder.ibm.com/iseries/

The copy commands I mentioned earlier are built in to the AS400, and cna be scheduled if your AS400 guys write a short CL program to extract the data you want. CL is just a batch file with commands in it.

You can also ftp data, but there's no translation of the IBM packed decimal format of numbers into something that is usable in SQL server. It's not hard to write a translator for that, and ftp is very fast.

I feel your pain on losing tools. I had a senior IT manager ask me why anyone would want to get data out of the system. "If they need data, they should have a report written". He had no clue as to how the system was used, he jsut wanted to cut costs, no matter the impact.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search