Read more about the article Mass editing of SQL Server objects
Microsoft SQL Server

Mass editing of SQL Server objects

Ever had the need to replace a piece of code in multiple SQL Server objects (Stored Procedure, Trigger, Function or Views)? Here’s a method to search for a string in all objects, replace it with some other code, and to finally script all changes. In other words, a method for mass editing SQL Server objects.

(more…)

Continue ReadingMass editing of SQL Server objects
Read more about the article SQL Server Default Trace
Microsoft SQL Server

SQL Server Default Trace

The default setting in SQL Server 2005 and later is to keep a trace running all the time that captures basic information about the instance. This is called the Default Trace. The created trace files can be viewed in Performance Monitor or by using T-SQL and they can be very useful in some troubleshooting scenarios.

(more…)

Continue ReadingSQL Server Default Trace
Read more about the article Performance Monitor Data into SQL Server tables
Microsoft SQL Server

Performance Monitor Data into SQL Server tables

On a machine running SQL Server there are a lot of performance counters that can be used to create baselines or to investigate performance problems. Those specific to SQL Server can be sampled regularly from the system table sys.dm_os_performance_counters. But those belonging to the OS must be gathered in some other way. Since I’m a SQL Server DBA, of course I want the counters saved to a table in SQL Server 🙂

(more…)

Continue ReadingPerformance Monitor Data into SQL Server tables