March 16, 2015 at 11:17 am
Hi All,
I'm a bit of an SSIS noob and I'm hoping to get some help. I'm using BIDS 2005. I need to generate a GUID which I can append to several different data streams. My first thought was to run an Execute SQL task that basically says
select batch_id = cast(newid() as char(36))
Then assign that value to a variable. Problem is I'm not sure how to configure the stage for that, and since I'm not savvy with SSIS, I'm having trouble succinctly searching for this problem online. Can anyone help me with how to configure the task to do this assignment, or maybe suggest a better way to get a guid into a variable when the package runs?
March 16, 2015 at 11:26 am
Perhaps there is an alternative.
There is a system variable in SSIS called the ExecutionInstanceGUID.
This is a GUID generated every time a package runs – it uniquely identifies a single run of a single package. Can you use that & avoid having to make a SQL Server call completely?
See here for more details.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
March 16, 2015 at 11:29 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply