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.
Author |
Topic |
bjbjbj
Starting Member
3 Posts |
Posted - 2006-05-25 : 19:49:51
|
I've been trying to figure out how to do the following task for about 1/2 a day now. I have a text file that is downloaded from our inventory mainframe system to our web server. Anyone can browse the file at the moment as the root of our hosted web server has public access (I'll change its location for security when i have it working)http://209.200.116.72/products_brett.txtI want to schedule a DTS package to insert the contents into my SQL database table. I walk through the import wizard to start setting up the process and I select "text file" as the datsource. Then for filename i select\\209.200.116.72\products_brett.txtRegardless of what UNC path i put in, the connection fails. I get the following error "Could not open file for reading. Close any other application that may be locking the file"I have tried the following paths\\209.200.116.72//209.200.116.72/products_brett.txtAm I going about this the wrong way? Should I be using some other datasource?I posted this on another forum and i was advised that it could be a sharing problem on the web server. I find this weird as my root folder on my web server has read access for everyone. As i mentioned, you can view the contents of the file through any browser. Im confident the insert will be ok its just this initial connection to the remote file.Any help appreciated. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-05-25 : 19:56:25
|
\\209.200.116.72\products_brett.txt is not a valid UNC path. A valid UNC path looks like this:\\<ServerName>\ShareName\...\\IPAddress\ShareName\...So you need to setup a share and grant permissions on that share. Typically, you'll create the share on the folder where this file exists. Let us know if you don't know how to setup a share. Can the database server or your client (depending on where you are developing the DTS package) even get to \\209.299.116.72 and browse the admin shares(c$, admin$)?Tara Kizeraka tduggan |
 |
|
bjbjbj
Starting Member
3 Posts |
Posted - 2006-05-25 : 20:18:53
|
mmmmm thanks for the tip i will try this.the file is being downlaoded to my hosted web server. Through their admin interface i can set the file permissions to each and every folder but as for shares i dont think i can set them up.they use a IIs server. Is this going to restrict me from connecting to the text file?I can connect to the file via the ftp connect task however it asks me what directory i want the file to be copied to. I want the dts package to run on the sql server and simply to open the file and import it into a database table. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-05-26 : 11:48:53
|
So this web server isn't something that you can directly connect to such as with Terminal Services, map a drive, etc...? If not, then you won't be able to to access the file even via a UNC path. When using FTP, you have to download it to somewhere, so yes you'll need to tell it where on the database server to place it. You would then have another task do the import.Tara Kizeraka tduggan |
 |
|
|
|
|