Can i call a C# program from an SQL job? if so, how

  • I have a C# program which gets a PDF file from web services and merges into one PDF.

    I eventually want to execute this C# program after some execution one query in the database.

    I am planning to have the query execution as the first jOb step. And once it succeeds I want to execute the C# program in job step 2 ?

    And in job step 3 another query execution..

    Any ideas

  • If I'm not mistaken, SSIS can directly call C# DLLs. If I am mistaken, take a look at CLR procs and see if one of those will do what you need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Hi,

    you can create a job step with type "Operating System (cmdexec)" and call your C# program.

    Hope this helps 🙂

  • Yes,

    I added that job selecting Operating System cmdExec,

    In the command I gave the path to the exe that has to be executed.

    I am the owner of the job and I am sysadmin too. It gave me an error "Unable to determine if the owner of the job has server access (reason : Could not obtain information about Windows NT group/user NFR\rmuthulingam .."

    Any help?

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

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