SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Import .dbf files in sql server 2005


Import .dbf files in sql server 2005

Author
Message
bladerunner148
bladerunner148
SSC-Enthusiastic
SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)

Group: General Forum Members
Points: 136 Visits: 303
Hi there,

I have a .dbf file which i want to import in sql server 2005. When I right click on the database and click Import, I don't know what Data Source I should be using. Is it even possible to import .dbf files?

Thanks
Greg Charles
Greg Charles
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5691 Visits: 5932
Choose a data source based on what created the .dbf file (dbase, Foxpro,?). If you can't find one in the list, you might be able to find an ODBC driver for the source or you might have to save the data from the source dbms to a flat file that you can import to SQL Server.

Greg
bladerunner148
bladerunner148
SSC-Enthusiastic
SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)SSC-Enthusiastic (136 reputation)

Group: General Forum Members
Points: 136 Visits: 303
I didn't get it when you said i can change the dbf to a flat file. Could you please specify what do you mean when you said change that to a flat file? What extension will that be?
Thanks!
Phil Parkin
Phil Parkin
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19241 Visits: 20461
If you do not know what created the DBF files, try using the built-in DBase driver.

If that does not work, try using FoxPro. As Greg said, you might have to download a driver for this.

Phil

BTW a flat file is just a text file - eg a CSV file.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Dhans
Dhans
SSC-Enthusiastic
SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)

Group: General Forum Members
Points: 175 Visits: 253
Instead of using Import/Export wizard, You can import DBF files using SSIS Packages.
Steps:
1. Create an SSIS Package using BIDS.
2. In the Connection Managers
Right Click --> Create OLE DB Connection-->New--> In the Provider column, Select Microsoft Jet 4.0 OLE DB Provider--> Type the DBF file location in Database file name column.
for eg: C:\SSIS\DBFFiles\ (DO NOT TYPE THE DBF FILE NAME)
3. Press ALL button in left side --> Advanced-->Extended Properties Type : dbase 5.0 Press OK.
4. Now the Connection is created.
5. Create Destination SQL Server connection for storing the dbf data.
5. Drag the Data Flow task
6. In Data flow task, Drag OLE DB Source and OLEDB Destination tasks
7. In Ole Db Source, select the connection manager as newly created Dbase Connection.
8. Select your DBF File in Name of the table or View.
9. Connect OLE DB Source and OLE DB Destination and Map the Source and Destination Columns.
10. Run the Package..... thats all..
amacwan
amacwan
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 44
Hi,

Thanks for the posting. I am trying to import .DBF files into sql server 2005 using the same method. Can I also import .DBF files from access database where these .DBF files are linked?
I used the above method and using folders containing .DBF files. Connection is not set up, i m getting errors "...could not find installable ISAM"...please advise.


Thanks
Ashish
Jay_Noob
Jay_Noob
SSC-Enthusiastic
SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)

Group: General Forum Members
Points: 137 Visits: 236
I just wanted to throw out an FYI that tripped me up with something similar to this. We are running 64 bit servers and there is no 64 bit FoxPro driver. To run the package on a 64 bit server from BIDS I had to go to Project (menu bar) -> "project name" Properties -> Debugging and select False for the "Run64BitRuntime" option.
info-658497
info-658497
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 50
Hi Dhans, Thanks for the helpful post.

Is it possible to link my SQL table to the DBF file? My data is captured at the backend by a 3rd party app. I need to link to the app's files, and build the frontend from there.

Thanks again



Dhans (11/17/2008)
Instead of using Import/Export wizard, You can import DBF files using SSIS Packages.
Steps:
1. Create an SSIS Package using BIDS.
2. In the Connection Managers
Right Click --> Create OLE DB Connection-->New--> In the Provider column, Select Microsoft Jet 4.0 OLE DB Provider--> Type the DBF file location in Database file name column.
for eg: C:\SSIS\DBFFiles\ (DO NOT TYPE THE DBF FILE NAME)
3. Press ALL button in left side --> Advanced-->Extended Properties Type : dbase 5.0 Press OK.
4. Now the Connection is created.
5. Create Destination SQL Server connection for storing the dbf data.
5. Drag the Data Flow task
6. In Data flow task, Drag OLE DB Source and OLEDB Destination tasks
7. In Ole Db Source, select the connection manager as newly created Dbase Connection.
8. Select your DBF File in Name of the table or View.
9. Connect OLE DB Source and OLE DB Destination and Map the Source and Destination Columns.
10. Run the Package..... thats all..

Dhans
Dhans
SSC-Enthusiastic
SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)SSC-Enthusiastic (175 reputation)

Group: General Forum Members
Points: 175 Visits: 253
I am sorry, I have no Idea of linking SQL Table to DBF file.

DhansUnsure
Jay_Noob
Jay_Noob
SSC-Enthusiastic
SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)

Group: General Forum Members
Points: 137 Visits: 236
I've never done this, but you might be able to use OPENROWSET() to select from your DBF file and stick that in a view.
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