→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jgreeno
Engaged Sweeper
I have a number of servers that are being replicated to targets at our DR site. I created an asset relation to show that server A is replicating to server B. What I need now is a report that shows that info. I found this thread --> http://www.lansweeper.com/Forum/yaf_postst10585_-Borrowed--equipment-report.aspx#post39691 but I can't seem to iron out the SQL. Can someone point me in the right direction?

Thanks!
1 ACCEPTED SOLUTION
Nick_VDB
Champion Sweeper III
The forum post you are referring to is giving an example of user to asset relation. In your case you are doing an Asset to asset relation with server A and server B. Below is a report that will show the relation between two assets that are using the 'Replicating To' relation type (relation type we created manually). You just have to replace the highlighted relation type with the one you want to display in your report.

Instructions for adding the report below to your Lansweeper installation can be found here.


Select Top 1000000 tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tblAssets.IPAddress,
tsysAssetRelationTypes.Name As [Relation Type],
tblAssets1.AssetName As [Child Asset],
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets1.IPAddress As [Child IP Address]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Inner Join tsysAssetRelationTypes On tblAssetRelations.Type =
tsysAssetRelationTypes.RelationTypeID
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblAssetRelations.ChildAssetID
Where tsysAssetRelationTypes.Name Like 'Replicating To%' And
tblAssetCustom.State = 1

View solution in original post

2 REPLIES 2
jgreeno
Engaged Sweeper
Thank you! That's what I was looking for.
Two things I noticed, the report output is reversed. It shows A replicates to B but in looking at the assets, it's actually the opposite. Also the "child asset" is not a clickable link. This definitely gives me a jumping off point though.


Thanks again!
Nick_VDB
Champion Sweeper III
The forum post you are referring to is giving an example of user to asset relation. In your case you are doing an Asset to asset relation with server A and server B. Below is a report that will show the relation between two assets that are using the 'Replicating To' relation type (relation type we created manually). You just have to replace the highlighted relation type with the one you want to display in your report.

Instructions for adding the report below to your Lansweeper installation can be found here.


Select Top 1000000 tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tblAssets.IPAddress,
tsysAssetRelationTypes.Name As [Relation Type],
tblAssets1.AssetName As [Child Asset],
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetID,
tblAssets1.IPAddress As [Child IP Address]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Inner Join tsysAssetRelationTypes On tblAssetRelations.Type =
tsysAssetRelationTypes.RelationTypeID
Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
tblAssetRelations.ChildAssetID
Where tsysAssetRelationTypes.Name Like 'Replicating To%' And
tblAssetCustom.State = 1

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now