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 - Disable Index - Enable Index - ALTER Index

SQL SERVER – Disable Index – Enable Index – ALTER Index

May 17, 2007
Pinal Dave
SQL Performance
SQL Index, SQL Scripts, SQL Server DBCC

When DTS, BCP or BULK INSERT needs an index out of the way, I prefer to disable index with ALTER INDEX and enable it again with REBUILD. AdventureWorks example.

Read More
SQL SERVER - Fix : Error 1205 : Transaction (Process ID) was deadlocked on resources with another process and has been chosen as the deadlock victim. Rerun the transaction

SQL SERVER – Fix : Error 1205 : Transaction (Process ID) was deadlocked on resources with another process and has been chosen as the deadlock victim. Rerun the transaction

May 16, 2007
Pinal Dave
SQL Performance
SQL Error Messages, SQL Scripts, SQL Server

Fix : Error 1205 : Transaction (Process ID) was deadlocked on resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Read More
SQL SERVER - Fix: Error 130: Cannot perform an aggregate function on an expression containing an aggregate or a subquery

SQL SERVER – Fix: Error 130: Cannot perform an aggregate function on an expression containing an aggregate or a subquery

May 16, 2007
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Function, SQL Scripts, SQL Sub Query

Error 130 says you cannot perform an aggregate function on an expression containing an aggregate, like AVG(COUNT()). A derived table gets around it.

Read More
SQL SERVER - Binary Sequence Generator - Truth Table Generator

SQL SERVER – Binary Sequence Generator – Truth Table Generator

May 15, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Utility

A script that builds a 512 row truth table with its decimal value and binary sequence, using CROSS JOINs on a bit table. Add or remove joins to resize it.

Read More
SQL SERVER - DBCC commands List - documented and undocumented

SQL SERVER – DBCC commands List – documented and undocumented

May 15, 2007
Pinal Dave
SQL Tips and Tricks
SQL Server DBCC, Undocumented SQL

The full list of documented and undocumented DBCC commands with their syntax, plus how DBCC TRACEON(2520) and DBCC HELP show all of them in Query Analyzer.

Read More
A tidy line of wooden artist mannequins where only the last one has a red bucket stuck on its head

Last Line of a SQL Script: The Joke Every DBA Has Lived

May 14, 2007
Pinal Dave
SQL Tips and Tricks
SQL Humor, SQL Scripts, SQL Server Management Studio, SQL Transactions

The last line of a SQL script decides whether your work is saved, rolled back, or still holding locks. Here are the classic endings and how to check them.

Read More
Gouache painting: in a gym corner, nine crisp foam tiles lock together into a perfect square

SQUARE: Expect a float Result From Numeric Inputs

May 14, 2007
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL NULL, SQL Server

SQUARE accepts numeric inputs convertible to float and returns float. Explicit decimal display keeps this small example readable without claiming exact decimal multiplication.

Read More
A tear-off desk calendar with its first and last pages of the month held apart by two brass paperweights.

SQL SERVER – Query to Find First and Last Day of Current Month – Date Function

May 13, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server, SQL Utility

One query to find the First and Last Day of Current Month in SQL Server, plus the last day of the previous month and the first day of the next.

Read More
SQL SERVER - UDF - Function to Parse AlphaNumeric Characters from String

SQL SERVER – UDF – Function to Parse AlphaNumeric Characters from String

May 13, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

UDF_ParseAlphaChars keeps only the alphanumeric characters in a string and strips everything else using PATINDEX and STUFF. A handy function, with a test.

Read More
SQL SERVER - 2005 - List all the database

SQL SERVER – 2005 – List all the database

May 12, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, Undocumented SQL

Several ways to list all the database names on a server, from sp_databases and sp_helpdb to sys.databases and sp_msForEachDB. I use sp_databases myself.

Read More
Previous 1 … 573 574 575 576 577 578 579 … 589 Next
  • Books
  • Testimonials
  • Privacy Policy

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