SQL Server 2008 records when it started in sys.dm_os_sys_info. One SELECT of sqlserver_start_time gives you the SQL Server start time. It does not work on 2005.
SQL SERVER – Introduction to SERVERPROPERTY and example
SERVERPROPERTY is a handy system function that returns server values like collation, edition and instance name. My script lists every property in one result.
SQL SERVER – 2008 – Inline Variable Assignment
SQL Server 2008 adds inline variable assignment, so DECLARE @MyVar INT = 5 works in one line. I compare it with the SQL Server 2005 way of DECLARE then SET.
SQLAuthority News – 600 Article and Over 3 Million Readers
Today is the 600th article on this blog, and over 3 Million readers have visited so far. Thank you. Send me your ideas, and see my favorite and best articles.
SQL SERVER – 2008 – Introduction to Policy Management – Enforcing Rules on SQL Server
Use Policy Management in SQL Server 2008 to enforce rules, not just list them. A short tutorial that blocks any stored procedure created without the usp prefix.
DATETRUNC: Use ISO Week Boundaries With Explicit Date Types
DATETRUNC can give an ISO week its Monday boundary without changing session settings. I also keep the input date type explicit. A boundary calculation should reveal both its calendar rule and its return type.
STRING_AGG Order: Keep NULLs and Type Width Visible
STRING_AGG order belongs inside WITHIN GROUP. This example preserves duplicate labels, shows how NULL differs from empty text and casts to nvarchar(max) before aggregation.







