Category: Security (Encryption & Permissions)
-
Grant VIEW DATABASE PERFORMANCE STATE in SQL Server
VIEW DATABASE PERFORMANCE STATE is database scoped: check a login across every database, grant it, and know which DMVs still need the server permission.
Written by
-
How to Back Up a SQL Server Certificate and Its Private Key
BACKUP CERTIFICATE to .cer and .pvk or a single PFX, the errors each form throws, why a PFX export leaves pvt_key_last_backup_date NULL, and a thumbprint-checked restore test.
Written by
-
DBA Scripts: Get Failed Login Summary
The error log is full of Login failed for user ‘sa’. One script groups every failure by login, client address and reason, adds the lockout state, and tells a scan from a stale password or a missing database.
Written by
-
SQL Injection in Dynamic SQL: Use sp_executesql
A SQL Server name search can return every row when untrusted input is concatenated into the query. This lab demo compares EXEC with a parameterized sp_executesql call.
Written by
-
Dynamic Data Masking: What a WHERE Clause Still Reveals
A masked salary can still be tested with WHERE. This lab example shows the row returned to a low-privilege user and what Dynamic Data Masking does not protect.
Written by
-
SQL Server Row-Level Security: The Filter Does Not Stop Cross-Tenant Writes
A Row-Level Security filter can hide another tenant’s rows while still allowing a cross-tenant insert. See the lab reproduction, add block predicates, and treat session context as a trust boundary.
Written by
-
Set the Default Database for a SQL Server Login
One line sets a login default database, and SQL Server never checks that the login can actually use it. The failure arrives at the next connection, with the same message whether the database is gone or just inaccessible.
Written by
-
CREATE USER WITHOUT LOGIN vs Contained Database Users
Both look like a user with no login and they are opposites. How to tell them apart, what each is for, and the migration break that fails silently.
Written by
-
DBA Scripts: Get Linked Servers
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Server Inventory Choose the linked-server check you need Start with Get-LinkedServerConnectivity to check whether a linked server is reachable and see the returned error detail. For a migration pre-check, run Get-LinkedServerAndJobInventory for logins, linked servers, and SQL Agent jobs.…
Written by
-
DBA Scripts: Get Edition Feature Usage
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Server & Configuration › Server Inventory What Actually Breaks If You Downgrade This Instance Edition downgrades, Enterprise to Standard, Standard to Web, look simple until you discover a feature that only Enterprise supports has quietly been in use the whole time. TDE-encrypted databases…
Written by
- Backups & Recovery (18)
- DBA Scripts (154)
- High Availability (HA) (13)
- Installation & Configuration (59)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (25)
- Storage & Capacity (17)
- T-SQL Fundamentals (16)
- Troubleshooting (105)
- Wait Types (236)