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 doorstop holding an unattended heavy door and preventing a rug from passing

Finding Long Open Transactions With sys.dm_tran_database_transactions

April 26, 2019
Pinal Dave
SQL Tips and Tricks
Shrinking Database, Spatial Database, SQL Transactions, System Database

A forgotten BEGIN TRAN can pin your log for hours. Here is how to find the owner, read its age, and confirm the transaction is the reason.

Read More
Title card: Msg 2555: Cannot Move All Contents of File

SQL SERVER – Msg 2555: Cannot Move All Contents of File to Other Places to Complete the Emptyfile Operation

February 2, 2019
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Error Messages, SQL Scripts, SQL Server, SQL TempDB, Starting SQL

Removing extra TempDB files failed with Msg 2555: Cannot move all contents of file to other places to complete the emptyfile operation. Let me show you the steps.

Read More
Cannot Shrink Log File.

SQL SERVER – Cannot Shrink Log File 2 (SQLAuthorityDB_log) Because the Logical Log File Located at the End of the File is in Use

January 2, 2019
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Scripts, SQL Server, Transaction Log

From my shrink series: Cannot shrink log file because the logical log file located at the end of the file is in use. Here is what it means and what to do.

Read More
Title card: Logical Log Files Cannot Be Fewer Than 2

SQL SERVER – Cannot Shrink Log File Because Total Number of Logical Log Files

December 19, 2018
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Error Messages, SQL Scripts, SQL Server, Transaction Log

Cannot shrink log file because the total number of logical log files cannot be fewer than 2. Here is what the message means.

Read More
SQL SERVER - Information Message: Cannot shrink file in database to xxxx pages as it only contains yyyy pages.

SQL SERVER – Information Message: Cannot shrink file in database to xxxx pages as it only contains yyyy pages.

December 18, 2018
Pinal Dave
SQL Tips and Tricks
Shrinking Database, SQL Error Messages, SQL Scripts, SQL Server

A reader hardcoded 1 GB in my log shrink script and got: Cannot shrink file in database to xxxx pages as it only contains yyyy pages. I explain why it appears.

Read More
An intact swimring is partly deflated beside its disconnected pump

How to Shrink All the Log Files for SQL Server? – Interview Question of the Week #203

December 9, 2018
Pinal Dave
SQL Interview Questions and Answers
Shrinking Database, SQL Backup and Restore, SQL DMV, SQL Scripts, SQL Server

Question: How to Shrink All the Log Files for SQL Server? Here is the script, plus why you should shrink only log files and never data files.

Read More
An ink brayer leaving a new continuous track while earlier linen stays clean

Recording Who Granted What With a Database Audit Specification

August 11, 2018
Pinal Dave
SQL Tips and Tricks
Shrinking Database, Spatial Database, SQL Sample Database, System Database

Current permissions never say who changed them. Set up a small audit, run a grant, a revoke and a failed attempt, and read the events back.

Read More
Previous 1 2 3 4 5 6 Next
  • Books
  • Testimonials
  • Privacy Policy

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