The start of my Data Warehousing Interview Questions and Answers series, beginning with the basics: what is data warehousing and why companies use it.
SQL SERVER – 2005 – Server and Database Level DDL Triggers Examples and Explanation
DDL triggers fire when someone changes the schema. How to write one, what EVENTDATA gives you, and how to get back in if one locks you out.
SQL SERVER – UDF – Function to Get Previous And Next Work Day – Exclude Saturday and Sunday
Inspired by a ColdFusion post by Ben Nadel, here is the UDF I use to get the previous or Next Work Day for any date, skipping Saturday and Sunday.
SQL SERVER – UDF – Get the Day of the Week Function
Get the day of the week as a name in SQL Server: a UDF using DATEPART with CASE, plus the simpler DATENAME(dw, GETDATE()) a reader suggested.
Grouping Current Connections by Program Name and Host Name
Group connections by program name, host, and login, then inspect client addresses and idle sessions without trusting client labels blindly.
SQL SERVER – SPACE Function Example
Does SQL Server have a SPACE function? Yes. SELECT SPACE(100) returns 100 spaces, and a short example uses it to join last and first names.
SQL SERVER – Restore Database Without or With Backup – Everything About Restore and Backup
Everything about restore and backup readers ask: can you restore without a backup? No. Here is the right restore order and a plan to stay safe.










