View Database Information Script

This stored procedure is designed to view database information in an active database — i.e. database, tables, objects, users, jobs, etc. The script basically acts as a ‘wrap-around’ and enables one procedure to be used to view a wealth of database information. Tested on SQL Server 2000.

Accepts viewtype parameters of ‘database’, ‘tables’, ‘objects’, ‘jobs’, ‘users’ and ‘alerts’. Type the database name and the parameter type, then execute the procedure.

Example:

exec usp_dbinfo ‘[database name]’,’[parameter type]’ 

Author: Lauryn Bradley

Download Script:
usp_dbinfo.txt



Disclaimer:
We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
“as -is”, without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose…

Disclaimer Continued

Back to Database Journal Home

Get the Free Newsletter!

Subscribe to Cloud Insider for top news, trends & analysis

Latest Articles