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 - Find Name of The SQL Server Instance

SQL SERVER – Find Name of The SQL Server Instance

October 2, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Utility

SELECT @@SERVERNAME returns the name of the SQL Server instance. We used it in stored procedures that ran different logic on each server during a migration.

Read More
SQL SERVER - 2005 - OUTPUT Clause Example and Explanation with INSERT, UPDATE, DELETE

SQL SERVER – 2005 – OUTPUT Clause Example and Explanation with INSERT, UPDATE, DELETE

October 1, 2007
Pinal Dave
SQL Performance
SQL Scripts

The SQL Server 2005 OUTPUT clause returns the rows changed by INSERT, UPDATE or DELETE. Each OUTPUT clause example below shows how.

Read More
Gouache painting: a wooden jetty made of five floating pontoon sections lies on calm water in a row

LEN Versus DATALENGTH: Trailing Spaces and Unicode Bytes

September 30, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server

LEN versus DATALENGTH answers different length questions. Use explicit text types to check trailing spaces, Unicode bytes, empty values and NULL.

Read More
SQL SERVER - Two Connections Related Global Variables Explained - @@CONNECTIONS and @@MAX_CONNECTIONS

SQL SERVER – Two Connections Related Global Variables Explained – @@CONNECTIONS and @@MAX_CONNECTIONS

September 29, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Transactions

@@CONNECTIONS and @@MAX_CONNECTIONS explained: login attempts since SQL Server started versus the most simultaneous user connections allowed.

Read More
SQL SERVER - Introduction and Example for DATEFORMAT Command

SQL SERVER – Introduction and Example for DATEFORMAT Command

September 28, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts

I found DATEFORMAT in a Jr. DBA’s code. SET DATEFORMAT sets the order of month, day and year so SQL Server can read date strings in other formats.

Read More
A key that does not fit the padlock on a wooden crate marked BACKUP.

SQL SERVER – FIX : Error 3154: The backup set holds a backup of a database other than the existing database

September 27, 2007
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Data Storage, SQL Error Messages, SQL Scripts

Error 3154 says the backup set holds a backup of a database other than the existing database. Use WITH REPLACE in RESTORE, or drop the old database first.

Read More
A brass bell on a harbor pier post with its rope swinging, gulls lifting off the railing, boats moored beyond.

THROW or RAISERROR

September 26, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Stored Procedure, SQL Transactions

THROW or RAISERROR changes how SQL Server handles severity, formatting, and XACT_ABORT; choose the right pattern for new procedures.

Read More
Previous 1 … 792 793 794 795 796 797 798 … 842 Next
  • Books
  • Testimonials
  • Privacy Policy

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