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
SELECT SUBSTRING SQL command.

SQL SERVER – Find Location of Data File Using T-SQL

January 2, 2010
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Data Storage, SQL Scripts, SQL Server

A short T-SQL script that finds where your SQL Server Data File folder is on disk, using master.sys.master_files. Handy when you forget where the files live.

Read More
SQL SERVER - FIX: Error: 1807 Could not obtain exclusive lock on database 'model'. Retry the operation later.

SQL SERVER – FIX: Error: 1807 Could not obtain exclusive lock on database ‘model’. Retry the operation later.

January 1, 2010
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts

Error 1807 says SQL Server could not obtain an exclusive lock on database ‘model’ during CREATE DATABASE. The fix that worked for me takes seconds.

Read More
A weather vane on a barn roof caught mid-spin with motion blur, against a flat grey sky.

SQL SERVER – Fix Error 1949, Level 16: Cannot create index on view. The function yields nondeterministic results

December 30, 2009
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server, SQL View

Fix Error 1949: cannot create index on view because a function yields nondeterministic results. A training attendee hit it; removing that function solved it.

Read More
SQL SERVER - Get Date of All Weekdays or Weekends of the Year

SQL SERVER – Get Date of All Weekdays or Weekends of the Year

December 29, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

Tejas Shah’s easy script to list the date of all weekdays or weekends of a year with a recursive CTE, first written to find every Sunday of 2010.

Read More
A compact canvas tool roll holds several tools beside an empty fitted pocket.

Which Features You Lose When You Drop an Edition

December 27, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Server, SQL Server Installation

Review SQL Server edition features before moving down an edition, check persisted dependencies, and test maintenance and availability behavior.

Read More
Gouache painting: two chains of equal length are pinned between the same pair of wooden posts

DATETIME2FROMPARTS: Match Fractions to Precision

December 26, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server

DATETIME2FROMPARTS constructs a complete typed timestamp. Match fraction units to precision and preserve valid calendar components.

Read More
SQL SERVER - CDC and TRUNCATE - Cannot truncate table because it is published for replication or enabled for Change Data Capture

SQL SERVER – CDC and TRUNCATE – Cannot truncate table because it is published for replication or enabled for Change Data Capture

December 25, 2009
Pinal Dave
SQL Tips and Tricks
Change Data Capture, SQL Error Messages, SQL Scripts, SQLAuthority Author Visit

Does CDC capture a TRUNCATE? No. On a table enabled for Change Data Capture you get Msg 4711: Cannot truncate table. I recreate the error step by step.

Read More
Previous 1 … 446 447 448 449 450 451 452 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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