Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS object search using T-SQL


SSIS object search using T-SQL

Author
Message
James Greaves
James Greaves
SSC Veteran
SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)

Group: General Forum Members
Points: 299 Visits: 457
Comments posted to this topic are about the item SSIS object search using T-SQL



lgoble
lgoble
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 83
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.
alen teplitsky
alen teplitsky
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1595 Visits: 4621
i take it this won't work if you have SSIS packages stored in the file system?
jmplun
jmplun
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
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...
Ed Zann
Ed Zann
Mr or Mrs. 500
Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)

Group: General Forum Members
Points: 507 Visits: 1391
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





James Greaves
James Greaves
SSC Veteran
SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)

Group: General Forum Members
Points: 299 Visits: 457
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?



James Greaves
James Greaves
SSC Veteran
SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)

Group: General Forum Members
Points: 299 Visits: 457
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.



Ed Zann
Ed Zann
Mr or Mrs. 500
Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)Mr or Mrs. 500 (507 reputation)

Group: General Forum Members
Points: 507 Visits: 1391
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.



lgoble
lgoble
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 83
[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
SQLRNNR
SQLRNNR
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21143 Visits: 18259
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

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search