Execute DTS from Query Analyzer

  • My package name is "ImportExcelFile".  Would anyone have the code to execute this from within Query Analyzer?  I have searched all over but everyone seems to be missing pieces that even collectively do not make much sense to me.

    I appreciate the help!

  • Declare @sql varchar (1000)

    Select @sql = 'DTSRun /E /S ' + @@Servername + ' /N ImportExcelFile'

    Exec master..xp_cmdshell @sql

     

  • Upon running the query, the following results are generated:

    DTSRun: Loading...

    Error: -2147008507 (80074005); Provider Error: 0 (0)

    Error string: Unspecified error

    Error source: Microsoft Data Transformation Services (DTS) Package

    Help file: sqldts.hlp

    Help context: 713

    Error: -2147467259 (80004005); Provider Error: 17 (11)

    Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    Error source: Microsoft OLE DB Provider for SQL Server

    Help file:

    Help context: 0

    I am in fact logged in to the server as 'sa'. Any clues to why this is happening? If I run the DTS directly, it runs and finishes perfectly.

    Thanks for your help, it's much appreciated!

  • I realized what was going wrong and it is now working fine. Thanks for the help!

Viewing 4 posts - 1 through 3 (of 3 total)

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