Sharing SSIS Expression Amongst Packages

Hello:
We have a common Expression with System Variables that we want to be able to use across various packages.  How can we do this?
For example, when OnError event occurs, we want to send an email notification with the Error Code, Error Description, Package Name & ID, Task Name & ID, various Time Stamps, etc.  Currently, we can do this by using an Expression and copying
the Task in the OnError Event Handler to other packages and even projects.  However if we need to change the template of the email message to include other System Variables in the future, we want to be able to update the Expression for all Packages at
once (instead of going to each Package and updating each Expression in the OnError Event Handler).
I've tried inserting the Expression as a Project Parameter, but then the email message is only able to return the string containing the Expression in the Project Parameter -- it will not execute the Expression.  In other words, there is no function
we can use such as EvaluateAsExpression(@[$Project::DynamicErrorMsgProjectParam]).
I've tried using Package Variable (at least there will be less navigation necessary to get to the Expression this way), but this doesn't work either since some of the System Variables only pertain to Tasks / Event Handlers and the scope of the Variable can't
seem to be dynamic.
Nonetheless, ideally, I rather use Project Parameter so that we only have to change the Expression once per project as oppose to having to do it for each package.  I wish there is an EvaluateAsExpression flag or function we can use for Project Parameters. 
Anyone have any suggestions on how to go about this?  Thanks in advance!

Hi Yosedesh,
I would use BIDS Helper Batch Update to update property of Email Task.You can update multiple packages at same time.
If packages property paths are at different level then it might be good idea to create a user variable and change that variable Expression property with BIDS Helper Batch Update. You can use that variable in
Email task expression.
https://bidshelper.codeplex.com/wikipage?title=Batch%20Property%20Update&referringTitle=Documentation
Hope it helps!
Prathy
Prathy K

Similar Messages

  • SSIS Expression to Server Name from a Connection String

    Hi,
    I have an SSIS variable which contains a connection string as follows; -
    User::strD​YNconnecti​on {Data Source=myServer;Init​ial Catalog=myDatabase;Provider​=SQLNCLI10​.1;Integra​ted Security=XXXX} String
    I need to get the server name from the above variable using an SSIS expression so I can pass the server name to another function.
    Thanks in advance,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Hi Kieran,
    This works fine when the Data source comes first in the connection string (which it usualy does). but when it doesn't,
    e.g.
    Init​ial Catalog=myDatabase;Data Source=myServer;Provider​=SQLNCLI10​.1;Integra​ted Security=XXXX}
    you will get 'myDatabase' as an answer
    I would add 'Data source =' in the find string (and adjust for length of this search string to add sufficient offset)
    e.g.
    SUBSTRING(RIGHT(@[User::strDYNconnection],LEN(@[User::strDYNconnection]) - 11 - FINDSTRING(@[User::strDYNconnection],"Data Source=",1)),1,FINDSTRING((RIGHT(@[User::strDYNconnection],LEN(@[User::strDYNconnection]) - 11 - FINDSTRING(@[User::strDYNconnection],"Data
    Source=",1))),";",1) - 1)
    Even this is not foolproof, when the Data source is the last element in the string and there is no ending ;
    e.g.
    Init​ial Catalog=myDatabase;Provider​=SQLNCLI10​.1;Integra​ted Security=XXXX;Data Source=myServer}
    the formula needs to be extended further with a ( ? : ) operator around the last operator to see if the last ";" was found or not.
    Jan D'Hondt - SQL server BI development

  • Simple question - compare Strings with SSIS expression language

    SSIS variables - strOne = YES, strTwo = YES. I want to compare strings using ssis expression language (ie inside a variable's expression box, constraint of task flow arrow etc).
    Will @strOne == @strTwo be true ? I hope its not like programming languages where you need to do
    @strOne.Equals(@strTwo) instead of ==. Also is @strOne == "YES" true ?

    ([User::strOne] == [User::Strtwo] ? True : False)
    The third variable created should be of type boolean if you're using above expression. if its of type int return 0 and 1 instead of False and true
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SSIS Expressions Problem

    Hi All,
    Please help on the SSIS issue.
    i have a package.It contains Foreach loop container,Inside foreach loop container,I have one Dataflow task(Inside dataflow task,i am using Oledb source(table),I am populating 
    Data into Flat file)with flat file name YYYYMMDD_HH24MISS.txt. After i want to Zip that file with same file name. 
    YYYYMMDD_HH24MISS.txt.zip,After that i want copy that Zip file into another location.
    Thanks in advance...

    Hi BADDULAS,
    According to the screenshot in your initial post, you are using an Execute Process Task to compress the .txt file generated by the Data Flow Task. Let’s assume that you are using the common free software 7-Zip as the executable of the Execute Process Task,
    then you can refer to the following blog:
    http://sqlage.blogspot.com/2013/12/ssis-how-to-compress-and-archive-file.html 
    To get the expected name for the txt file, you can create another String type SSIS variable @[User::FileName] using the following expression (set EvaluateAsExpression property of the variable to True):
    REPLACE(SUBSTRING((DT_STR,30,1252)GETDATE(),1,10),"-","")+"_"+ SUBSTRING((DT_STR,30,1252)GETDATE(),12,2) + "24MISS.txt"
    The FileName variable should be used by the ConnectionString property of the Flat File Connection Manager that is used by the Flat File Destination in the Data Flow Task.
    Besides, the variable FileName should also be used in the expression of the VarSourcePath variable and the VarArchivePath variable as follows:
    VarSourcePath:  “C:\\Temp\\Source\\” + @[User::FileName]
    VarArchivePath: “C:\\Temp\\Destination\\” + REPLACE(@[User::FileName], ”.txt”, “”)
    Regards,
    Mike Yin
    TechNet Community Support

  • Regarding ssis - schedule multiple packages at a time

    Hi,
       how do we schedule multiple packages at a time in ssis

    You could create a master package with Execute Package Tasks to execute child packages and then use SQL Server Agent to schedule the master package.
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Regarding ssis - schedule 20 packages

    Hi,
    how can we schedule 20 packages at a time in ssis

    If they are related packages (same project/dependent) then you should create a master package with 20 execute Package Tasks. Or you can use a Foreach Loop to loop through all packages
    sequentially or even in
    parallel.
    Or else listen to Olaf Helper and create 20 jobs...
    Please mark the post as answered if it answers your question | My SSIS Blog:
    http://microsoft-ssis.blogspot.com |
    Twitter

  • Ssis 2012 configuration package wizard is hanging

    Hi,
    I am trying to edit the dtsconfig package xml file in SSIS 2012 VS envoirnemnt and the wizard is hanging up for minutes until I need to close VS.
    Has anyone experienced this problem and what can be done to solve other than editing the XML file directly.

    Hi danisroyi2 and Mike Yin Pactera
    I am also experiencing this issue.
    Edit an existing package configuration and click next.
    It hangs on the loading properties form until you eventually (I have waited for over half an hour) have
    to kill the process in task manager.
    thanks

  • Macmini sharing - airport express extending?

    I've set up my macmini to act as a base station through network sharing. But now my airport express won't allow me to run airtunes. I've tried to get the airport express to pick up the macmini network in client mode but it just says it can't find a base station. When I try and use it for airtunes it tells me that the airport in my macmini is in use and to turn it off.
    Is there a way to get the express to extend the wireless network created by the macmini? Or to get my airtunes to work whilst the macmini is a base station?
    hope that makes sense! I've searched far and wide...

    From what I've tried the Airport Express will only extend as it connects to. I've tried and it doesn't seem to "auto-convert" from one to another.
    Also, you might want to look at the 802.11n 5ghz and 802.11n b/g/n 2.4ghz. Set this in your Airport Extreme accordingly (which you already might have), and let Airport Express automatically extend the 802.11n b/g/n 2.4ghz. This way, the iPhone will connect as fast as it can and the older laptop can connect.
    BTW here is my "poor man's dual band" setup if anyone's interested:
    DSL modem is connected to Netcomm 802.11b/g/n wireless router. This supplies the 802.11b/g/ 2.4ghz N signal for iPhone, Xbox360, and anything else.
    Then, I connect via ethernet from Netcomm wireless router to my existing Airport Express. Airport Express supplies a pure 802.11 5ghz N signal for my Mac, iPad2, new iPad and AppleTV.
    This way, the Mac, iPads and AppleTV always "see" only the Airport Express network, hence WiFi iTunes syncing as well as AirPlay streaming is great, and the 5ghz network with maximum N speed doesn't suffer interference and/or dropouts such as when my microwave is running.
    As for the iPhone, I'll just use a cable when I need to, but this way my iPhone and Xbox360 can access the Internet as needed without degrading the connectivity of the Mac, iPads and AppleTV. I don't play online games, I only need connectivity to update or download stuff on Xbox360.
    Yes, the disadvantage is double-NAT, but I haven't encountered issues yet.

  • Sharing airport express internet connection with router and wired network

    Dear,
    I want to set up the following network, but can't succeed.
    Components:
    2 Powermacs quad G5's (airport and two ethernet ports)
    2 Powerbooks G4 (airport and 1 ethernet port)
    1 broadband wired router (1 Wan and 4 Lan ports)
    1 airport express
    1 cable internet connection.
    1 LaCie Ethernet Disk mini 300 GB
    The internet connection is at the other site of the office (little architecture office). It is not possible to get the internetconnection directly to the desk wth the computer. 1 Powermac G5 is set up to share his internet connection. (Share via airport with ethernet 1). The ethernet 1 port is connected to the Wan port of the wired router. The other Powermac G5's ethernet 1 port is connected to Lan 1 of the router. The LaCie Ethernet Disk mini 300 GB is connected to the the Lan 2 of the router.
    All the conputers get their IP adresses bij DHCP. The router is set to distribute IP adresses. Without the router and the LaCie everything works fine. There is internet connection on every computer and filesharing in between them is possible.
    I like to be able to do the following.
    Use airport connection on the two powerbooks, for internet and access to the network. Use the wired connection between the powermacs and the lacie for filesharing. On the second powermac use internetconnection through the router. With this configuration is it possible to copy files fast between the powermacs and the lacie harddisk.
    At the moment I'm trying to get internet connection on the second powermac. The ethernet port gives me a proper IP-adress and tells me that I can connect to the internet, but it won't let me go on the internet and when I turn the airport back on, safari buggs. Without the ethernet cable connected I can go on the internet without anny problem, but off cours the fast filesharing isn't possible any more.
    A drawing of the desired network can be downloaded at the folowing website
    http://homepage.mac.com/maesen_jeroen/FileSharing14.html
    Is there a possible sollution to this problem?
    thank you verry much
    Jeroen

    Disable the DHCP server on your wired router. Since your Power Mac G5 Jeroen is sharing Internet, it is already providing DHCP.
    Use airport connection on the two powerbooks, for internet and access to the network.
    Sorry, but it is not possible for the PowerBooks to access the subnet created by the Power Mac G5 Jeroen.
    Use the wired connection between the powermacs and the lacie for filesharing.
    Shouldn't be a problem.
    On the second powermac use internetconnection through the router.
    On Power Mac G5 Jeroen, you will need to disable the firewall or open the ports through the firewall needed by Power Mac G5 Nico to access the Internet.
    Is there a possible sollution to this problem?
    What you have is incredibly complicated. A much simpler solution is to
    Get a 2nd AirPort Express (AX).
    Use WDS to wirelessly connect the 2 AXs.
    Connect an Ethernet switch (or hub) to the Ethernet port on the 2nd AX.
    Connect all of your Ethernet clients (2 Power Mac G5s and LaCie) to this switch (or hub).
    In this configuration your PowerBooks will have wireless access and all of your Ethernet devices will get IP addresses from the AX connected to the Internet.

  • Can SSIS 2012 execute packages built on 2008 R2 BI for 2008 R2 SQL Server?

    We have a query regarding SSIS instalattion on application server. As SQL Server 2008 R2 is getting out of life, DBAs are suggesting to install SSIS 2012. Now our concern is
    that our SQL Server DB Server is on 2008 R2, and developers are building packages using SSIS 2008. 
    Considering we deploy file packages, and backward compatibility, theoretically it shall work. There are 3 things here -
    1. {2008 R2 SSIS Package} ------ Deployed On -------> 2. {Server with 2012 SSIS installation} ------- Connects to ------->  3. {SQL Server 2008 R2 DB Instance}
    Any recommendation on this. Would it work? Anything which could cause issue?
    As we have to pay for license, do not want be in a situation where we pay for SSIS 2012 installation on server (#2 above) and then realize that there is some issue
    Regards, Amit Gupta

    Hi Amit,
    Just as Visakh and hsbal said, there will be no issues as SSIS 2012 will work with standard previous versions of SQL Server packages. But some custom SSIS Tasks can always throw error after upgrading packages from SQL Server 2008 R2 to SQL Server 2012.
    About this, please remember to do the following things:
    Change your custom tasks and components to target the .NET 4.0 Framework in each of the project properties, in the Application Tab, under Target framework.
    Update the assembly references in each of your projects to point to the appropriate SqlServer dlls.
    Build and copy your project dlls to the appropriate directory, depending on what kind of components you are updating, i.e. Program Files (x86)\Microsoft SQL Server\110\DTS\PiplelineComponents
    Register your components in the GAC.
    Close Visual Studio and then reopen; open your SSIS packages and refresh the SSIS Toolbox, by right clicking in the tool box and selected Refresh Toolbox.
    Besides, if some of your script task throw errors to you, we can open the script task in VSTA, insert Breakpoint to debug the scripts, then find the root cause. For more details, please see:
    Debug a Script by Setting Breakpoints in a Script Task and Script Component
    For more detailed information regarding to the license issue, please call 1-800-426-9400, Monday through Friday, 6:00 A.M. to 6:00 P.M. (Pacific Time) to speak directly to a Microsoft licensing specialist. For international customers, please use the Guide
    to Worldwide Microsoft Licensing Sites to find contact information in your locations.
    You can also visit the following site for more information and support on licensing issues:
    http://www.microsoft.com/licensing/mla/default.aspx
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

  • SSIS Expression to get yesterday's date

    Hi ,
    I used the following expression to get yesterday's date :
    (DT_WSTR,4)YEAR(GETDATE())
    + RIGHT("0"+(DT_WSTR, 2) MONTH(GETDATE()) ,2)
    + RIGHT("0"+(DT_WSTR, 2) DAY(DATEADD("dd", -1, GETDATE())) ,2)
    It returns correct date but fails on last day of the month. Eg : If today is Feb 01 ,2015 , this expression returns 
    20150231 (Feb 31 2015) . It should return 20150131 (Jan 31 , 2015) . What expression to use to get correct previous date?

    this?
    (DT_DATE) DATEADD("DAY",-1,GETDATE())
    if you dont have timepart use
    (DT_DATE) (DT_DBDATE) DATEADD("DAY",-1,GETDATE())
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Mac and PC sharing airport express - help!

    This is possible, right? I have successfully set up the airport express from my ibook, but now i'm trying to connect a PC with Windows XP to it and it's not picking up the wireless signal. Suggestions please?

    Mike
    Rather a late follow-up, but I'm hunting for clues.
    I'd be interested to know how you managed to enter 26 hexa characters for the password. I have an XP machine I'm trying to connect to an ABS. I first tried entering the 13 char Ascii password. It entered, but didn't produce the connection. Then I got the 26 char hexadecimal version from Aiport Admin, and tried to enter it. I got to 13th char, then the password field refused to accept any more characters. I thought for a moment the keyboard had died. No. The password field just refused to take more than 13 characters.
    So, what's the secret to getting all 26 in as a hexa password? In which window/screen could you enter the password?
    Problem machine is running XP Home with SP2.
    Regards
    Ken

  • Internet sharing + airport express printer issues

    I have a MacMini connected to my DSL-modem and share the internet connection with my MacBook. My Airport Express is connected only to my printer and set to be a part of the network that my MacMini shares. Everything works fine except that my MacMini doesn't seem to find my printer. Printing wirelessly via the MacBook works fine.
    I've got the printer to work on the mini if I share the printer on my MacBook. But this setting isn't ideal becouse the macbook isn't always around when the printer is needed.
    Does anyone have a clue what I'm doing wrong?

    Printing from a Windows XP PC to a printer attached to an Airport Extreme Base Station or Airport Express
    http://www.ifelix.co.uk/tech/1004.html
    Printing from a Windows XP PC to a printer attached to an Airport Extreme Base Station or Airport Express using Bonjour
    http://www.ifelix.co.uk/tech/1008.html
    Problems with finding Printer Driver on Windows XP when using printer connected to Airport Extreme or Express
    http://www.ifelix.co.uk/tech/1012.html
    iFelix

  • Is There any difference in Set @Var=ColmnName and Select @Var =Column from Table. I am using it in SSIs for Dynamic Packages

    hey there, Kindly elaborate me the difference Between Set and Select clause while Providing value to a Variable or Even  a  Column.
        Declare @var nvarchar(Max)
        Set @var= (Select TestName+ cAst(TestId as nvarchar) from TblTest where TestID=1)
        Insert into TblTest(TestName)
        Values (@var)
        Declare @var nvarchar(Max)
        Select @var= (Select TestNAme + Cast(TestId as Nvarchar(MAx)) from TblTest Where TestID=1)
        Insert into TblTest(TestName)
        Values(@var)
    Values and result I am getting is Same in Both.
    But just wondering if there is any Difference. and if Any which Should I prefer.
    And Which one uses less Resources.

    I like this article
    http://vyaskn.tripod.com/differences_between_set_and_select.htm
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Sharing ARD Admin amongst multiple users

    I have Apple Remote Desktop 3.7 (now 3.7.1) installed on a Mavericks Mac and it is working fine for the first account I set it up with. I would however like other accounts on the same Mac to also be able to run ARD and see the same computer lists, scanners, etc. as the first account.
    As (supposedly) ARD uses a database located at /private/var/db/RemoteManagement I thought this would be possible but it seems not. I have tried copying the files from /Users/firstaccount/Library/Application Support/Remote Desktop/ to the second account and this did not help either. There does not seem to be a preference file at ~/Library/Preferences/com.apple.RemoteManagement.plist
    Any suggestions on how to achieve this? I am happy that only one user account at a time would be able to run it.
    My goal is to allow multiple admin users to connect via ScreenSharing to the same Mac to their own account and see the same ARD lists and settings.

    I've not tried exactly what you are attempting, but I just went through the torture of moving ARD from one machine to another.  Looks like ~/Library/Containers/com.apple.RemoteDesktop may be what you are looking for.  This contains the ever important com.apple.RemoteDesktop.plist for the user.  You can try moving that to the second account.
    Now, the database remains single context I believe.  So while this "may" allow you to initially sync the machine list, I do not think it will stay in sync as users use it.  Hope this helps.

Maybe you are looking for

  • Please help me with the digital signature validation problem?

    Please help me with the digital signature validation problem?

  • Running Medieval Total War 2 on windows xp home ed via bootcamp on mac book

    Hi...i have a macbook with os x 10.4.6, but im not able to have medieval total war 2 running on bootcamp 1.4, windows xp home ed. it reported that theres an unspecified problem and program will exit now. i read from other random forums outside apple

  • Login error in 11.5.10.2

    Hi: We have 11.5.10.2 on unix with 10g db. I can access all instances but not this one. After login click on any form, I got or this time when I enter my login infor got error as below: Error Page You have encountered an unexpected error. Please cont

  • Calculator doesn't add correctly in 10.4

    I noticed today that the calculator can't cope with large numbers. Can someone confirm this: Add 1234567891 + 1. The answer should be 1234567892. But the calculator comes up with 123470000. I know that it is known that in RPN mode, if you add 104.64

  • BWOM_TIMEST, BWOM_SETTINGS somebody please help

    Hi Gurus, Can somebody explain me and confirm my understanding on Delta in FI. 1. Delta in FI is done through Timestamp method but not through Delta Queue. 2. Before starting the init we need to setup an entry in table <b>TPS31</b> so as to enable th