| | | Forum Newbie
       
Group: Forum Members Last Login: 5/24/2005 1:41:00 PM Posts: 2, Visits: 1 |
| Has anyone been successful creating reports directly from the WhatsUp database? Is there a database schema available anywhere, or a listing of SQL queries that comprise the existing set of reports available through the web interface? Any or all of this information would be very useful, the built in web-based reports are of limited value to me. Thx. |
| | | | Forum Guru
       
Group: Forum Members Last Login: 8/21/2006 11:24:00 AM Posts: 72, Visits: 1 |
| I'd also appreciate a database schema and a listing of sql queries. Anyone?
Regards and thx in advance, Daniel |
| | | | Junior Member
       
Group: Forum Members Last Login: 5/5/2006 2:17:00 PM Posts: 10, Visits: 1 |
| I, too, wanted a schema, and my DB is on SQL--not MSDE. So, in Enterprise Manager I created a diagram (and printed to an HP DesignJet 500 (42 inch) for easy viewing). As for a textual schema--I can't offer any suggestions there. Hope this helps, JD |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 5/24/2005 1:41:00 PM Posts: 2, Visits: 1 |
| I've run MS SQL Profiler, to capture the queries Whatsup is using to generate the web reports. Unfortunately the joins (schema) used in the database are not necessarily straight forward and the data returned from these queries needs further processing. The end result is that this is more work than I'm willing to invest. I recommend using MS SQL Profiler to capture then queries submitted by the application. I'd be very interested in any useful reporting queries created by anyone out there. Here is one query captured (there are dates and device "group" ids that need to be changed to reflect your environment): SELECT dStartTime, ISNULL(dEndTime,'2005-5-12 16:35') AS dEndTime, nActiveMonitorStateChangeLogID, MonitorState.nMonitorStateID,nInternalMonitorState, PivotActiveMonitorTypeToDevice.nPivotActiveMonitorTypeToDeviceID, ActiveMonitorType.sMonitorTypeName,PivotActiveMonitorTypeToDevice.nDeviceID, sNetworkName, sNetworkAddress, sArgument, sDisplayName FROM ActiveMonitorStateChangeLog INNER JOIN MonitorState ON MonitorState.nMonitorStateID = ActiveMonitorStateChangeLog.nMonitorStateID INNER JOIN PivotActiveMonitorTypeToDevice ON PivotActiveMonitorTypeToDevice.nPivotActiveMonitorTypeToDeviceID = ActiveMonitorStateChangeLog.nPivotActiveMonitorTypeToDeviceID INNER JOIN ActiveMonitorType ON ActiveMonitorType.nActiveMonitorTypeID = PivotActiveMonitorTypeToDevice.nActiveMonitorTypeID INNER JOIN PivotDeviceToGroup ON PivotDeviceToGroup.nDeviceID = PivotActiveMonitorTypeToDevice.nDeviceID INNER JOIN Device ON Device.nDeviceID = PivotActiveMonitorTypeToDevice.nDeviceID INNER JOIN NetworkInterface ON NetworkInterface.nNetworkInterfaceID = Device.nDefaultNetworkInterfaceID WHERE PivotDeviceToGroup.nDeviceGroupID = 16 AND NOT ISNULL(ActiveMonitorType.bRemoved,0)=1 AND NOT ISNULL(Device.bRemoved,0)=1 AND NOT ISNULL(PivotActiveMonitorTypeToDevice.bRemoved,0)=1 AND ( (dStartTime >= '2005-5-8 0:0' AND ISNULL(dEndTime,'2005-5-12 16:35') <= '2005-5-14 23:59') OR (dStartTime <= '2005-5-14 23:59' AND ISNULL(dEndTime,'2005-5-12 16:35') >= '2005-5-8 0:0') OR (dStartTime <= '2005-5-14 23:59' AND ISNULL(dEndTime,'2005-5-12 16:35') >= '2005-5-14 23:59') OR (dStartTime <= '2005-5-8 0:0' AND ISNULL(dEndTime,'2005-5-12 16:35') >= '2005-5-14 23:59') ) ORDER BY PivotActiveMonitorTypeToDevice.nDeviceID ASC, sArgument DESC, PivotActiveMonitorTypeToDevice.nPivotActiveMonitorTypeToDeviceID, dStartTime ASC |
| |
|
|