1. sp_helpdb '<db name.>'
2. SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
3. SELECT OBJECT_NAME(id), rowcnt
FROM sysindexes WHERE indid IN (0,1) *
4. SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'VIEW'
5. SELECT COUNT(*) FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE'
* The numbers might be somewhat out of date, but you can get an accurate
count by running DBCC UPDATEUSAGE(0) first. This can take quite some time to
complete though, and should not really be run on a production system.
--
Jacco Schalkwijk
SQL Server MVP
[quoted text, click to view] "Marcell" <Marcell@discussions.microsoft.com> wrote in message
news:95B4E634-5964-4952-9915-798AC6BD347D@microsoft.com...
> Hi
>
> I would like to display the following information in respect of a specific
> database in one single report?
> 1. Database size
> 2. Number of tables
> 3. Number of rows in each table
> 4. Number of views
> 5. Number of stored procedures
>
> Is there a stored procedure or command I can use to display this?
>
> --
> Regards
>
> Marcell