This script allows you to specify a method and a server (or multiple servers.) It will then execute the method on every database on the server. With very minor tweaking you could have it search for the servers, then call the server db script with each one, or add another nesting to call tables or […]
This is an update to sp_helpindex, it allows you to pass the table name and whether you want to retrieve clustered, nonclustered or primary key indexes for a table. Using the sp_msforeach table will allow you to do this for all tables in a database. Inserting the data into a table will allow you to […]
This script is intended for SQL Server professionals that needs to have a quick snapshot from an environment with all relevant information about the databases. It's a compilation from multiple scripts, and works in SQL Server 2000.I think that works on 7.0 too, but may have some compilation issues.Don´t forget to see the section MANUAL […]
This query will give you the table name and column name on which you have defined the primary key. You can use this to get columns on which the primary key is based. I find it very useful when i need to define the FK relationship for other tables in PowerDesigner. Try to do the […]
This script returns the Duplicate indexes on any database (if any). Compatible with SQL Server 2000 only. Latest update Checks for possible duplications and removes them. Further, additional fields are displayed to support decision making.