October 25, 2005 at 12:36 pm
I have a .csv file that dumpped from UNIX LDAP server. I tried to import it to SQL but could not implement that. When I create DTS package, it ask me for DSN source. But when I create a DSN, .csv file is not an option and gray out for the file name. I need a help on how to import .csv file to SQL DB. Thanks.
October 25, 2005 at 12:54 pm
Is the .csv file located on the UNIX box after it is dumped? If so, you will need to ftp the file to the local host or a Windows server with a share then create a source file step to load the file into the DTS job.
October 25, 2005 at 12:55 pm
Use DTS. When creating a DSN use MS Excel for your provider. It handles csv files nicely.
A.J.
DBA with an attitude
October 25, 2005 at 1:09 pm
Only if you can get to the file from windows. Is the file on windows or UNIX?
October 25, 2005 at 2:15 pm
I got the .csv file from UNIX through ftp. I also tried to use MS Excel for the provider on DSN, it could not accept the format.
October 25, 2005 at 2:18 pm
Is it a valid .csv file? Have you opened it with a text editor or excel after you ftped it? try using a regular text file step and define it as an .csv file in the step.
October 25, 2005 at 2:34 pm
It works fine with the regular text format on DTS. After rename to .csv file, it won't work.
How to import binary file(got from UNIX through ftp) to SQL table, which provider should be?
October 25, 2005 at 2:45 pm
Are you saying the text file step does not work after you change the extension?
October 25, 2005 at 3:00 pm
It all works now. It was my mistake on the DSN creation. BTW, can FTP task be used to connect to UNIX servers on DTS? If so, what is the Directory Path should be on the bottom of FTP window?
October 26, 2005 at 7:22 am
Yes, it can be used to connect to an FTP server on UNIX. I believe you are talking about the destination path ,which has nothing to do with the FTP server.
October 26, 2005 at 7:27 am
Why DTS? Overkill for this.
It's a simple CSV to just parse each row commas
Just use BULK INSERT off an UNC path which solves any issues about ftp and file location, as long as righst are there.
Unless I'm missing something... but K.I.S.S., no?
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply