Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Bulk Insert of Remote Files

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-06 : 09:32:47
SQL Guy writes "I need to bulk insert a hugh text file into SQL Server. The SQL Server is located on a machine other than the machine which houses the text file. They are not on the same domain. They have no shared drive. The machine that houses the text file does serve web pages, so the text page is available via a simple http://www.mydomain.com/text.txt

Is there a way to bulk insert that file into the remote SQL Server machine?

I have thought about doing this as one method:
I am using java on the machine that houses the text file. I could write a java program to call a stored procedure on the remote SQL Server box and pass the entire contents of the file as a string to the stored procedure. That stored procedure would write the contents of that string to a file via the xp_cmdshell stored procedure. Now that file exists on the remote SQL Server and now I can call bulk insert on that file.
Does that seem feasible? How big of a string can a stored procedure accept?

Any other ideas? Like does DTS support remote files?"
   

- Advertisement -