Connecting to current instance from an ActiveX or PowerShell Agent job step

  • I'm trying to put together an Agent job that I intend to roll out across a heterogenous estate with different versions, instance names, etc.

    The job will need to read from the master and msdb databases of the local instance, and do some work based on the results. I know that I can use T-SQL against a local database in job steps, but you cannot pass the data on to the next step. Besides, there will be external operations not suited to T-SQL, so I'm expecting to use ActiveX/VBScript or PowerShell steps.

    Is there a reliable means to establish an ADO or ADO.NET connection to the local instance from either of these step types? I know CLR procedures have a context connection they can use -- what's the best way to 'emulate' that in an Agent job step?

Viewing 0 posts

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