30.06.2013 Views

SQL Server Team-based Development - Red Gate Software

SQL Server Team-based Development - Red Gate Software

SQL Server Team-based Development - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 9: Searching DDL and Build Scripts<br />

Searching the entire build script<br />

Let's start with the very simplest, but one of the most reliable methods of searching. You<br />

get out your build script. No build script? You generate it. If you like clicking at things,<br />

then use SSMS; otherwise use an automated procedure with PowerShell and SMO<br />

(remember that you have to regenerate the build script every time someone else<br />

makes an alteration). I still use a slightly retro stored procedure with DMO (see www.<br />

simple-talk.com/sql/database-administration/more-database-administration-anddevelopment-automation-using-dmo/);<br />

it works very well for me. Then, you read it<br />

into your favorite text editor and use the search facilities in it. This sounds clunky, but if<br />

your editor uses RegEx search, a lot can be done, including the automatic generation of<br />

lists. Personally, I am pretty happy with this approach, but it isn't always convenient.<br />

Figure 9-2: EditPad Pro.<br />

264

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!