replication groups

Upload: aojukwu

Post on 13-Jul-2015

476 views

Category:

Documents


1 download

TRANSCRIPT

RCM_R eplicationLinkSummary_Child

select sf.FileId, IsNULL(pm.NewProductId,0) as ProductId, sf.FileName, s f.FileDescription, sf.FileVersion, sf.FileSize, NULL As FileCreationDate, 1 As FileCount, si.ModifiedDate, si.ClientId, fp.FilePath, si.Fil eModifiedDate from %Server%SoftwareFile as sf LEFT JOIN %Server%SoftwareProductMap pm on sf.ProductId=pm.OldProductId INNER JOIN %Server%SoftwareInventory as si on sf.FileId = si.FileId LEFT JOIN %Server%SoftwareFilePath as fp on si.FilePathId = fp.FilePathI d select distinct sp.NewProductId as ProductId, sp.CompanyName, sp.ProductName, sp.ProductVersion, sp.ProductLanguage, s i.ClientId from %Server%SoftwareProductMap as sp inner JOIN %Server%SoftwareInventory as si on sp.OldProductId = si.Produ ctId select sf.FileId, sf.ProductId, sf.FileName, sf.FileDescription, sf.File Version, sf.FileSize, NULL As FileCreationDate, 1 As FileCount, si.ModifiedDate, si.ClientId, fp.FilePath, si.Fil eModifiedDate from %Server%SoftwareFile as sf INNER JOIN SoftwareInventory as si on sf .FileId = si.FileId LEFT JOIN %Server%SoftwareFilePath as fp on si.FilePathId = fp.FilePathI d where sf.ProductId = 0 SELECT fil.FileId as FileID, fil.FileName, fil.FileDescription, fil.FileV ersion, fil.FileSize, prd.CompanyName, prd.ProductName, prd.ProductVersion, prd.ProductL anguage FROM %Server%SoftwareFile fil LEFT JOIN %Server%SoftwareProductMap as prd on fil.ProductId = prd.OldPro ductId

SELECT RecordID, MachineName, ModuleName, Win32Error, Time, SiteCode, TopLevelSiteCode, Component, ProcessID, ThreadID, ID&0xF0000000 as Severity, Messa geID, Type&0x000000F0 as ReportFunction, Type&0x00000008 as Succes sfulTransaction, Type&0x00000004 as PartOfTransaction, Type&0x00000002 as Per Client, Type&0x0000FF00 as MessageType FROM %Server%StatusMessages SELECT RecordID, InsStrIndex, InsStrValue FROM %Server%StatusMessageInsStrs SELECT RecordID, AttributeID, AttributeValue, AttributeTime FROM %Server%StatusMessageAttributes SELECT stat.RecordID, m.MachineID, stat.MachineName, stat.ModuleName, stat.Win32Error, stat.Time, stat.SiteCode, stat.TopLevelSiteCode, stat.Component, sta t.ProcessID, stat.ThreadID, stat.ID&0xF0000000 as Severity, stat.MessageID, s tat.Type&0x000000F0 as ReportFunction, stat.Type&0x00000008 as SuccessfulTransaction, stat.Type&0x0 0000004 as PartOfTransaction, stat.Type&0x00000002 as PerClient, stat.Type&0x0000FF00 as M essageType, ins.InsStrValue1, ins.InsStrValue2, ins.InsStrValue3, ins.InsStrValue4, ins.InsStrValu e5, ins.InsStrValue6,

ins.InsStrValue7, ins.InsStrValue8, ins.InsStrValue9, ins.InsStrValu e10 FROM %Server%StatusMessages stat LEFT JOIN ( select RecordID, [0] as InsStrValue1, [1] as InsStrValue2, [2] as InsStrValue3, [3 ] as InsStrValue4, [4] as InsStrValue5, [5] as InsStrValue6, [6] as InsStrValue7, [7 ] as InsStrValue8, [8] as InsStrValue9, [9] as InsStrValue10 from (select RecordID, InsStrIndex,InsStrValue from %Server%StatusMessa geInsStrs) as S PIVOT (MAX(InsStrValue) FOR InsStrIndex in ([0],[1],[2],[3],[4],[5],[6], [7],[8],[9])) as P ) as ins on stat.RecordID=ins.RecordID LEFT JOIN %Server%StatusMessageAttributes att on stat.RecordID=att.Rec ordID and att.AttributeID=408 LEFT JOIN %Server%MachineIdGroupXRef m on att.AttributeValue=m.GUID an d m.ArchitectureKey=5