Here you will find information on how to create an SMS Web Report for the Client Health Monitoring Tool database.
Note: This assumes that you have the SMS client health monitoring tool installed in your SMS_XXX database where XXX is your sites three letter site code. If the SMS Client Health Monitoring Tool is installed in another database you must specify the fully qualified naming convention to the database as a linked server.
First you need to create a Cleint Health View and apply the appropriate permissions using the SQL Query below:
Note: You can change the View name as needed by replacing all the instances of v_R_ClientHealth with the view name of your choice in the script below. Also change the Use SMS_XXX to your database name where XXX is your sites three letter site code.
SQL Query:
Use SMS_XXX
If Exists (Select * From dbo.SysObjects Where ID = Object_ID(N'[v_R_ClientHealth]')
and ObjectProperty(ID, N'IsView') = 1)
Drop View v_R_ClientHealth
Go
Create View v_R_ClientHealth As Select
ResourceID,
Name 'Machine Name',
Guid,
Sitecode 'Site Code',
LastUser 'Last User Name',
Type 'Client Type',
Version 'Client Version',
LastDDR 'Last DDR Recieved',
LastHW 'Last Hardware Scan Date',
LastSW 'Last Software Scan Date',
DDRState 'Last DDR State',
HWState 'Last Hardware State',
SWState 'Last Software State',
TOTState 'Last TOT State',
Active 'Active Client',
Obsolete 'Obsolete Client',
ChangeActive 'Active Status Change',
ChangeObsolete 'Obsolete Status Change',
LastPing 'Last Ping Time Stamp',
LastPolicy 'Last Policy Time Stamp',
WasOnline 'On Line',
LastPingResult 'Last Ping Status',
Classification 'Last Client State'
From ClientHealthResults
Grant Select On v_R_ClientHealth To smsschm_users, webreport_approle
Select * From v_R_ClientHealth
To create the Web Report follow the steps below:
Note: To use the SQL script as a web report copy and paste the Name, Category, Description and of course the SQL statement shown below to the appropriate new web report boxes or modify to your liking as needed.
Name: Client Health Results
Category: Client Health Reports
Description: Displays the current Client Health information for the site..
SQL Statement:
Select *
From v_R_ClientHealth
Tried to implement this.
Had to add the Fully Qualified identifier for the ClientHealth DB to the FROM statement:
From sms_clienthealth..ClientHealthResults
So the view is created, and I can run SQL queries against it. However, when I create an SMS report I get an error
An error occurred when the report was run. The details are as follows:
The server principal "NT AUTHORITY\SYSTEM" is not able to access the database "SMS_ClientHealth" under the current security context.
Error Number: -2147467259
Source: Microsoft OLE DB Provider for SQL Server
Native Error: 916
This indicates that even though we've assigned permissions to the new view in the SMS DB, those permissions are not passing through to the SMS_ClientHealth DB to read in the data.
Is the solution to assign the same users / roles permissions on the SMS_ClientHealth DB?
I am having the same problem with accessing the new web report. Did you ever come up with a solution to giving permissions to the SMS_CLIENTHEALTH Database?
Same "NT AUTHORITY\SYSTEM" access problem here. Anyone fix this?
I am getting the same error. Did anyone successfully resolve this issue?