Permission Denied DTS Package Run From ASP-SProc App

  • Hello All.

    I want to run a DTS package from an ASP.NET page that runs a stored procedure.

    I created the simple sproc below to test it.

    CREATE PROCEDURE [dbo].[ExecuteTestDTS]

    as

    EXEC master..xp_cmdshell 'dtsrun /SSERVERxxx /NTestDTSsproc /E /LxxxLog'

    GO

    The TestDTSsproc package does a SELECT * INTO X-tmp FROM X that creates a copy of table X.

    I have run the package from the DTS service and it runs successfully.

    I have run it from Query Analyzer and it runs successfully.

    When I run it from the ASPX page I get the following error:

    System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'xp_cmdshell', database 'master', owner 'dbo'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

    It seems I may not have enough permission as a /E and a remote IUSER_SERVERxxx to run the package.

    Should I use the /U /P parameters and specify the sa user-id?

    Or is there something else I am missing?

    Thanks in advance for your help.

  • This has nothing to do with your DTS Package.  This is a SQL error stating that you do not have permission to execute xp_cmdshell.  Doesn't matter that you are trying to execute DTSRUN, it's not getting that far.

    -Mike

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply