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 - Fix: Error: Msg 1904, Level 16 The statistics on table has 33 column names in statistics key list. The maximum limit for index or statistics key column list is 32

SQL SERVER – Fix: Error: Msg 1904, Level 16 The statistics on table has 33 column names in statistics key list. The maximum limit for index or statistics key column list is 32

December 11, 2011
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Statistics

Statistics can use up to 32 columns, while an index key is limited to 16. Here is Msg 1904 with a quick demo of 33 versus 32 columns.

Read More
SQL SERVER - Fix: Error: File Cannot be Loaded Because the Execution of Scripts is Disabled on This System

SQL SERVER – Fix: Error: File Cannot be Loaded Because the Execution of Scripts is Disabled on This System

November 30, 2011
Pinal Dave
SQL Tips and Tricks
PowerShell, SQL Error Messages, SQL Scripts, SQL Server

After a fresh install, PowerShell stopped me with an error: execution of scripts is disabled on this system. The fix takes two lines with Set-ExecutionPolicy.

Read More
SQL Server SQL Server Express Edition startup parameters.

SQL SERVER – Dedicated Access Control for SQL Server Express Edition – An error occurred while obtaining the dedicated administrator connection (DAC) port.

October 23, 2011
Pinal Dave
SQL Interview Questions and Answers
SQL Error Messages, SQL Server Express

Connecting to SQL Server Express failed while obtaining the dedicated administrator connection (DAC) port. Here is why it happens and how to fix it.

Read More
A grid of two cases: when Plan A works the UPDATE runs, Plan A worked is printed and CATCH is skipped; when Plan A fails the UPDATE raises error 515, the rest of TRY is skipped and CATCH prints Plan B with error 515, severity 16, line 2

TRY CATCH Block in SQL Server: Plan A, Plan B and the Rollback

August 28, 2011
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL Transactions

A TRY CATCH block runs Plan A and falls back to Plan B when Plan A raises an error. This post shows that CATCH runs only after an error, that severity 11 is the line between a message and an error, and that one ROLLBACK undoes a nested transaction completely. Every result comes from SQL Server 2025.

Read More
Two columns of messages: errors SQL Server raises itself, 2714 and 515 at level 16 and 3701 at level 11, and errors you raise yourself with RAISERROR and THROW, 50000 and 50001 at level 16, plus a severity 10 note that is only a message

Raise Your Own Error in SQL Server: When Valid Code Breaks a Rule

August 27, 2011
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL Stored Procedure

Raise your own error in SQL Server when a valid statement breaks a rule you care about. This post shows three errors SQL Server raises itself, one error that depends on what exists in the database, and how RAISERROR and THROW turn an update of zero rows into a clear message. Every result comes from SQL Server 2025.

Read More
Three states of a view of invoices over 2,000: five rows at the start, five rows after one update that subtracts 150, and four rows after a second run, with invoice 1 at 1,900 in the table but missing from the view

WITH CHECK OPTION in SQL Server: Stop Rows Leaving a View

August 24, 2011
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Trigger, SQL View

WITH CHECK OPTION stops a change made through a view from pushing a row out of that view. This post builds a view of large invoices, shows an update and an insert that make rows vanish, adds the option to block both with Msg 550, and compares it with a trigger. Every result comes from SQL Server 2025.

Read More
Three rules for creating a view with the error each one raises: name every column (Msg 4511), keep column names unique (Msg 4506), and leave out ORDER BY (Msg 1033)

Create a View in SQL Server: Column Rules and Encryption

August 23, 2011
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server Encryption, SQL View

To create a view in SQL Server you save a SELECT statement under a name. This post builds a view over a small donations table, shows the three rules behind the most common view errors, and tests four ways to read a view’s code before and after WITH ENCRYPTION. Every result comes from SQL Server 2025.

Read More
Previous 1 … 93 94 95 96 97 98 99 … 117 Next
  • Books
  • Testimonials
  • Privacy Policy

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