Justin Cooney

Web Development Tips and Examples

Category: SQL

  • A great way to review all of the Clustered and NonClustered Indexes set up for a particular database is to query the SQL Server system tables. The sys.tables table contains the full list of tables for your database, and the sys.indexes table contains the full list of indexes. Simply join the two on their object_id…

  • What is the best way to see the full properties of all of the Linked Servers in SQL Server in one go? A SQL query is naturally the best way using SQL Server’s system tables! UI-Based Solutions: The properties view in the SSMS UI does not show sufficient information about the set-up and history of…

  • There are three commands that can be used in SQL Server to query version information or information about the server hosting SQL Server. These commands can be run in SSMS directly, or can be used in code, for example to tailor queries for a particular database version. The commands are xp_msver, @@Version, and sp_server_info. I…