DOWNLOAD THE CODE:
Download the Code 97840.zip

The SQL Drive Space report incorporates a couple of interesting uses for report parameters and expressions to display a bar chart and table containing the drive space inormation. The High_Usage parameter lets users select all servers or only the servers that have a threshold event (which I arbitrarily set to a disk file usage above 30 percent). If you select the value High Usage from the parameter dropdown list, you’ll see only those servers that have potential drive space issues. Otherwise, you see all servers by default if you don’t select a value. As Figure 4 shows, color coding helps you determine at a glance which of the servers has a threshold value exceeded.

The SQL User Permission report has saved me hours of time investigating where access was granted—especially when a user was placed in a group and thereby hidden from the DBA. Even with access to Active Directory (AD), analyzing Windows domain group membership is tedious. Instead, I wanted one big result set that returned all the user information for all the SQL Server machines being reported on (especially production servers). The resultant query, which Web Listing 3 contains, and the subsequent report let you select a user by name or part of a name, as well as by group or by server.

The report, although not pretty, is quite useful. Web Figure 2 shows a report run for Location 4 (from the Location field), with a breakdown of permissions for each database. You can analyze Windows group and account names, although the report in Web Figure 2 doesn’t list any. Finally, the user parameter supports wildcard lookups. For example, you could look for a combination of all the servers in Location 4 and users with a name like “gue,” to return only the “guest” user. This option is handy when you know only part of a name.

Reader Kudos

Thanks to everyone who read my original articles and provided feedback to help improve my solution. I’ll continue to make enhancements to the tool (which I’ve dubbed SQL Snapper, for snapshot data analysis— plus, I live near the beach and I like to fish!). Although I created the tool for straight reporting, it’s useful for many other projects as well. Have fun tinkering with the code (in a test environment of course), and feel free to email me with any ideas you have for modifying or expanding it.

End of Article

Prev. page     1 2 [3]     next page -->



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

fyi.. the links(to gifs) in the article are broken

dguillory

Article Rating 5 out of 5

Good Catch, dguillory. I will let the editors know this morning. Rodney Landrum - author.

rlandrum

Article Rating 5 out of 5

Also the "97840.zip" referenced in the begining of the article is not attached to the article to download.

stefbauer

Article Rating 4 out of 5

Not for nothing, but where's the link?

focasio

Article Rating 5 out of 5

Very interesting article with very relevant information. This makes it doubly unfortunate that the download is not available!

keespijnenburg

Article Rating 5 out of 5

Any idea on when http://www.winnetmag.com/Files/09/97840/97840.zip will be available? Thanks

focasio

Article Rating 5 out of 5

I have brought this to the their attention. I have several emails from readers asking for the code directly. I will send that along as soon as I can. In the mean time please keep checking back as they are working on the code link. Rodney Landrum - author.

rlandrum

Article Rating 5 out of 5

Great article. Too bad the site is letting us (subscribers) down... :(

djdevelop

Article Rating 5 out of 5

Code link still not working."Sorry the page you are trying to reach is temporarily unavailable or the page no longer exists." Good thing this is not a Tech site.

dguillory

Article Rating 5 out of 5

Link is Broken

mrweaver59

Article Rating 1 out of 5

The Article is very good but without looking at the code it’s kind of hard to make a final rating I am sure it good, because I have been doing the same thing for sometime now just want to see the differences. Like performance and footprint size on the server when running. And still a broken link. Does this Magazine care about quality? This not the 1st time they have had broken links. Seems to be the norm for a professional magazine I would expect better results to my paying customers. If I published a web site that did not work I would lose my job.

mrweaver59

Article Rating 2 out of 5

Link is broken.

Benoit Stofleth

Article Rating 3 out of 5

Fix link soon please......Then usefulness will be higher

BBaumann

Article Rating 3 out of 5

Thanks so much for letting us know about this problem. I have passed this information on to our Web team, and we hope to have the problem fixed soon.

Megan Bearly Associate Editor, SQL Server Magazine mbearly@sqlmag.com

meganbearly

Article Rating 5 out of 5

OK, all of you perfect DBA's out there. Lay off the broken links. It ain't the end of the &^&%$ world. This is good stuff, and another day isn't going to hurt you a bit.

If at first you don't succeed, remove all evidence you ever tried....

skeleton

Article Rating 5 out of 5

See More Comments  1   2