This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - 2008 - SQL Server Start Time

SQL SERVER – 2008 – SQL Server Start Time

June 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

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.

Read More
SQL SERVER - Introduction to SERVERPROPERTY and example

SQL SERVER – Introduction to SERVERPROPERTY and example

June 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

SERVERPROPERTY is a handy system function that returns server values like collation, edition and instance name. My script lists every property in one result.

Read More
SQL SERVER - 2008 - Inline Variable Assignment

SQL SERVER – 2008 – Inline Variable Assignment

June 15, 2008
Pinal Dave
SQL Performance
SQL Scripts

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.

Read More
SQLAuthority News - 600 Article and Over 3 Million Readers

SQLAuthority News – 600 Article and Over 3 Million Readers

June 14, 2008
Pinal Dave
SQLAuthority News
Database, DBA

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.

Read More
SQL SERVER - 2008 - Introduction to Policy Management - Enforcing Rules on SQL Server

SQL SERVER – 2008 – Introduction to Policy Management – Enforcing Rules on SQL Server

June 13, 2008
Pinal Dave
SQL Tips and Tricks
Policy Management, SQL Coding Standards, SQL Scripts, 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.

Read More
Six unmarked stone tiles in a row in front of a plain wooden strip.

DATETRUNC: Use ISO Week Boundaries With Explicit Date Types

June 12, 2008
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

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.

Read More
Slate-blue and sage ribbon loops around a wooden spindle, with a cream loop and vermilion end.

STRING_AGG Order: Keep NULLs and Type Width Visible

June 11, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Group By, SQL Server, SQL String

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.

Read More
Previous 1 … 755 756 757 758 759 760 761 … 843 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com