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 - 2005 - Database Table Partitioning Tutorial - How to Horizontal Partition Database Table

SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table

January 25, 2008
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Scripts, SQL Server, Table Partitioning

A simple Table Partitioning tutorial for SQL Server 2005 that shows, step by step, how to horizontally partition a database table across two filegroups.

Read More
Database files listing.

SQL SERVER – Get a Row Per File of a Database as Stored in the Master Database

January 21, 2008
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server, SQL System Table

Each database has at least two files. This quick script on sys.master_files returns a row per file of a database, just as it is stored in master.

Read More
Two empty pale ceramic bowls beside a small terracotta pebble.

UNICODE: Supplementary Characters Depend on the Collation

January 18, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

UNICODE returns an integer for the first character, and supplementary-character support affects that integer. I make the collation explicit when interpreting those values. Otherwise the same visible input can produce a misleading comparison.

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
Previous 1 … 323 324 325 326 327 328 329 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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