Data dictionary?
lehrsj24
Posts: 13 Bronze 2
I'd like to do some reports against some of the data in the SQLMonitor database. Is there any type of documentation on how the data all relates? Some of the data is pretty self explanetory but others is not.
thanks,
Sherry
thanks,
Sherry
Comments
We're going to provide some sample SSRS reports soon, to help people get started, but you're right - though some of the schema is obvious, not all of it is. NB: We've added a number of VIEWs to make some of the obvious joins so that you don't have to (for example, joining various data tables to the server reference tables).
I'll add a data dictionary to the plans - are there any particular pieces of data you were after in the mean time?
Ben
As an example, I have alertID 70009 that is for a SQL server job that failed. On the web page when I click on the alert I see the error message for the failed job:
Job outcome message: The job failed. The Job was invoked by Schedule 13 (Sundays). The last step to run was step 3 (CaptureProject). NOTE: Failed to notify ....
There is a view called data.cluster_sqlserver_agent_job_history_instances_view.
In this view I see ID 906119 that a field for Cluster_SQLServer_Agent_Job_History_Message, which is the error message for this alert. It matches the server from the alert, the time, etc.(actually I started in this view, found an error, and then traced it back to the alert).
If I have the AlertID from the alert.Alert table how can I get to this view for the error message?
Thanks
I'm taking a look at this request, though I'm afraid it's not as trivial as some other possible reports! I'll post back as soon as I've put some T-SQL together..
Apologies for the delay.
Regards
Ben
Below is some code I've put together linking the Alerts VIEW [alert].[Alert_Current] and the Job History VIEW [data].[Cluster_SqlServer_Agent_Job_History_Instances_View]. I've put the most relevant info in the first few columns (alert ID, error message, date/time of alert), but have also included other columns in case you're interested in these.
NB: I've put this together quite hastily - let me know if you have any problems with this code and I'll try to fix it!
Hope this helps.
Ben Rees
We have put in a number of VIEWs which should, hopefully, help you create reports or queries for the sort of data you’re looking for.
The most interesting VIEWs can be found under [data].xxxxx_View. A lot of these should be self-explanatory. For example, looking at the information that you mention:
Monitored Servers with OS info etc
This can be found in the view
Mem Disk Space
Memory values can be found in Disk space can be found in
Databases
Lists of databases can be found in though this needs to be grouped (there is more than one row per database as this table also includes some availability information.)
Database Size
This can be found in
NB: There’s also a couple of functions to convert between Ticks (as used in many views and tables) and proper date times, and
Hope that helps!
Ben
The column seems like it should match the sum of the values in for all of the files on the drive; however these values are way off. Could you shed some light?
Here is my code, in case it is useful to anyone (this does create values that seem to match what is in Activity Monitor, but I haven't done any in-depth validation):
I haven't looked at your code but as far as I understand sys.dm_io_virtual_file_stats returns I/O stats only for data and log files whereas data stored in Logical Disk performance objects relates to everything on that disk which will include non SQL Server data and log files too.
Thanks,
Priya
Project Manager
Red Gate Software