Accessing ServiceManager data base with Dashboard query
We are trying to create a dashboard query based on ServiceManager datasource.
Simple query does not return any result:
SELECT wi.Id_9A505725_E2F2_447F_271B_9B9F4F0D190C as [Id]
From MTV_System$WorkItem$Incident wi
where wi.IsParent_8C8C5710_9D59_DE9D_7846_A5BAB8744F0E =1
Same (no results) if we base it on ServiceManagement data source:
SELECT wi.Id_9A505725_E2F2_447F_271B_9B9F4F0D190C as [Id]
From [ServiceManager].[dbo].[MTV_System$WorkItem$Incident] wi
where wi.IsParent_8C8C5710_9D59_DE9D_7846_A5BAB8744F0E =1
What do we do wrong?
Our environment:
Windows 10
System Center 2016
Version: 7.5.7487.0
Current Portal Version: 8.7.0.2016 (client - IE11)
Management Pack Version: 7.7.2016.185
Best Answer
-
Geoff_Ross Cireson Consultant O.G.Does the AppPool account running the Cireson Portal have permissions to read from ServiceManager DB. This isn't needed for any other portal function so its quite possible this was missed.
To test, launch Management Studio with the App Pool account and see if you can run the query.6
Answers
Yes, in SQL Management Studio we see the results.
We don't have Analytics installed. Do we need it?
@Justin_Workman : Created new datasource (by using .udl file on portal server). Tried query against it.
No results returned.
If you do a query for "select workitemid, title from workitem" against ServiceManagement does that work?
@Jeff_Lang : as you suggested, I created view in Service Management database and then created a dashboard query SELECT * FROM myview. Built Dashboard view in portal - no records showing.
I also tried to query system view - no results.
When query any table - records are showing fine.
To test, launch Management Studio with the App Pool account and see if you can run the query.
@Geoff_Ross: That's it! I added AppPool account as User to ServiceManager database and it fixed the problem
Thank you for your help.
Great news. Happy Dashboarding!