SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

The Ultimate Index Lister (Non-Pivoted)

By Jesse Roberge, 2008/10/07

Total article views: 2404 | Views in the last 30 days: 37

Util_ListIndexes_Columns
By Jesse Roberge - YeshuaAgapao@Yahoo.com
Update - Fixed existance check for drop

Lists details for all indexes on one or more tables / schemas, including row count and size.
If you want one row per index instead of one row per member column at the expense of data type and other column information,
then use Util_ListIndexes instead.

Update 2009-01-14:
Added IndexDepth and FillFactor output columns
Removed duplicate output of 'is_unique'

Required Input Parameters
none

Optional Input Parameters
@SchemaName sysname='' Filters to a single schema. Can use LIKE wildcards. All schemas if blank. Accepts LIKE Wildcards.
@TableName sysname='' Filters to a single table. Can use LIKE wildcards. All tables if blank. Accepts LIKE Wildcards.

Usage
EXECUTE Util_ListIndexes_Columns 'dbo', 'Cart'

Copyright:
Licensed under the L-GPL - a weak copyleft license - you are permitted to use this as a component of a proprietary database and call this from proprietary software.
Copyleft lets you do anything you want except plagarize, conceal the source, proprietarize modifications, or prohibit copying & re-distribution of this script/proc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

see <http://www.fsf.org/licensing/licenses/lgpl.html> for the license text.

By Jesse Roberge, 2008/10/07

Total article views: 2404 | Views in the last 30 days: 37
Your response
 
 
Related Articles
FORUM

Retrieve column headers for INFORMATION_SCHEMA

Get INFORMATION_SCHEMA column headers

SCRIPT

The Ultimate Duplicate Index Finder

Searches database-wide for multiple indexes in the same table which has the same column as the first...

FORUM

WildCard Expression

Use Wildcard instead of repeating each expression possibility

FORUM
SCRIPT

The Ultimate Index Lister (Pivoted)

Lists details for all indexes on one or more tables / schemas, including row count and size. This ve...

 
Contribute

Free registration required...

To read the rest of this article, and access thousands of other articles, we ask you to register on the site and subscribe to our newsletters.

Login (existing users)

Login

Email:   Password:   Remember me: Forgotten your password?

Register (new users)

Register

Email:   Password:
Confirm:

Subscribing to our newsletters gets you:

  • ALL of our content (thousands of articles, scripts, and forum postings)
  • A daily newsletter (example)
  • A weekly news round up (example)
  • The opportunity to ask and answer questions in our forums
  • A daily Question of the Day to test and help you increase your knowledge of SQL Server.

Steve Jones
Editor, SQLServerCentral.com