If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Backup db2 data on a cd? or csv files?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-12-09, 12:12
db2user db2user is offline
Registered User
 
Join Date: Dec 2002
Posts: 123
Backup db2 data on a cd? or csv files?

Hi,

We have a client that wants a copy of their data in cd/file form.. does anyone here have any experience backing up data this way? We have DB2 UDB V 8.2 and have nightly online backups of the database as well. Of course, just burning a copy of a file like DBASE.0.db2inst1.NODE0000.CATN0000.20090918050002. 001 won't be useful to the customer... any help/thoughts on this will be appreciated!
Reply With Quote
  #2 (permalink)  
Old 10-12-09, 12:17
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
If they don't have DB2 then they will probably want delimited files. Check with them to determine which delimiter is preferred.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 10-12-09, 12:35
db2user db2user is offline
Registered User
 
Join Date: Dec 2002
Posts: 123
Thanks for the reply.. yes, they don't have db2 so it will probably have to be some other file format. They have quite a bit of data actually..what's the quickest/easiest way to export data to files.. not sure if the export command is the way to go.. since there really is a lot of data..
Reply With Quote
  #4 (permalink)  
Old 10-12-09, 12:39
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by db2user
Thanks for the reply.. yes, they don't have db2 so it will probably have to be some other file format. They have quite a bit of data actually..what's the quickest/easiest way to export data to files.. not sure if the export command is the way to go.. since there really is a lot of data..
You will have to use export command one table at a time. If you have lob data (clob, blob, etc), that will complicate things, but otherwise should not be a problem. Once you do the export, then you will want to zip the files. You can fit some pretty big files on a DVD-Data disc.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #5 (permalink)  
Old 10-12-09, 12:56
db2user db2user is offline
Registered User
 
Join Date: Dec 2002
Posts: 123
no, we don't have any blob, clob data so it should be ok.. my only concern is the time it will take to export the data.. is the export command efficient for big db tables? is there another method/command that will make the process go faster? thanks so much for the replies!
Reply With Quote
  #6 (permalink)  
Old 10-12-09, 13:36
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
First off. What will they do with this data once you give it to them? based on that you will have a better understanding on your options.

What is that size of your db? db2 "call get_dbsize_info(?,?,?,0)"

Are you required to provide them a copy from every backup i.e. daily?
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #7 (permalink)  
Old 10-12-09, 13:55
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Quote:
Originally Posted by db2user
no, we don't have any blob, clob data so it should be ok.. my only concern is the time it will take to export the data.. is the export command efficient for big db tables? is there another method/command that will make the process go faster? thanks so much for the replies!
No, there is not another method if they do not have DB2. However, I would put WITH UR at the end of the select statements in the EXPORT command.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #8 (permalink)  
Old 10-12-09, 14:45
db2user db2user is offline
Registered User
 
Join Date: Dec 2002
Posts: 123
Quote:
Originally Posted by Cougar8000
First off. What will they do with this data once you give it to them? based on that you will have a better understanding on your options.

What is that size of your db? db2 "call get_dbsize_info(?,?,?,0)"

Are you required to provide them a copy from every backup i.e. daily?
Hi,

Thanks for the response...it's basically for a customer that wants their historical load from the past 4-5 years.. my company has lost the client and they won't have access to our system soon. They still want the data given to them in some form or another since it really does belong to them. It's a little complicated since our database holds data for other clients too..so it's not holding data just for this specific customer. Our db size is currently around 61GB although I plan to remove some old data that's just been 'lying' around in tables for a while.. so hopefully it'll be atleast 5GB smaller I hope..

1) If I go with the export route, then I will have to use select statements where the data that's exported is specific only to the customer. Am not sure if it's the optimal way since it's not just a simple dump of the whole db, but rather a subset of it based on an id. And we're talking about a lot of data.

2) The other way to give them access to their data is to have them pay a small fee for monthly hosting and they can login to our base web application to see all the historical data. This is relatively painless since all we have to do is give them user access to a web based application and eliminates the need to export data to files/cd, etc...

in any case, it will be nice to know the optimal way to export data to a cd/files in this scenario.. so basically I'm asking, what would you do?

Last edited by db2user; 10-12-09 at 14:50.
Reply With Quote
  #9 (permalink)  
Old 10-12-09, 15:25
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
As Marcus has pointed out. There is only one way to get data out. What puzzles me is it sounds like you are just a regular schmo, just like the rest of us , but have to make a decision on how you will provide this data to a client that your company lost. It has been a while since I was in this situation. Client always specified what format we should provide data in. Most likely, they will have you deal with whom ever they are using instead of you. And those people will dictate the file layout.

Don't forget that you probably would have to include some kind of dictionary for them as well.

Most of the time one db would hold multiple client data. Nothing is wrong with it as long as security is done right. You would have to make sure that you pull ONLY this client data.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #10 (permalink)  
Old 10-12-09, 15:52
db2user db2user is offline
Registered User
 
Join Date: Dec 2002
Posts: 123
Thanks.. well, I'm supposed to talk to the client this week to get an idea of the format they want the data in.. I just wanted to know what options I can give them and it doesn't seem like they are planning to use another system.. so the data won't be 'moved' to a new app either.. they just want to keep it for historical purposes, that's all. In any case, thanks for the help guys!
Reply With Quote
  #11 (permalink)  
Old 10-12-09, 16:00
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
Just make sure that before you are exporting the data, delimiter that you will be using should not be part of the data. And then provide them what delimiter you have used to extract data.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
  #12 (permalink)  
Old 10-12-09, 16:11
db2user db2user is offline
Registered User
 
Join Date: Dec 2002
Posts: 123
cool, thanks for the tip!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On