Author: Peter Whyte
-
SSMS Certificate Chain Not Trusted Error (Trust Server Certificate Fix)
🚨Part of the SQL Server Errors series, the exact messages and what actually causes them.In: Security You upgraded SSMS, sqlcmd or an application driver, and a connection that worked yesterday now fails with this. Nothing changed on the server: the client got stricter, and it now refuses the certificate it used to accept without checking.…
Written by
-
SQL Server Default Ports
Something cannot connect, or the firewall team wants a port number before they will open anything. Both questions have the same answer, and it is not a guess: ask the instance what it is listening on. TCP 1433 is right on a default instance nobody has touched, and it stops being right as soon as…
Written by
-
Check When SQL Server Was Last Restarted
Knowing when SQL Server last restarted is one of the simplest checks a DBA can perform, and one of the most useful. It immediately answers questions around patching, failovers, configuration changes, and unexplained behaviour. Before assuming anything else, confirming uptime is always worth doing first. This post shows the most reliable way to check SQL…
Written by
-
Using PowerShell to Get Last SQL Failover Time
When reviewing availability events on SQL Server, one of the first questions is often: Did the cluster move, and when? This post shows how to use PowerShell to retrieve the last Windows Failover Cluster role movement for a SQL Server instance by querying cluster event logs. It’s a fast, reliable way to confirm node-level failovers…
Written by
-
Enabling TCP Connections in SQL Server
A remote client cannot connect and the instance is running. The application reports Named Pipes Provider, error: 40 or SQL Network Interfaces, error: 26, and the first thing to rule out is the server not listening on TCP/IP at all. Check it with one query, turn it on in SQL Server Configuration Manager or PowerShell,…
Written by
-
How to Show Line Numbers in SSMS
🛠️Part of the SSMS Complete Guide, installing, configuring and fixing SQL Server Management Studio. In modern versions of SQL Server Management Studio, line numbers are enabled by default. If you are running SSMS 21 or newer, you will already see line numbers in query windows without changing anything. Older versions of SSMS did not enable…
Written by
-
How to Add Columns to Tables in SQL Server
Adding columns to tables in SQL Server is a routine task, but it is not always a harmless one. On small tables it is trivial. On large or business-critical tables, especially those involved in replication or heavy write workloads, it can introduce blocking, transaction log growth, or downstream latency if handled carelessly. This post walks…
Written by
-
How to Restore a Database in SQL Server
Restoring a database in SQL Server is a core DBA task. Whether you’re responding to an incident, performing disaster recovery testing, migrating data, or rebuilding an environment, restores need to be predictable, repeatable, and verifiable. This post walks through restoring a database using both T-SQL and SQL Server Management Studio, along with the checks that…
Written by
-
Why Is the Database in “In Recovery” Mode?
Seeing a database stuck in Recovery mode usually happens at the worst possible time. It often appears after a restart, a restore, or an unexpected shutdown, and the immediate question is always the same: Is this normal, or do I need to intervene? This post explains what recovery mode actually means, how to tell whether…
Written by
-
DBA Scripts: Get Database Mail and xp_cmdshell Configuration
🔧Part of the DBA-Tools Project, copy/paste SQL Server scripts and health checks.In: Security 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…
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)