Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

SSIS object search using T-SQL Expand / Collapse
Author
Message
Posted Wednesday, May 12, 2010 10:45 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 3:31 PM
Points: 281, Visits: 395
Comments posted to this topic are about the item SSIS object search using T-SQL


Post #920987
Posted Thursday, May 13, 2010 6:45 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 7:39 AM
Points: 14, Visits: 65
First off I just want to say that these queries were a great help. I'm not sure which version of SQL Server you are working with, but I am working in SQL Server 2008. I ran your queries as listed and found no data. It turns out in SQL Server 2008 the tables that you need to query are msdb.dbo.sysssispackages and msdb.dbo.sysssispackagefolders.
Post #921196
Posted Thursday, May 13, 2010 6:45 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, November 10, 2014 9:36 AM
Points: 1,414, Visits: 4,544
i take it this won't work if you have SSIS packages stored in the file system?

https://plus.google.com/100125998302068852885/posts?hl=en
http://twitter.com/alent1234
x-box live gamertag: i am null
[url=http://live.xbox.com/en-US/MyXbox/Profile[/url]
Post #921198
Posted Thursday, May 13, 2010 6:52 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, March 1, 2011 10:08 PM
Points: 20, Visits: 38
hmm maybe I should have done it that way.. all I did was write a little application that parsed the xml file, grabbed out all embedded sql statements and searched those...
Post #921206
Posted Thursday, May 13, 2010 7:17 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 11:50 AM
Points: 487, Visits: 1,239
Excellent article James. I also have to identify SSIS and SSRS code that might be affected by schema changes introduced by vendor updates to our core system. Your solution for SSIS packages in MSDB is more straightforward than mine. I might give it a whirl next time around.

For SSRS I use a free utility called "Reporting Services Scripter" http://www.sqldbatips.com/showarticle.asp?ID=62

For SSIS I use a script code task to dump the SSIS code out to XML files. Then I use a little freeware program called "Agent Ransack" to do text searches. http://www.mythicsoft.com/page.aspx?type=agentransack&page=home

Here is the script task that uses the DTS object model to dump the xml:
Public Sub Main()
'
' Add your code here
'
Dim dtsapp As Application = New Application()
Dim pInfos As PackageInfos = dtsapp.GetPackageInfos("\\Production Jobs", "server1", Nothing, Nothing)
Dim pkg As Package
Dim mFileOut As String
For Each pInfo As PackageInfo In pInfos
If pInfo.Flags = DTSPackageInfoFlags.Package Then
pkg = dtsapp.LoadFromSqlServer("Production Jobs\" & pInfo.Name, "server1", Nothing, Nothing, Nothing)
mFileOut = "J:\A2I SSIS and RDL Files\SSIS\" & pkg.Name & ".xml"
dtsapp.SaveToXml(mFileOut, pkg, Nothing)
End If
Next
pkg = Nothing

Dts.TaskResult = Dts.Results.Success
End Sub




Post #921238
Posted Thursday, May 13, 2010 8:12 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 3:31 PM
Points: 281, Visits: 395
lgoble (5/13/2010)
First off I just want to say that these queries were a great help. I'm not sure which version of SQL Server you are working with, but I am working in SQL Server 2008. I ran your queries as listed and found no data. It turns out in SQL Server 2008 the tables that you need to query are msdb.dbo.sysssispackages and msdb.dbo.sysssispackagefolders.


I should have been more clear that my code in the article that that the example was for SQL 2005. I assume that if you change the table names in the query for SQL 2008 that the search works in 2008?



Post #921291
Posted Thursday, May 13, 2010 8:13 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 3:31 PM
Points: 281, Visits: 395
alen teplitsky (5/13/2010)
i take it this won't work if you have SSIS packages stored in the file system?


This search is only for SSIS packages stored on the MSDB database.



Post #921292
Posted Thursday, May 13, 2010 8:44 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, November 19, 2014 11:50 AM
Points: 487, Visits: 1,239
alen teplitsky (5/13/2010)
i take it this won't work if you have SSIS packages stored in the file system?


Alen, if the dtsx files are stored in the file system, they are already in XML format and would be searchable as text.



Post #921337
Posted Thursday, May 13, 2010 9:02 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 7:39 AM
Points: 14, Visits: 65
[b]JI should have been more clear that my code in the article that that the example was for SQL 2005. I assume that if you change the table names in the query for SQL 2008 that the search works in 2008?


Yes, change the table names and they work great
Post #921368
Posted Thursday, May 13, 2010 5:10 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 12:45 PM
Points: 17,947, Visits: 15,941
Thanks for the article. Good stuff.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #921688
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse