After a power failure, a client’s SQL Server service stayed down even though it was set to Automatic. Here is why automatic startup can fail and what to check.
COL_NAME Function in SQL Server: Get a Column Name by ID
The COL_NAME function returns a column’s name when you give it a table’s object ID and the column’s ID. This post uses it to turn the column IDs in index views into names, shows why a column ID is not a position once a column has been dropped, and explains the trap that returns a wrong name when the table lives in another database.
How is Oracle Temporary Table Different from SQL Server? – Interview Question of the Week #133
How is an Oracle temporary table different from SQL Server temp tables? A question from our hiring interviews, with the syntax on both sides.
How to Check if a Column Exists in a SQL Server Table
To check if a column exists in a SQL Server table, call COL_LENGTH and test the result for NULL, or look the column up in sys.columns. This post compares the three common checks, including the schema trap in INFORMATION_SCHEMA and the three-part name for another database. It ends with a script that adds a column only when it is missing, and the batch rule that makes that script fail if you ignore it.
SQL SERVER – View Column Dependencies and Output Columns
To Identify Columns used in a view, I distinguish references from returned output columns. Those lists answer different questions.
EXECUTE AS LOGIN vs EXECUTE AS USER: Where Impersonation Stops
Your test passed as a user, yet the sales team still gets an error. Here is where each kind of impersonation stops, and how to get back out.





