• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Python script for to make a copy of DB2 database to MS Access format.

 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a DB2 database and I need to make a weekly copy of that in MS Access database format. Is there any way or is there any library. I have heard python is very fast and easy to use language so I thought may be there is some option available?
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Python has a Database API and has a DB2 driver. I'm not sure about Access. Is CSV an option or perhaps ODBC?
 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote: Is CSV an option or perhaps ODBC?


Not really. We actually wanted to give this backup to some of the users who can do ad hoc reporting using access database. Is there any other simple but fast way to do this?
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would put money on Access being able to open CSV files which you could save as an Access file. The ODBC link above specifically mentions Access.
I've had good results using Microsoft Data Transformation Services (now SQL Server Integration Services) to do database export/import. That would probably be the simplest method.
 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe. I have decided to export csv from db2 and then import it in access. Just one more question is python better for exporting data than java?
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Define "better". Both languages have features for getting data out of a database and putting data in a file, so from a feature standpoint, they're pretty much even. Personally, I tend to use Python as a scripting language, automating repetitive tasks and I use Java for more enterprise level tasks like fully featured applications. This is not to say Python can't be used to make fully featured applications, it's just that I tend to use Java for that task.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic