A reader still got Msg 35250 after my first post, with no mirroring login error in the ERRORLOG. Here are the endpoint and service account checks I asked for.
How to Count Week Days Between Two Dates? – Interview Question of the Week #132
How do you count Week Days between two dates in SQL Server? Here is a short script I built from scratch using spt_values and DATEPART.
SQL SERVER – Interesting Observation – Count of Temporary Table Re-generations
A workshop attendee asked how to know the count of temporary table re-generations for a single temp table. Here is how I find it.
SQL SERVER – How to See Scripts Executing in sp_executesql?
How can you see the scripts executing in sp_executesql without an extra SELECT result set? A reader asked me, and here is the simple answer.
How to Pass Parameters to a Stored Procedure in SQL Server
To pass parameters to a stored procedure, write the values after EXEC without parentheses, and name each parameter so the order can’t matter. This post builds a small order procedure and calls it by position and by name, with defaults, an OUTPUT value and a table-valued parameter. It also shows the three errors people hit first and what each one means.
SQL SERVER – Running CHECKDB with Minimum Repair Level
CHECKDB found 39 consistency errors and said repair_allow_data_loss is the Minimum Repair Level, but the reader could not finish the repair. Here is my reply.





