Tag: SQL Server Security
-
DBA Scripts: Get Backup Encryption Status
TDE (Transparent Data Encryption) and backup encryption are two different things that get confused constantly. TDE encrypts the data and log files at rest, and a backup of a TDE database is encrypted too, with the same database encryption key (MS Docs). What TDE does not do is record that backup in msdb as an…
Written by
-
Creating SQL Logins on an Availability Group (AG) Environment
In an Availability Group, the databases fail over. Your SQL logins do not. For Windows domain logins, the SID is owned by AD, so you just create the login on each replica and it syncs up. For SQL logins, the SID is generated inside SQL Server. If the SID differs between replicas, the database user…
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
-
Check SQL Server Connection Encryption and Protocol
Modern SQL Server environments often use encrypted connections by default, but that does not always mean what people think it means. When troubleshooting connectivity problems, certificate errors, performance questions, or unexpected client behaviour, DBAs usually need to answer one very specific question: What protocol and encryption is this connection actually using right now? This post…
Written by
-
SSMS Certificate Chain Not Trusted Error (Trust Server Certificate Fix)
SSL Provider · error: 0 A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 – The certificate chain was issued by an authority that is not trusted.) ⚡Tick Trust server certificate and connect. In the SSMS Connect dialog it sits under Encryption…
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
- 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)