|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 9:46 AM
Points: 280,
Visits: 375
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 6:54 AM
Points: 14,
Visits: 55
|
|
| 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.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 10:43 AM
Points: 1,411,
Visits: 4,517
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Tuesday, March 01, 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...
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Friday, June 14, 2013 12:20 PM
Points: 473,
Visits: 1,080
|
|
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
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 9:46 AM
Points: 280,
Visits: 375
|
|
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?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 06, 2013 9:46 AM
Points: 280,
Visits: 375
|
|
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.
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Friday, June 14, 2013 12:20 PM
Points: 473,
Visits: 1,080
|
|
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.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 6:54 AM
Points: 14,
Visits: 55
|
|
[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
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Yesterday @ 3:33 PM
Points: 18,858,
Visits: 12,443
|
|
|
|
|