Author: Peter Whyte
-
Forcing Encrypted Connections in SQL Server Using Certificates
In the previous post, we looked at how to verify what protocol and encryption SQL Server is actually using at runtime. That answers the question: What is happening on the wire right now? This post answers a different one: How do I make sure every TCP connection is encrypted, every time? Forcing encryption in SQL…
Written by
-
Difference Between DELETE and TRUNCATE in SQL Server
When someone asks: “What’s the difference between DELETE and TRUNCATE?” Most answers stop at: That is technically correct. It is also not enough. In production environments, choosing between DELETE and TRUNCATE is not about syntax. It is about: This post focuses on the production impact, not the textbook answer. Quick Technical Comparison Feature DELETE TRUNCATE…
Written by
-
Backing Up a SQL Server Database with Encryption
Encrypted backups are no longer optional in most environments. If backups leave the server, land on shared storage, or are retained long-term, unencrypted backups are a data leak waiting to happen. SQL Server has supported native backup encryption since SQL Server 2012, but the mechanics still catch DBAs out. usually during a restore, not a…
Written by
-
Troubleshooting Database Mirroring Issues in SQL Server
Database Mirroring is deprecated, but you will still see it in many production environments. It was officially marked deprecated in SQL Server 2012 and has remained in that state for well over a decade. In my own career as a DBA, it has been “deprecated” the entire time, yet still widely deployed and fully supported.…
Written by
-
Get Current Date & Time in SQL Server
Getting the current date and time in SQL Server is straightforward. Choosing the correct function for your workload is what matters. Whether you’re stamping audit rows, logging ETL runs, or investigating production issues, SQL Server exposes several built-in functions with different precision and return types. All of these functions use the Windows OS clock of…
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
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Security Msg 300 · Level 14 · State 1 VIEW SERVER STATE permission was denied on object ‘server’, database ‘master’. Msg 297, Level 16, State 1 The user does not have permission to perform this action. ⚡GRANT VIEW SERVER STATE…
Written by
-
How to Get the SQL Server IP Address
The firewall team, or a vendor, wants the exact IP address and port before they will open an allow-list rule, and the server has more than one address. Do not read it off ipconfig and do not assume 1433: ask SQL Server which address and port the connection actually arrived on. ⚡On a TCP connection,…
Written by
-
SQL Server Error Severities Explained
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them. ⚡Read the Level before you read the message. 0 to 10 is informational, 11 to 16 means the statement is wrong and the server is fine, 17 to 19 is a resource limit or an engine fault and it is…
Written by
-
How to Right-Size SQL Server Database Files
Auto-growth is not the problem. Unplanned, reactive growth is. When a file is undersized SQL Server extends it repeatedly under load, every extension is a pause, and if those pauses land in the peak hour they show up as latency, I/O pressure and the occasional application timeout. Right-sizing is about making growth rare, predictable and…
Written by
- SQL Server Row-Level Security: The Filter Does Not Stop Cross-Tenant Writes
- View the Definition of a Stored Procedure in SQL Server
- TempDB Is Full or Still Growing: Find What Is Using It, Right Now
- SQL Server Service Will Not Start: Error 17113, 17058, 1067 and Where the Real Reason Is
- How to Move TempDB Files in SQL Server
- RAND() vs NEWID() in SQL Server
- Backups & Recovery (17)
- DBA Scripts (151)
- High Availability (HA) (12)
- Installation & Configuration (49)
- Maintenance (25)
- Migration & Upgrades (14)
- Monitoring (9)
- Performance Tuning (37)
- Security (Encryption & Permissions) (20)
- Storage & Capacity (16)
- T-SQL Fundamentals (15)
- Troubleshooting (94)
- Wait Types (235)