Friday, September 10, 2010

Mungled SQL Server instances

So, you have before you a box that has seen its share of SQL Server instances over the years, had its security settings and various broadcast settings changed inconsistently, and you just want to get a handle on what you have. To get the instance names, do a search for the "perf-*.ini" files in the various database folders (i.e., "MSSQL.1").

For example, in:
C:\Program Files\Microsoft SQL Server\MSSQL.1\Binn
if the instance used for this database was "SMEDLY" then you'll find:
"perf-SMEDLYsqlctr.ini"

Wednesday, September 8, 2010

Regular Expression Search and Replace

Using Textpad's implementation of RegEx, the following will find all closing HTML/XML tags and add a carriage return after them:

search:  </[^>]*>
replace: \0 \n


Same thing, to create a carriage return before starting tags:

search:  <[^>]*>
replace: \n \0

This really helps when you are trying to view HTML that has been machine generated and appears in a single line.

Where Textpad uses the backslash (\) for the replacement sytax, other implementations of RegEx use the percent symbol (%).

Friday, September 3, 2010

My First Code Project Article

Couldn't afford the time to do something full out, but at least I finally went ahead and put something up there.

Searching Revision History Comments in Visual SourceSafe - CodeProject

My alias on Code Project is patrickpage.