Posts related to SQL Server topics, divided to more subcategories by topic focus
Quick overview of all SQL Agent jobs. You can check how many SQL Agent jobs you have created and their basic information. Returns jobs schedule information and status. Something similar...
TempDB is heavily used database in every instance, time to check it. As every DBA know TempDB database is shared for all sessions within DB engine. This makes its performance...
Looks for auto-growth events in default SQL Server trace. You can find this information in SSMS built-in database standard report Disk usage under charts. This part of report is available...
Switch recovery model to SIMPLE for all databases in loop. This simple cursor query is useful when you need to keep your transactions log maintained automatically by SQL Server. And...
Check databases membership in Availability Groups. This very nice handy script from Dimitri Janczak can help you in various situations when dealing with Availability Groups. You can handle conditional logic...
Set database to SINGLE_USER mode do something and set MULTI_USER mode. Alter database mode using simple T-SQL statements....
Set database to read only mode do something and set read write mode. Alter database mode using simple T-SQL statements....
Generate script for changing mode for multiple databases. In given script I'm setting databases to Single-user and back to normal stace. Then changing state to Read-Only and back to Read-Write,...
Easily update statistics with one line function. I know that you are maintaining statistics by some maintenance jobs scheduled to run on regular basis. You can use builtin Maintenance plans...
Check how are your indexes doing in the database. This script is very useful when you are doing some performance optimizations by creating new indexes. Or trying to find some...