Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to go from DBF files to SQL Server 2008?

I have an application that uses DBF files and I need to import them to SQL Server 2008. However, I also need to modify some of the data along the way and some columns will be added to tables while others will be deprecated.

So far I'm using DBF -> Access -> MS Migration Assistant -> SQL Server 2008. But I think that there has to be a better way to handle it. I'd like to get away from the Migration Assistant because it doesn't let you modify the data when you import it.

like image 815
Unknown Coder Avatar asked Jun 25 '10 16:06

Unknown Coder


2 Answers

I was able to import DBF into SQL Server 2008 by using the information at this link.

In particular I:

  1. Used Import/Export wizard, selecting the "Microsoft Office 12.0 Access Database Engine OLE DB Pro..." as the Data source in the dropdown.
  2. Opened the Properties dialog for the Access OLE DB connection.
  3. Specified the folder containg the DBFs as the Data Source.
  4. Set Extended Properties to "dBASE 5.0"

I then set destination as my local sql server and upon hitting next was able to see each DBF file in the folder as a possible table/view to import from. Clicking on them created the similarly named table in the specified database.

like image 115
mindless.panda Avatar answered Sep 25 '22 11:09

mindless.panda


It seems you're out of luck :-(

See this note:

Note: In SQL Server 2005, the SQL Server Import and Export Wizard does not support importing from or exporting to dBASE or other DBF files. To import DBF files, first use Microsoft Access or Microsoft Excel to import the data from DBF files into an Access database or Excel spreadsheets. Then, use the SQL Server Import and Export Wizard to import the Access database or Excel spreadsheets that contain the data from the DBF files.

Microsoft SQL Server 2005 Books Online, Choose a Data Source (Import and Export Wizard)

But maybe this other Stackoverflow question can be of help??

How to import a DBF file in SQL Server

Or check out some commercial and/or shareware tools for the job

  • EMS Data Import for SQL Server
  • DBF to SQL Converter seems to convert DBF file content into SQL scripts
  • Full Convert Enterprise
like image 23
marc_s Avatar answered Sep 22 '22 11:09

marc_s