Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Posts
    8

    Question Unanswered: How to execute DTS package from TRIGGER

    I would like to export the data from a column into textfile everytime there's a new record inserted into the table so I have a trigger FOR INSERT.

    How do I execute DTS package from a TRIGGER? Is this possible?

    Your help is very much appreciated.

    Thanks!

  2. #2
    Join Date
    Jul 2003
    Posts
    45

    Re: How to execute DTS package from TRIGGER

    I beleive its the following:

    EXEC master..xp_cmdshell 'dtsrun /S servername /U username /P password /N DTSpackagename '

    If you dont have a username/password just use

    EXEC master..xp_cmdshell 'dtsrun /S servername /E /N DTSpackagename '

    It works in SPROC's, not sure about triggers though but it should be the same concept........
    If riding in a plane is flying, then riding in a boat must be swimming. To experience the element, get out of the vehicle. Skydive!

  3. #3
    Join Date
    Feb 2003
    Posts
    8

    Thumbs up Re: How to execute DTS package from TRIGGER

    Thanks Achowe!

    Originally posted by achowe
    I beleive its the following:

    EXEC master..xp_cmdshell 'dtsrun /S servername /U username /P password /N DTSpackagename '

    If you dont have a username/password just use

    EXEC master..xp_cmdshell 'dtsrun /S servername /E /N DTSpackagename '

    It works in SPROC's, not sure about triggers though but it should be the same concept........

  4. #4
    Join Date
    Jul 2003
    Posts
    45

    Re: How to execute DTS package from TRIGGER

    did it work mate?
    If riding in a plane is flying, then riding in a boat must be swimming. To experience the element, get out of the vehicle. Skydive!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •