SQL Server Performance

from SP

Discussion in 'SQL Server DTS-Related Questions' started by Reddy, Oct 13, 2006.

  1. Reddy New Member

    How can I run a DTS pkg from a SP? Does any one has code for that?

    Thanks!
    "He laughs best who laughs last"

  2. satya Moderator

    Have you ever heard of DTSRUN utility, BOL is your BF.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided AS IS with no rights for the sake of knowledge sharing.
  3. ranjitjain New Member

    quote:Originally posted by Reddy

    How can I run a DTS pkg from a SP? Does any one has code for that?

    Thanks!
    "He laughs best who laughs last"

    declare @cmd nvarchar(1000)

    set @cmd=
    'dtsrun /S'+@@servername+' /Ndtspackagename /EMicrosoft OLE DB Provider for SQL Server'
    exec master..xp[underscore]cmdshell @cmd, no_output

Share This Page