How do you change owner of a database in SQL Server? Three ways, including ALTER AUTHORIZATION, which I prefer, and the deprecated sp_changedbowner.
How to Find Median in SQL Server? – Interview Question of the Week #116
There is no MEDIAN function in T-SQL. Here is an easy way to find median values in SQL Server 2012 and later, plus what median really means.
What is the Difference between SUSPECT and RECOVERY PENDING? – Interview Question of the Week #114
What is the difference between SUSPECT and RECOVERY PENDING? A reader moved databases to a new drive and they went into recovery pending. Here is why.
How to Find How Many Rows Each Query Returned Along with Execution Plan? – Interview Question of the Week #115
Want to see How Many Rows Each Query Returned along with its execution plan? Here is a query for it, and why reads and worker time matter more.
How to Get Status of Running Backup and Restore in SQL Server? – Interview Question of the Week #113
How do you check the status of running backup and restore operations? Here is the script I built to see every backup and restore running on the server.
Why to Use SQL Server Configuration Manager Over Services applet (services.msc)? – Interview Question of the Week #112
Why use SQL Server Configuration Manager Over Services applet (services.msc) to change a service account? The reasons, from permissions to passwords.
How to do Pagination in SQL Server? – Interview Question of the Week #111
How do you do pagination in SQL Server? A popular interview question. Instead of pulling every row into the app, here is a method that returns just one page.







