cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
diogo
Engaged Sweeper
Dear,


I would like to create a report with the status of a specific windows service, for example:

service: servicexxx status: running or stop startmode: enable, disable
1 ACCEPTED SOLUTION
brandon_jones
Champion Sweeper III
This should work:
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblServicesUni.Name As Service,
tblServices.Started,
tblServiceStartMode.StartMode
From tblAssets
Inner Join tblServices On tblAssets.AssetID = tblServices.AssetID
Inner Join tblServicesUni On tblServices.ServiceuniqueID =
tblServicesUni.ServiceuniqueID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric
And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Inner Join tblServiceStartMode On tblServiceStartMode.StartID =
tblServices.StartID
Where tblServicesUni.Name = 'wscsvc' And tblAssetCustom.State = 1
Order By tblAssets.AssetName


The only line that you need to change is the name of the service in the line Where tblServicesUni.Name = 'wscsvc'

View solution in original post

1 REPLY 1
brandon_jones
Champion Sweeper III
This should work:
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblServicesUni.Name As Service,
tblServices.Started,
tblServiceStartMode.StartMode
From tblAssets
Inner Join tblServices On tblAssets.AssetID = tblServices.AssetID
Inner Join tblServicesUni On tblServices.ServiceuniqueID =
tblServicesUni.ServiceuniqueID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tsysIPLocations.StartIP <= tblAssets.IPNumeric
And tsysIPLocations.EndIP >= tblAssets.IPNumeric
Inner Join tblServiceStartMode On tblServiceStartMode.StartID =
tblServices.StartID
Where tblServicesUni.Name = 'wscsvc' And tblAssetCustom.State = 1
Order By tblAssets.AssetName


The only line that you need to change is the name of the service in the line Where tblServicesUni.Name = 'wscsvc'