Hi we run 2014 std and are researching a potential issue with an alias in one of our ssis environments.
one of my peers believes we have two types of packages on msdb in that environment. Some that currently run with two specific conn mgrs (one is sql the other ado) referencing alias "abc". And some that wont work with that alias unless those 2 specific conn mgrs are hard coded to the server on which that ssis environment runs.
there are often 5 conn managers in our pkgs. because "abc" is referenced in our pkgs for another reason , i think i need to learn how to shred two specific conn mgrs to find if either one refers to "abc". i tried using LIKE in my query to match on what shows after their guids but couldn't get that to work.
so in the example shown below , i show my base query followed by the typical conn mgrs anonymzed. The goal is to find examples where the 2nd and 3rd conn mgrs have the string "abc" between their beginning and ending tags. i will cast the varchar(max) to xml if necessary.
select * from ( select * , cast(cast(packagedata as varbinary(max)) as varchar(max))pd2 from sysssispackages ) x where... <DTS:ConnectionManagers> <DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[xxx.app1]" DTS:CreationName="OLEDB" DTS:DTSID="{a guid}" DTS:ObjectName="xxx.app1"> <DTS:ObjectData> <DTS:ConnectionManager DTS:ConnectionString="Data Source=aliasthatsok;Initial Catalog=app11;Provider=SQLNCLI11;Integrated Security=SSPI;Auto Translate=False;"/> </DTS:ObjectData> </DTS:ConnectionManager> <DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[xxx.app2]" DTS:CreationName="OLEDB" DTS:DTSID="{a guid}" DTS:ObjectName="xxx.app2"> <DTS:ObjectData> <DTS:ConnectionManager DTS:ConnectionString="Data Source=hardcodedserver;Initial Catalog=app2;Provider=SQLNCLI11;Integrated Security=SSPI;Auto Translate=False;"/> </DTS:ObjectData> </DTS:ConnectionManager> <DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[xxx.app2 ADO.NET]" DTS:CreationName="ADO.NET:System.Data.SqlClient.SqlConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=somekey" DTS:DTSID="{a guid}" DTS:ObjectName="xxx.app2 ADO.NET"> <DTS:ObjectData> <DTS:ConnectionManager DTS:ConnectionString="Data Source=hardcodedserver;Initial Catalog=app2;Integrated Security=True;"/> </DTS:ObjectData> </DTS:ConnectionManager> <DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[xxx.SSISConfig]" DTS:CreationName="OLEDB" DTS:DTSID="{a guid}" DTS:ObjectName="xxx.SSISConfig"> <DTS:ObjectData> <DTS:ConnectionManager DTS:ConnectionString="Data Source=abc;Initial Catalog=master;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"/> </DTS:ObjectData> </DTS:ConnectionManager> <DTS:ConnectionManager DTS:refId="Package.ConnectionManagers[PackageLogFile]" DTS:CreationName="FILE" DTS:Description="Package Log File. Location is set dynamically using an expression." DTS:DTSID="{a guid}" DTS:ObjectName="PackageLogFile"> <DTS:PropertyExpression DTS:Name="ConnectionString">@[Template::LogFileName]</DTS:PropertyExpression> <DTS:ObjectData> <DTS:ConnectionManager DTS:FileUsageType="1" DTS:ConnectionString="some letter:\temp\LogFiles\pkgname_1.0.206_20201117131352.log"/> </DTS:ObjectData> </DTS:ConnectionManager> </DTS:ConnectionManagers>