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 + stored procedure fails!

Author  Topic 

Mariory
Starting Member

5 Posts

Posted - 2005-10-21 : 10:11:51
Hey guys, I hope you can help me out here. I have a DTS package which uploads a foxpro table (from a remote pc on the network) using an OLEDB Driver to SQL Server. The Package works without problems when run from Enterprise Manager.

However, when I try to run the package from QA using a stored procedure, it fails. I suspected this was a permissions issue and when I checked the even log I saw that in this situation, the DTS is executed by the SYSTEM rather than by the domain user.

I know that local system accounts cannot be authenticated outside of the local machine and so have no access to network shares. This is probably the reason it fails.
When I run the DTS from Enterprise Manager, the event log shows that it has been executed by the domain user and so it works.

How can I run the DTS from a stored procedure in such a way that it is executed by the domain user rather than by the SYSTEM account?

Edit: I am using a OLE stored procedure (COM Object) rather than the xp_cmdshell and dtsrun utility.

karuna
Aged Yak Warrior

582 Posts

Posted - 2005-10-21 : 11:00:15
See if this helps

http://www.databasejournal.com/features/mssql/article.php/10894_1459181_1

Thanks

Karunakaran
Go to Top of Page

Mariory
Starting Member

5 Posts

Posted - 2005-10-21 : 12:47:35
I know of the site. Got a few code samples off it too. Problem is, I don't know how to get the DTS to run under a domain account from a T-SQL execution.

Is this to do with the startup service account SQL Server uses?
Go to Top of Page

thebruins
Starting Member

31 Posts

Posted - 2005-10-24 : 05:30:29
I think so. Maybe it would be a good idea to create a user account especially for MSSQL to run under? Then you could also authenticate MSSQL to access remote computers as that user
Go to Top of Page

Mariory
Starting Member

5 Posts

Posted - 2005-10-25 : 05:49:17
Update: Switched the service account to a Global domain user. DTS packages now run without errors. Thanks for the help guys.
Go to Top of Page
   

- Advertisement -