A query that runs fast in Management Studio and slow in a .NET application often runs under two different plans, because the two connections use different ARITHABORT settings. This post shows both plans in the plan cache, measures the cost, and explains how to set ARITHABORT ON for all connections through the server’s default connection options.
How to Identify Process ID for SQL Server Services? – Interview Question of the Week #185
How do you find the Process ID for SQL Server services? One quick query on sys.dm_server_services returns the process id, status, last startup time and account.
SQL SERVER – Scoped Firewall Rules Instead of Disabling the Firewall
A firewall rule should permit the required SQL Server or management connection narrowly. My original automation case needed remote access.
Generate a Random Password in SQL Server Using T-SQL
To generate a random password in T-SQL, draw bytes from CRYPT_GEN_RANDOM, pick characters from a safe pool and shuffle them. This post builds one procedure that guarantees upper case, lower case, a digit and a symbol, skips look-alike characters, and proves it on 1,000 passwords. It also explains why ABS(CHECKSUM(NEWID())) can fail with an overflow error.
How to Check Status of Instant File Initialization? – Interview Question of the Week #184
Here are two quick ways to check status of Instant File Initialization: read the error log, or query sys.dm_server_services on SQL Server 2016 and later.
SQL SERVER – How to Check If Instant File Initialization Enabled or Not?
Is Instant File Initialization enabled on your server? Before SQL Server 2016 there was no quick answer, but from 2016 onward you can check it in seconds.






