Hello,
I am writing a SQL Server 2012 data warehousing solution. I need to use the ServerExecutionID to return some information from the Catalog. I have a T-SQL which simply asks this:
SELECT Environment_Folder_Name, Environment_Name FROM [Catalog].[Executions] WHERE Execution_Id = ?
The parameter is fed by System::ServerExecutionID. However, the task always fails to return anything, because the ServerExecutionID is never set. When I debug, breaking at the SQL Task OnPreExecute phase, I see ServerExecutionID = 0 in my Watch window. (I'd post a picture, but can't do that yet :-( )
Can anybody tell me what I am missing? I see some links on SSIS-Junkie which call this variable out, but with better results.
Thanks,
-Mikah