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
 Import/Export (DTS) and Replication (2000)
 DTS Package Permissions Error

Author  Topic 

bama0906
Starting Member

5 Posts

Posted - 2008-01-28 : 17:41:50
I've got a permissions error that is driving me nuts, and would appreciate any suggestions.

I have a web application (.NET Framework 1.1) running on a server (Server 2003) that has a page that exports data to a text file. It does this by calling a stored procedure on a database server (SQL Sever 2000) which then executes a DTS package located on the same database server. This DTS package creates the file and tries to write it to the web server.

The problem is that the DTS package is trying to write the file to a location on the webserver and is not able to. The stored procedure generates this command:

'DTSRun /S servername /U user /P password /N DTS_Package_Name /A fileName:8=\\webserver\share\upload\filename.txt /A exportUser:8=userid'

When I run this DTS command manually in SQL Query Analyzer on the database server, I get the following error:

DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
Error string: Error opening datafile: Access is denied.

Just for fun, I commented out the DTS package call in the stored procedure call. Now I get the same error, but on the web page instead. This error is:

Access to the path "\\server\share\upload\filename" is denied.

I'm fairly certain that the problem is that an account doesn't have permission to write to the folder on the web server. However, which account(s) needs permission? I've tried giving write permission to all of the following with no luck:

WEBSERVER\ASPNET
WEBSERVER\IIS_WPG
WEBSERVER\IUSR_WEBSERVER
WEBSERVER\Everyone


Thanks in advance for any help.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-01-28 : 21:17:02
Dup post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=96330
Go to Top of Page
   

- Advertisement -