Scheduling Job for COM+ application

  • Hi,

    I have created COM+ application and i would like to schedule a job for it in SQL Server Agent. I have some experience in scheduling jobs for exe aplication, but no for COM+ applications. Specialy I don't know where to get or how to create CommandLine (example: DTSRun/~Z0x....) ..

    Can anybodu help me with some info?

    Thanks in advance,

    Igor

  • sorry, i dont have a solution but I am keen to see an answer for this.

  • Hi, you can create a job with an ActiveX scripts task and then do the following:

    Dim oObj

    set oObj = CreateObject("dllName.ClassName")

    oObj.FunctionName()

    Set oObj = Nothing

    dllName is the name of your dll in COM+; ClassName is the name of the class in the dll and FunctionName is the function you want to call within the specific dll (with any parameters that might be present).

    This works pretty much the same as you would do in the runtime environment in VB.

     

    Hope this helps,

    Martin.

  • This maybe not be a surpise, but you need to make a host for the dll.

  • Dear All

    I was busy with some other work but i have menage to solve the problem.

    ActiveX script when creating DTS package is...

    Function Main()

     Dim ca

     Set ca = CreateObject( "COMAdmin.COMAdminCatalog" )

     ca.ShutdownApplication("COM component")

     Main = DTSTaskExecResult_Success

    End Function

    Scheduling is then the easy part of the job!

    Thanks again to all of you!

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

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