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 - Move Database Files MDF and LDF to Another Location

SQL SERVER – Move Database Files MDF and LDF to Another Location

October 28, 2012
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Scripts, SQL Server, Transaction Log

Your new database sits in the default location and keeps growing. Here is how to move the MDF and LDF database files to another disk or drive.

Read More
Punch needle beside a continuous stitched row with its last loose loop withdrawn

Gapless Invoice Numbers That Restart Every Year

October 25, 2012
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Transactions

Finance hates a missing invoice number. A small counter table and one short transaction keep the numbers gapless and restart them each year.

Read More
SQL SERVER - Order By Numeric Values Formatted as String

SQL SERVER – Order By Numeric Values Formatted as String

October 23, 2012
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL String

A column holds alphanumeric values that start with a number, and ORDER BY sorts them as text. Here is how to sort the rows by the Numeric part instead.

Read More
A roofer laying overlapping wooden shingles: one long continuous run, a bare gap, then a short second run.

Merging Overlapping Date Ranges Into Continuous Periods

October 22, 2012
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL DateTime, SQL Scripts, SQL Server

Use running end dates when merging overlapping ranges, choose boundary rules, and return continuous periods without losing nested intervals.

Read More
An aquarium built into a wall between two rooms, the same fish seen from both sides as a hand feeds them.

FileTable: Files You Can Open in Explorer and Query in T-SQL

October 19, 2012
Pinal Dave
SQL Tips and Tricks
Filestream, SQL Backup and Restore, SQL Data Storage, SQL Server

Set up FileTable prerequisites, create a Windows-accessible file namespace, query stored file metadata, and compare simpler path storage.

Read More
A hand holding a steel punch over a new silver spoon on an anvil, ready to stamp its maker's mark.

Audit Columns From Day One: CreatedAt, UpdatedAt and Who Changed It

October 17, 2012
Pinal Dave
SQL Tips and Tricks
SQL Audit, SQL Constraint and Keys, SQL DateTime, SQL Server, SQL Trigger

Add audit columns with UTC timestamps and trusted change identities, maintain updates in procedures, and know when history is needed.

Read More
A wooden bee hotel of hollow tubes on a garden wall, each tube sealed separately, one bee landing at its own.

A Multi-Tenant Schema With a TenantId Column: Keys, Indexes and Safety

October 16, 2012
Pinal Dave
SQL Tips and Tricks
Schema, SQL Constraint and Keys, SQL Index, SQL Server, SQL Server Security

Design a multi-tenant schema with composite keys, tenant-first indexes, trusted session context, and row-level security checks.

Read More
Previous 1 … 323 324 325 326 327 328 329 … 455 Next
  • Books
  • Testimonials
  • Privacy Policy

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