MSSQL 2012 Administration Notes

Is the current SQL instance is part of a cluster?

SELECT SERVERPROPERTY('IsClustered');

Flush dirty pages to disk - What this does is determined by the Recovery mode set on the database. It can also truncate the trans log depending on the Recovery mode. Maybe something to only run in DEV.

CHECKPOINT;
GO

Clear out cache

DBCC DROPCLEANBUFFERS;
DBCC FreeProcCache

Show the query plan without using the UI

SET SHOWPLAN_TEXT ON;

Sets the statistics for Time and IO on for the session

SET STATISTICS TIME ON;
SET STATISTICS IO ON;

Dynamic Management Views (DMV) - Returns server state information CHECKPOINT Internval

sp_configure

Then change RecoveryInternval - Default every minute

Posted in Databases, Databases with : SQL Server, Notes