• subscribe
January 25, 2008 12:00 AM

Use SSRS and SSIS to Create a DBA Repository

Enhancements to the original solution
SQL Server Pro
InstantDoc ID #97840
Downloads
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.



ARTICLE TOOLS

Comments
  • Inmon
    2 years ago
    Jun 08, 2010

    Trying to add more logic to the solution and running into an error. All I am doing is copying one item like fixed drives and building a new query and new table in DBA_REP to match. I am using tempdb for the process just like the item I copied.

    Error 18 Validation error. Populate_DBA_REP Connection manager "MultiServer": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Login timeout expired". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [2]. ". Populate_DBA_REP.dtsx 0 0

  • Jon Fendenheim
    2 years ago
    May 04, 2010

    I really enjoyed the webinar the other day and have been looking forward to downloading the code but I'm having an issue. I'm receiving HTTP Error 404 - The page cannot be found.

    - Neal

  • Barry
    3 years ago
    Oct 23, 2009

    Excellent - have been planning to do something like this myself for some time. Now I can see how much work it would have been and I'd have screwed it up!!
    Commercial SQL Server documentation tools are very much developer focussed and focus on the nitty gritty of the database schemas. Your soultion focusses mar more clearly on the SLQ Server environment. The (natural) use of SSRS is also excellent. Well done. I suspect there's a commercial opportunity there for somebody - a SQL Server documentor for the DBA, not the developer

  • SUE
    3 years ago
    Mar 06, 2009

    Do you have a SQL 2008 version of this. I thought it was extremely useful.

  • RODNEY
    4 years ago
    Dec 06, 2008

    sueboo,
    A couple of things jump out at me based on your issue. You say that this is Windows 2000 and hosts both a SQL 2000 and 2005 instance. I would be curious to know where you are running the package from, meaning are you running this from a SQL Agent job or directly in Visual Studio/BIDS? If you run the package in design (BIDS) where in the package does the failure occur? You can mail me directly and I would be happy to work out the details with you. My e-mail is posted in my profie on this site.
    Rodney Landrum (author)

You must log on before posting a comment.

Are you a new visitor? Register Here