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 - DBCC SHRINKFILE Takes Long Time to Run

SQL SERVER – DBCC SHRINKFILE Takes Long Time to Run

July 25, 2008
Pinal Dave
SQL Performance
SQL Server DBCC

Why does DBCC SHRINKFILE take so long when index rebuilds run faster? It is single threaded. Rebuild indexes first and the shrink takes less time.

Read More
SQL SERVER - 2005 -Track Down Active Transactions Using T-SQL

SQL SERVER – 2005 -Track Down Active Transactions Using T-SQL

July 24, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table, SQL Transactions

Want to track down active transactions in your database? One simple DMV query on sys.dm_tran_session_transactions returns them in SQL Server 2005.

Read More
Log File Viewer - SQL.

SQL SERVER – Introduction to Log Viewer

July 23, 2008
Pinal Dave
SQL Tips and Tricks
SQL Server Security, SQL Utility

The SQL Server 2005 Log Viewer shows SQL Server error logs, Agent logs, Database Mail and Windows event logs in one place, ready to filter and export.

Read More
SQL SERVER - Clear SQL Server Memory Caches

SQL SERVER – Clear SQL Server Memory Caches

July 22, 2008
Pinal Dave
SQL Performance
SQL Scripts, SQL Server DBCC

Need to clear SQL Server memory caches on a production server you cannot restart? Three DBCC commands free up memory by cleaning the cache.

Read More
SQL SERVER - FIX - ERROR : 9004 An error occurred while processing the log for database. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.

SQL SERVER – FIX – ERROR : 9004 An error occurred while processing the log for database. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.

July 21, 2008
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Data Storage, SQL Error Messages, SQL Scripts

Error 9004 means an error occurred while processing the log for database, so it will not attach. Here are the steps that worked for me, starting with emergency mode.

Read More
Uneven cheese portions balance equally because the wider piece contains large holes.

Splitting a Big Table Into Equal Key Ranges for Batch Work

July 21, 2008
Pinal Dave
SQL Performance
Batch, Ranking Functions, SQL Paging, Temp Table

Equal-width key ranges fail when ids have gaps. NTILE cuts by row count instead, so every worker gets a fair share of the table.

Read More
Diagram of two SQL Server instances, each with a Service Broker holding Message, Contract and Service, joined by a dialog conversation; the two BrokerEndpoint boxes talk over TCP and the LISTENER_PORT value 5000 is marked in red

Change Service Broker Port: Drop and Recreate the Endpoint

July 20, 2008
Pinal Dave
SQL Tips and Tricks
Service Broker, SQL Scripts, SQL Server

Service Broker hit error 9692 because another application used its port. To change Service Broker port, drop the endpoint and create it again on a new port. Both scripts are here.

Read More
Previous 1 … 755 756 757 758 759 760 761 … 849 Next
  • Books
  • Testimonials
  • Privacy Policy

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