Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Creating and executing DTS package

Creating and executing DTS package

Scheduled Pinned Locked Moved ASP.NET
helpdatabasecsharpsql-serversysadmin
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AumSingh
    wrote on last edited by
    #1

    Hello everyone, I have got stuck in a big mess. The situation demands creation of a DTS package based on a query in SQL server and then execute it to produce the output in a text file. My problem is that I am completely new to this DTS stuff, so can anyone please help..?? Here is the exact thing I want to do :- 1. Create a DTS package based on a query. 2. Execute the package using .NET. 3. On the completion of the DTS package execution, send a mail stating the success or failure of the DTS package execution. The mail should be .NET generated. Below are the things which I have tried to do on my own and my queries regarding the same :- 1. I have generated a package for a particular query, using SQL enterprise manager but dont know how to pass parameters to the package when executing it. 2. Is there any way to make the above package creation dynamic? I mean can we create a DTS package using .NET?

    A 1 Reply Last reply
    0
    • A AumSingh

      Hello everyone, I have got stuck in a big mess. The situation demands creation of a DTS package based on a query in SQL server and then execute it to produce the output in a text file. My problem is that I am completely new to this DTS stuff, so can anyone please help..?? Here is the exact thing I want to do :- 1. Create a DTS package based on a query. 2. Execute the package using .NET. 3. On the completion of the DTS package execution, send a mail stating the success or failure of the DTS package execution. The mail should be .NET generated. Below are the things which I have tried to do on my own and my queries regarding the same :- 1. I have generated a package for a particular query, using SQL enterprise manager but dont know how to pass parameters to the package when executing it. 2. Is there any way to make the above package creation dynamic? I mean can we create a DTS package using .NET?

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      If yuo are running in code already why do you need to make a DTS package? These are normally called from a scheduler or filewatcher to load/extract data. If you are in control of the situation (as it appears from your post) then why not just execute the query directly? However, it is possible to dynamically modofy DTS packages by using VBA code to modify job steps. I am not sure if you could create a new package directly from code, but I suspect you could as they are just database objects. BTW, do you mean DTS packages or are you using VS2005, where you use SSIS as this is a whole different kettle of fish

      Bob Ashfield Consultants Ltd

      A 1 Reply Last reply
      0
      • A Ashfield

        If yuo are running in code already why do you need to make a DTS package? These are normally called from a scheduler or filewatcher to load/extract data. If you are in control of the situation (as it appears from your post) then why not just execute the query directly? However, it is possible to dynamically modofy DTS packages by using VBA code to modify job steps. I am not sure if you could create a new package directly from code, but I suspect you could as they are just database objects. BTW, do you mean DTS packages or are you using VS2005, where you use SSIS as this is a whole different kettle of fish

        Bob Ashfield Consultants Ltd

        A Offline
        A Offline
        AumSingh
        wrote on last edited by
        #3

        Thanks for the reply Bob, Yes I am talking about the DTS packages and not about SSIS. So far creating and executing of the package is concerned, I am able to do that now. For the time being I can do away with creating packages manually like I have already explained and then execute it through a stored procedure. The third step is still a problem for me, i.e. send email stating the success or the failure of the package execution. Although SQL server gives us the option to send the success/failure mail but the my mail contents are dynamic and depends on some parameters coming from my .NET application. So is there a way to signal the ASP .NET application about the DTS package execution completion? I hope I am clear with my words.

        A 1 Reply Last reply
        0
        • A AumSingh

          Thanks for the reply Bob, Yes I am talking about the DTS packages and not about SSIS. So far creating and executing of the package is concerned, I am able to do that now. For the time being I can do away with creating packages manually like I have already explained and then execute it through a stored procedure. The third step is still a problem for me, i.e. send email stating the success or the failure of the package execution. Although SQL server gives us the option to send the success/failure mail but the my mail contents are dynamic and depends on some parameters coming from my .NET application. So is there a way to signal the ASP .NET application about the DTS package execution completion? I hope I am clear with my words.

          A Offline
          A Offline
          Ashfield
          wrote on last edited by
          #4

          Sorry, its so long since I did any of this I can't remember the exact details, but I am sure you can make your DTS package return a value to indicate sucess/failure. Probably not much help I'm afraid.

          Bob Ashfield Consultants Ltd

          A 1 Reply Last reply
          0
          • A Ashfield

            Sorry, its so long since I did any of this I can't remember the exact details, but I am sure you can make your DTS package return a value to indicate sucess/failure. Probably not much help I'm afraid.

            Bob Ashfield Consultants Ltd

            A Offline
            A Offline
            AumSingh
            wrote on last edited by
            #5

            Hey no problem man..... but thanks for the reply anyways

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups