sql server
SQL Server – Getting All SQL Services Running On System
Getting all services running SQL Server using T-SQL: SELECT * FROM sys.dm_server_services
PowerShell – Getting All Running SQL Services
Getting all SQL Server services running on a server using PowerShell: Get-WmiObject -Class sqlservice -Namespace “ROOT\Microsoft\SqlServer\ComputerManagement11″...
SQL Server – All Objects On Instance Sorted By Date
One common question I hear whenever something begins to go wrong is, “Has anything been changed...
Moving Database Files to Another Location
Although moving database files around is simple, it is a still big deal. When you do...
SQL Server Compare Users Script
If you need to compare two users in SQL Server, here is a handy script. The...
Finding Active Node in SQL Server Cluster
The T-SQL method to find the active node that a SQL service is running on: SELECT...
SQL Jobs – Daylight Savings Risks
For those of us not lucky enough to live in Arizona (where daylight savings is ignored...
Validate SQL Code Without Running It
Validate SQL Code Without Running It In a nutshell: SET NOEXEC ON; — The script now...
SSMS Scripting Partition Scheme With Correct Filegroup
I almost found a bug… but it’s a feature after all. If you are scripting out...