Video Screencast Help

SQL Query to Return Details About a Given Item's Replication

Created: 30 Apr 2013 • Updated: 01 May 2013
Preppietechie's picture
0 0 Votes
Login to vote

Here is a handy SQL query that returns details about a given resource's replication status.  Simply replace RESOURCE_NAME with part of the name of the resource you want to look up and execute the querry against the CMDB.  Alternatively, you can drop the item's GUID (or part of it with % wildcards) in between the quotes in this line:

where remotens like '%'

Note that in a hierarchy, this can be executed on either the parent or child SMP's CMDB.

The full querry in text is below, as well as attached to this posting:

--Query to pull details about a specific resource that was replicated to specific child NS

select i.name, i.classguid, i2.type, s.localguid, s.encodingsize, s.statuscode, s.starttime  from evt_ns_object_replication_status s
join vitem i on s.localguid = i.guid
join class i2 on i.classguid = i2.guid
where remotens like '%'
and datediff(dd, starttime, getdate()) < 1
and [name] like '%RESOURCE_NAME%'
order by i.classguid
Enjoy!