Link to home
Start Free TrialLog in
Avatar of vicksjaipur
vicksjaipur

asked on

IMPORTING DATA INTO SQL FROM DBF

I want to import data from a dbf file into sql server. SQl server in remote and reside on web and dbf fiel also reside on the same web server on which sql server reside.
I want to make some kind of store proc or dts package so that i can call that sp from my local machine and all task will be performed on the server itself.
Avatar of MikeWalsh
MikeWalsh
Flag of United States of America image

You can create a DTS package to do your import. Save the package to the server. Then you can execute it using the DTSRUN utility. I am not sure, however, if the DTSRUN utility. You could call this through using xp_cmdshell in Query Analyzer. If you do it that way when you are connected to the server in QA, you will be executing everything on the server. Look up dtsrun utility in Books On Line.
Avatar of vicksjaipur
vicksjaipur

ASKER

dts package accept source file from the local computer and not from remote computer.
Secondaly how can i export dts package from my local sql server to remote sql because i am unable to access remote sql entriprise manager due to slow speed. Calling dts from xp_cmd shell is no problem
What do you mean by your first question?

You can export the package by saving it as a structured storage file, and then you can load it onto the Remote server by right clicking on the Data Transformations tree in Enterprise Manager and select open package and browse to the .dts file. Or if the servers can "talk" to each other through the network you should be able to save your package to that server. YOu might then need to make a few changes such as file paths if you were using mapped drives.
You can use DTS to read files from remote computers by using UNC or creating a linked server and using OPENROWSET to get the data.

If you can connect to the remote server with EM (even if it's slow), you can run the DTS package against the remote server--just up your timeout to compensate for the slow line.

Brett
I've worked with Fox Pro for awhile and found it to be difficult at times for importing and exporting data. A process that I use is to create a exe that gets the data required and then builds a table and but's it into a format that SQL Server will have no problems with. Then in that same exe have it run a dts package in SQL Server that will import the data. Microsoft covers this topic. here is the link http://support.microsoft.com/search/preview.aspx?scid=kb;en-us;Q247356
Hopes this helps
My current job often requires me to import DBF data (foxPro and various Dbase versions) and I have not had any major difficulties using DTS. We primarily use SQL Server 2000, however.
Ya, I've not had any problems with DBF/Foxpro either.....
Still my problem is not solved. Data which i have to import in sql server is located on one of the ftp site. Now how to import that data in sql server without downloading that data
ASKER CERTIFIED SOLUTION
Avatar of arbert
arbert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
vicksjaipur:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.