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 - 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
Master Database

SQL SERVER – Importance of Master Database for SQL Server Startup

October 31, 2007
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL System Table

I have received following questions. I will list all the questions here and answer them together.
What is the purpose of Master database?

Read More
SQL SERVER - 2005 - Get Current User - Get Logged In User

SQL SERVER – 2005 – Get Current User – Get Logged In User

October 27, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server Security, SQL System Table

How to get current user for a query in SQL Server 2005: SELECT SYSTEM_USER returns the name of the current context, which helps with debugging and security.

Read More
SQL SERVER - Get Permissions of My Username / Userlogin on Server / Database

SQL SERVER – Get Permissions of My Username / Userlogin on Server / Database

October 23, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server Security, SQL Stored Procedure, SQL System Table

Invited to review a big company’s schema, I wanted to know my own permissions without asking their DBA. fn_my_permissions shows them at server and database level.

Read More
SQL SERVER - Difference Between @@Version and xp_msver - Retrieve SQL Server Information

SQL SERVER – Difference Between @@Version and xp_msver – Retrieve SQL Server Information

October 22, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Stored Procedure, SQL System Table

SELECT @@Version gives the SQL Server version, edition and service pack in one string. I compare @@Version and xp_msver, which returns more server details.

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

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