468,316 Members | 2,136 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,316 developers. It's quick & easy.

Maintenance/Auditing Scripts for SQL Server

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
2 1586
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
Thanks Roy
Oct 10 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by William F. O'Neill | last post: by
4 posts views Thread by johnm | last post: by
4 posts views Thread by Ed Rauscher | last post: by
14 posts views Thread by Jonas | last post: by
4 posts views Thread by Mike Gleason jr Couturier | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.