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
Displaying AdventureWorks database files.

SQL SERVER – Shrinking NDF and MDF Files – A Safe Operation

January 25, 2009
Pinal Dave
SQL Performance
SQL Data Storage, SQL Scripts, SQL Server DBCC, SQL Server Security

Is shrinking NDF and MDF files safe? A reader asked if it causes data loss. It does not, but I explain why shrinking them is often not a good idea.

Read More
SQL SERVER - 2008 - 2005 - Find Longest Running Query - TSQL - Part 2

SQL SERVER – 2008 – 2005 – Find Longest Running Query – TSQL – Part 2

January 23, 2009
Pinal Dave
SQL Performance
Best Practices, SQL Scripts, SQL Server DBCC, SQL System Table

An updated script to find the longest running query in SQL Server 2005 and 2008, with the divide by zero error fixed and time now shown in milliseconds.

Read More
SQL Server performance query results.

SQL SERVER – Find Number of Rows and Disk Space Reserved – Using sp_spaceused Interesting Observation

January 14, 2009
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Function, SQL Scripts, SQL Server DBCC, SQL Stored Procedure, SQL Utility

sp_spaceused shows the row count of a table and the disk space reserved. Here is why its numbers looked wrong on AdventureWorks and how @updateusage fixed them.

Read More
SQL SERVER - 2008 - 2005 - Find Longest Running Query - TSQL

SQL SERVER – 2008 – 2005 – Find Longest Running Query – TSQL

January 2, 2009
Pinal Dave
SQL Performance
SQL Scripts, SQL Server, SQL Server DBCC, SQL Stored Procedure

My company owner asked which query runs longest and I found no ready script, so I wrote one: the Longest Running Query with its average and maximum time.

Read More
SQL SERVER - Check Database Integrity for All Databases of Server - DBCC CHECKDB

SQL SERVER – Check Database Integrity for All Databases of Server – DBCC CHECKDB

November 10, 2008
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Scripts, SQL Server, SQL Server DBCC

A quick script to check database integrity for all the databases on a server with DBCC CHECKDB and sp_msforeachdb, and how to read its output.

Read More
SQL SERVER - Refresh Database Using T-SQL

SQL SERVER – Refresh Database Using T-SQL

November 7, 2008
Pinal Dave
SQL Performance
SQL Scripts, SQL Server DBCC, SQL Stored Procedure

Can you refresh database in Object Explorer using a T-SQL query? No. But if cached objects changed, DBCC commands can clear the cache for you.

Read More
SQL SERVER - 2008 - Interview Questions and Answers - Part 8

SQL SERVER – 2008 – Interview Questions and Answers Part 8

September 19, 2008
Pinal Dave
SQL Interview Questions and Answers
Data Warehousing, Database, SQL Data Storage, SQL Function, SQL Index, SQL Scripts, SQL Server DBCC, SQL Utility

SQL Server 2008 Interview Questions and Answers Part 8 starts with Data Compression: how row compression and page compression work and save space.

Read More
Previous 1 … 8 9 10 11 12 13 14 … 16 Next
  • Books
  • Testimonials
  • Privacy Policy

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