http://www.sqlservercentral.com/blogs/nycnet/2011/04/28/how-to-determine-the-current-ssis-runtime-environment/

Printed 2014/11/28 06:57PM

How to determine the current SSIS runtime environment

By nycdotnet, 2011/04/28

If you want to test if you’re currently debugging an SSIS package via BIDS/Visual Studio, or running normally via DTExec, you can use the following utility functions inside a Script task.

    Public Function SSIS_IsBIDS() As Boolean

        Return (SSIS_Environment() = "DtsDebugHost")

    End Function

    Public Function SSIS_IsDTExec() As Boolean

        Return (SSIS_Environment() = "DTExec")

    End Function

    Public Function SSIS_Environment() As String

        Return System.Diagnostics.Process.GetCurrentProcess.ProcessName.ToString

    End Function


Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.