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 - 2005 - Retrieve Any User Defined Object Details Using sys objects Database

SQL SERVER – 2005 – Retrieve Any User Defined Object Details Using sys objects Database

March 16, 2008
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL System Table, SQL Utility

The sys.objects catalog view has a row for every schema-scoped object, so you can retrieve any user defined object details, like foreign keys, by object type.

Read More
SQL SERVER - 2005 - Retrieve Processes Using Specified Database

SQL SERVER – 2005 – Retrieve Processes Using Specified Database

March 15, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

Jim Sz shared a quick script to retrieve processes that use a specific database from sys.sysprocesses, with spid, status, host name and login.

Read More
Database files listing.

SQL SERVER – Get a Row Per File of a Database as Stored in the Master Database

January 21, 2008
Pinal Dave
SQL Tips and Tricks
Database, SQL Scripts, SQL Server, SQL System Table

Each database has at least two files. This quick script on sys.master_files returns a row per file of a database, just as it is stored in master.

Read More
A gouache cabinet shows usable space reclaimed inside an unchanged drawer, with removed dividers set aside.

SQL SERVER – Reclaim Space After Dropping Variable – Length Columns Using DBCC CLEANTABLE

January 11, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Server DBCC, SQL System Table

DBCC CLEANTABLE can reclaim selected space left after dropping variable-length columns. I distinguish that table operation from shrinking a database file.

Read More
SQL SERVER - 2005 - Display Fragmentation Information of Data and Indexes of Database Table

SQL SERVER – 2005 – Display Fragmentation Information of Data and Indexes of Database Table

January 10, 2008
Pinal Dave
SQL Performance
SQL DMV, SQL Index, SQL Scripts, SQL Server DBCC, SQL System Table

How do you find Fragmentation Information for a table in SQL Server 2005? DBCC SHOWCONTIG has limits, so I use sys.dm_db_index_physical_stats instead.

Read More
SQL SERVER - 2005 - Last Ran Query - Recently Ran Query

SQL SERVER – 2005 – Last Ran Query – Recently Ran Query

January 3, 2008
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Scripts, SQL System Table

Want to see the last ran query on SQL Server 2005? This quick script uses sys.dm_exec_query_stats to list recent queries with the time each one ran.

Read More
Two loaves from the same recipe cool on a rack, one tall and golden, the other low and pale.

Comparing Server Settings Across Instances

November 15, 2007
Pinal Dave
SQL Tips and Tricks
DBA, SQL Server, SQL Server Configuration, SQL System Table

Comparing server settings across SQL Server instances shows configured and live values, so you can judge which differences affect a workload.

Read More
Previous 1 … 12 13 14 15 16 17 18 Next
  • Books
  • Testimonials
  • Privacy Policy

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