The script within this post, outputs a list of each DATETIME and SMALLDATETIME field within a database, along with the minimum and maximum values. Useful to identify tables that have a date created or updated column, and you want to find out if they are still being used.
If you need to find out if a database is being used (or when it was last updated), a useful script contained within this post, will return the maximum date for each and every date/time field within all tables in the current database
I wanted to produce a list of the MAX of date fields (DateTime, SmallDateTime, TimeStamp) for all tables within all databases held in an instance of SQL Server.
The script below was written for SQL Server 2000, but should be easily customisable for SQL Server 2005
The Transact-SQL script in this post returns a list of tables and a count of the number of records within each table.
The script in this post can be used to extract a list of databases along with the files associated with each database. The size (according to SQL Server) is also returned in pages and bytes.
Useful script to generate a list of tables for all the databases on a server
The query in this post return a list of Table Name, Column Name, and Column ID for all Primary Key columns within a database
Script to return a list of database tables (the schema and table name) along with a count of the records within each table. This can come in useful if you are trying to compare databases.