By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

Maintenance/Auditing Scripts for SQL Server

P: n/a
Maybe I am asking for the world, but it seems to me that I should be
able to run some scripts against a SQL Server to derive everything of
interest to a database administrator. Things like:

Server Name
Database Name
Database Owner (DBO)
File Group(s)
Users and Permissions
Database Size/Log File Size and Space Available
Recovery Model
Maintenance Plan w/Backup Location
Last successful backup date/time
etc.

Any suggestions greatly appreciated!!!

RBollinger

Sep 19 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
All the information is available, though you have to ask a lot of
different questions. Some things to look into include @@servername,
sp_helpdb (both with and without a specific database name),
sp_helplogin, sp_helpuser, sp_helprotect. Note that you can inspect
the source of all the system stored procedures so that you can figure
out where the information came from.

For backup information I query tables in msdb, mostly msdb..backupset.

Roy Harvey
Beacon Falls, CT

On Fri, 19 Sep 2008 06:16:51 -0700 (PDT), robboll
<ro*****@hotmail.comwrote:
>Maybe I am asking for the world, but it seems to me that I should be
able to run some scripts against a SQL Server to derive everything of
interest to a database administrator. Things like:

Server Name
Database Name
Database Owner (DBO)
File Group(s)
Users and Permissions
Database Size/Log File Size and Space Available
Recovery Model
Maintenance Plan w/Backup Location
Last successful backup date/time
etc.

Any suggestions greatly appreciated!!!

RBollinger
Sep 19 '08 #2

P: n/a
Thanks Roy
Oct 10 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.