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
A barn with a high open hayloft door, one ladder in plain view and two more half hidden around the side.

Auditing Who Has sysadmin

January 16, 2008
Pinal Dave
SQL Tips and Tricks
DBA, SQL Audit, SQL Login, SQL Server Security

Audit who has sysadmin in SQL Server, including direct members and Windows groups, then investigate nested access and forgotten logins.

Read More
Four open wooden toolboxes side by side, each holding a different kind of tool.

SQL SERVER – What is – DML, DDL, DCL and TCL – Introduction and Examples

January 15, 2008
Pinal Dave
SQL Tips and Tricks
Database

What are DML, DDL, DCL and TCL? A short introduction to the four groups of SQL commands, with examples like SELECT, CREATE, GRANT and COMMIT.

Read More
SQL SERVER - Time Out Due to Executing DELETE on Large RecordSet

SQL SERVER – Time Out Due to Executing DELETE on Large RecordSet

January 14, 2008
Pinal Dave
SQL Performance
SQL Scripts

Why does a DELETE on large recordset time out? When you want every row gone, use TRUNCATE instead, but keep in mind it resets the identity value.

Read More
Two ivory trays hold separate groups of small blue and cream ceramic dishes.

Conditional COUNT: ELSE 0 Counts Nonmatching Rows

January 13, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Reports, SQL Scripts, SQL Server

Conditional COUNT includes zero when CASE returns it. I compare an omitted ELSE with a zero branch before aggregating. A no-match group and an empty input expose the difference from SUM.

Read More
SQL SERVER - 2005 - Change Compatibility Level - T-SQL Procedure

SQL SERVER – 2005 – Change Compatibility Level – T-SQL Procedure

January 12, 2008
Pinal Dave
SQL Tips and Tricks
Compatibility Level, SQL Scripts

The safe way to change compatibility level in SQL Server 2005: single user mode, sp_dbcmptlevel, then multi user again, and how to check it.

Read More
A gouache cabinet shows usable space reclaimed inside an unchanged drawer, with removed dividers set aside.

SQL SERVER – Reclaim Space After Dropping Variable – Length Columns Using DBCC CLEANTABLE

January 11, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server DBCC, SQL System Table

DBCC CLEANTABLE can reclaim selected space left after dropping variable-length columns. I distinguish that table operation from shrinking a database file.

Read More
SQL SERVER - 2005 - Display Fragmentation Information of Data and Indexes of Database Table

SQL SERVER – 2005 – Display Fragmentation Information of Data and Indexes of Database Table

January 10, 2008
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Scripts, SQL Server DBCC, SQL System Table

How do you find Fragmentation Information for a table in SQL Server 2005? DBCC SHOWCONTIG has limits, so I use sys.dm_db_index_physical_stats instead.

Read More
SQL SERVER - Execute Same Query and Statement Multiple Times Using Command GO

SQL SERVER – Execute Same Query and Statement Multiple Times Using Command GO

January 9, 2008
Pinal Dave
SQL Performance
SQL DateTime, SQL Scripts

Need to run the same statement several times without copy and paste? Put a number after the command GO, like GO 5, and SQL Server runs the batch that many times.

Read More
Matching enamel chips clipped in pairs, with a similar pair kept apart and linked by a loose thread.

Matching Two Customer Lists When Names and Emails Are Messy

January 8, 2008
Pinal Dave
SQL Tips and Tricks
Ad Hoc Query, Duplicate Records, SQL Joins, SQL String, Temp Table

Clean the text, climb from safe rules to fuzzy ones, and keep one best answer per subscriber. A ladder of joins you can paste into SSMS today.

Read More
SYNONYM' SQL Server Tool Window.

SQL SERVER – 2005 – Introduction and Explanation to SYNONYM – Helpful T-SQL Feature for Developer

January 7, 2008
Pinal Dave
SQL Performance
SQL Scripts

SQL Server 2005 added SYNONYM, a single-part name that replaces a long four part object name. I explain how it saves typing and shields code from changes.

Read More
Previous 1 … 543 544 545 546 547 548 549 … 590 Next
  • Books
  • Testimonials
  • Privacy Policy

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