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
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
SQL SERVER - Effect of TRANSACTION on Local Variable - After ROLLBACK and After COMMIT

SQL SERVER – Effect of TRANSACTION on Local Variable – After ROLLBACK and After COMMIT

September 25, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Transactions

What is the effect of a TRANSACTION on local variable values after ROLLBACK and after COMMIT? A short example I wrote for a Jr. Developer shows the answer.

Read More
Previous 1 … 533 534 535 536 537 538 539 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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