Click here to monitor SSC

Search SSIS packages for table/column references

Published 7 November 2013 12:26 pm

A lot of companies now use TFS or some other system and keep all their packages in a single project. This means that a copy of all the packages will end up on your local disk.

There is major failing with SSIS that it is sometimes quite difficult to find what a package is actually doing, what it accesses and what it affects.

This is a simple dos script which will search through all packages in a folder for a string and write the names of found packages to an output file.

Just copy the text to a .bat file (I use aaSearch.bat) in the folder with all the package scripts Change the output filename (twice), change the find string value and run it in a dos window. It works on any text file type so you can also search store procedure scripts – but there are easier ways of doing that.

echo. > aaSearch_factSales.txt for /f “delims=” %%a in (‘dir /B /s *.dtsx’) do call :subr “%%a” goto:EOF

:subr findstr “factSales” %1 if %ERRORLEVEL% NEQ 1 echo %1 >> aaSearch_factSales.txt goto:EOF

One Response to “Search SSIS packages for table/column references”

  1. Nigel Rivett says:

    That lost all it’s formatting – let’s try again in code tags

    echo. > aaSearch_factSales.txt
    for /f "delims=" %%a in ('dir /B /s *.dtsx') do call :subr "%%a"
    goto:EOF
    :subr
    findstr "factSales" %1
    if %ERRORLEVEL% NEQ 1 echo %1 >> aaSearch_factSales.txt
    goto:EOF

Leave a Reply