Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Posts
    45

    Unanswered: executing a DTS package from within a stored proc.

    How do you execute a DTS package from within a stored proc?
    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!

  2. #2
    Join Date
    Jan 2003
    Posts
    26
    create proc newprocedurename as
    exec xp_cmdshell "DTSRun /S servername /U username /P password /N packagename"

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    True and follow information from books online using DTSRUN utility.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  4. #4
    Join Date
    Jul 2003
    Posts
    45
    What if I havent got a username /password assigned to the DB?
    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!

  5. #5
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Executewith SA privilege or any other account that has DB access.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  6. #6
    Join Date
    Jul 2003
    Posts
    45
    Still no joy...this is what im typing......

    execute xp_cmdshell "DTSRun /S sqlserver /U username /P password /N test_dts1"

    sql server is the name of the server, test_dts1 the name of the package.

    Anything im doing wrong????
    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
  •