Category: Security (Encryption & Permissions)
-
Forcing Encrypted Connections in SQL Server Using Certificates
You want every TCP connection to SQL Server encrypted, every time, with no client able to opt out. That is Force Encryption, and it is a server-wide change that stands or falls on the certificate SQL Server loads and whether clients trust it. Done properly it is stable; done casually it breaks every client at…
Written by
-
Grant VIEW SERVER STATE in SQL Server
⚡VIEW SERVER STATE is the read-only permission behind the DMVs: sessions, requests, waits and plans. One query shows who has it and how they got it. Grant it with GRANT VIEW SERVER STATE TO [login]; If a grant seems to do nothing, a DENY is overriding it. What VIEW SERVER STATE Is For VIEW SERVER…
Written by
-
Working with SQL Server Database Master Keys
SQL Server uses an encryption hierarchy to protect secrets such as credentials, asymmetric keys and certificates. At the database level, that hierarchy is anchored by the database master key (DMK). Because all other encrypted objects depend on it, losing access to the DMK can render those objects unusable. ⚡Check sys.symmetric_keys for ##MS_DatabaseMasterKey##, and if it…
Written by
-
DBA Scripts: Get Database Mail and xp_cmdshell Configuration
An audit or a pen test report asks whether xp_cmdshell is on, or alert emails stopped arriving and you need to know whether Database Mail is even switched on. This script answers both in one result, alongside CLR, force encryption and live NTLM sessions. Why Database Mail and xp_cmdshell Matter Each of these settings expands…
Written by
-
DBA Scripts: Get User Permissions Audit
The One Login You Actually Care About Right Now Off-boarding someone, or asked why one login can read a database it should not? Set @LoginName and run this. It returns one row for the server and one for every database the login can open, with every role it holds there, nested roles and AD groups…
Written by
- Tune a Slow Query With Copilot in SSMS
- xp_readerrorlog: Read the SQL Server Error Log with T-SQL
- Cannot Drop Database Because It Is Currently in Use (Error 3702)
- Could Not Drop Login Because the User Is Currently Logged In (Error 15434)
- Set a Maximum Database File Size in SQL Server (MAXSIZE)
- SQL Server Activity Monitor in SSMS (and the Performance Dashboard)
- Backups & Recovery (18)
- DBA Scripts (154)
- High Availability (HA) (13)
- Installation & Configuration (60)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (10)
- Performance Tuning (38)
- Security (Encryption & Permissions) (25)
- Storage & Capacity (18)
- T-SQL Fundamentals (17)
- Troubleshooting (108)
- Wait Types (236)