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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Can not execute DTS from query analyzer
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

192 Posts

Posted - 10/05/2006 :  16:40:32  Show Profile  Reply with Quote
hi When I execute the following script from the command prompt


myDTS package executes correctly

whereas if I execute

EXEC master..xp_cmdshell 'DTSRun /S CIERPSRVSQL00 /E /N myDTS'

the error is the follwoing

Error string: The Microsoft Jet database engine cannot open the file '\\myServer\myShare\myPath\myAccessDatabase.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
I want to wrap the DTS call within a stored proc so that the execution can be controlled via a web page.

Thenks for the help

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 10/05/2006 :  16:49:58  Show Profile  Reply with Quote
More than likely, the SQL Server service or proxy account does not have access to that share, directory, or file.

Go to Top of Page

Posting Yak Master

192 Posts

Posted - 10/05/2006 :  18:19:04  Show Profile  Reply with Quote
thanks MVJ,

I have tried adding the users:
sql service and sql reporting service as well as sql admins and sql users and give read permissions in the Access file I want sql server to read but the error is the same, do you know how can I get hold of the user name of the sql process trying to read the Access file?

thank you
Go to Top of Page

Almighty SQL Goddess

38200 Posts

Posted - 10/05/2006 :  18:37:26  Show Profile  Visit tkizer's Homepage  Reply with Quote
The account that needs the access is the one that is being used for the SQL service. It not only needs access to the mdb file but also to the share.

Tara Kizer
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000