October 2011
-
SQL Server: How to Ad-Hoc Query an Excel Spreadsheet using OpenRowset
Running an ad-hoc query from SQL Server SSMS to an Excel spreadsheet is amazingly straightforward using the OpenRowset command. Here’s how it’s done… For starters, copy the Excel spreadsheet to a location where the installed version of SQL Server can access it. This is necessary since your query in SSMS (SQL Server Management Studio) will…
-
SQL Server: Query All Clustered & NonClustered Indexes
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…
-
SQL Server: How to List the Full Properties of all Linked Servers
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…