A fast vComputer view: vComputer2 [for NS 6.x only]
The vComputer view provides an easy access to managed computers, however in very large reporting server this view (built on many other abstration) is taking a lot of time to run and is not the most efficient base to built report. How could we provide similar information without the overhead?
The following SQL query will return the guid, name, IsManaged, server (based on OwnerNSGuid) from the database using 3 tables and 2 joins.
create view dbo.vComputer2 as
select ir.Guid, ir.IsManaged, im.Name, ns.name as 'Server'
from ItemResource ir
join Item im
on ir.guid = im.guid
join Item ns
on im.ownernsguid = ns.guid
where ResourceTypeGuid='493435F7-3B17-4C4C-B07F-C23E7AB7781F'
On a reporting server with 60,000+ managed computers this query ran in 12 seconds returning 62,921 rows. In comparison the vComputer query failed to return results on the same server due to the heavy use of the vComputer table (the process was a deadlock victim after 60~120s). This view built on the vItem, VComputerResource, vActiveAssets and vResourceHierarchy and also brings back data from the basic inventory which is not always used.
The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments 4 Comments • Jump to latest comment
This looks pretty cool but I don't seem to have any computer resources in my Item table. I seem to have everything *but* computers in the Item table. My normal vComputer view works, though.
Blaine Baker
Information Security Administrator
Ludovic,
Did you create your new view for a 6.0 version of Notification Server? With the release of the 7.0 version the data base was re-organized and the Item table no longer holds all the data it did in the 6.0 version. The different resources have been moved into individual tables such as RM_ResourceComputer & RM_ResourceVirtual_Machine.
You got me there... Sorry I'm an old school guys.
And I still have a vast majority of my customers working with 6.x (80% actually) so I should have specified, this is a 6.x vComputer update!
I'll correct this now.
Ludovic FERRÉ
Principal Remote Product Specialist
Symantec
Need help with IIS log files? Check out the self-service portal on http://aila.15-cloud.fr/
For a view
Given we have almost all the interesting data in the RM_ResourceComputer by passing the vComputer view (legacy view in SMP?) is even simpler, as you can see here:
Note that I have taken the stance that deleted computers should not be in the query results, but this can be easily changed of course ;).
Ludovic FERRÉ
Principal Remote Product Specialist
Symantec
Need help with IIS log files? Check out the self-service portal on http://aila.15-cloud.fr/
For a view
Would you like to reply?
Login or Register to post your comment.