DTS (or) SSIS

  • Hi All, Here is the scenario:

    I have developed a basic SSIS package, SQL 2000 as db.We don't have SQL 2005 yet. I can run the package in the IDE. Is there a way that i can call this package in c#. I tried but it always says in compatible version. I am thinking i can not call an SSIS package in c# that connects to SQL 2000. So i have developed DTS package and was able to call the package in C#.

    Is it necessary that i need SQL 2005 to call SSIS package in C# ?

    Any input would be really helpfull.

    Thanks in advance.

  • Hi, how bout this?

    using System;

    using Microsoft.SqlServer.Dts.Runtime;

    namespace RunFromClientAppCS

    {

    class Program

    {

    static void Main(string[] args)

    {

    string pkgLocation;

    Package pkg;

    Application app;

    DTSExecResult pkgResults;

    pkgLocation =

    @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services" +

    @"\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx";

    app = new Application();

    pkg = app.LoadPackage(pkgLocation, null);

    pkgResults = pkg.Execute();

    }

    }

    }

    Thanks,

    Strick

  • Hi Strick, Thanks for quick reply. Are you using SQL 2000 or SQL2005 as backend?. I have SQL management studio and sql 2000 as back end. My code is same as yours. But i can't run it, it says incompatible version. Do you have any idea?

  • I do have SQL 2005 as a backend, but that shouldn't matter because the package is doing the work. The code should just fire the package. Hmmm, does the package fire if you just execute it by itself?

    Strick

  • I am planning to wrap the ssis package into windows service and install it in app server that talks to sql 2000. Hope it works. But do i have to install any additional components on app server.

    I have installed sql management client tools in my local box where i developed the package.

    May be i should install what ever i have installed in my local box.

  • The machine that runs the package (in your case your application server) MUST be an SSIS Server if you have anything beyond the components used by the import/export wizard or the maintenance plan wizard. Where the package is stored does not matter.

    This is often misunderstood.

    If you have logging turned on, I believe the error message you get is something relating to the incorrect edition of SQL Server being installed.

Viewing 6 posts - 1 through 5 (of 5 total)

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