Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Update the DataWarehouse global setting in the OperationsManager database.
select
mt.TypeName,
mtp.ManagedTypePropertyName,
gs.SettingValue
from GlobalSettings gs
join ManagedTypeProperty mtp
on gs.ManagedTypePropertyId = mtp.ManagedTypePropertyId
join ManagedType mt
on mtp.ManagedTypeId = mt.ManagedTypeId
where mt.TypeName = 'Microsoft.SystemCenter.DataWarehouse'
-- update DW DB Server location
update gs
set SettingValue = 'scomsql3'
from GlobalSettings gs
join ManagedTypeProperty mtp
on gs.ManagedTypePropertyId = mtp.ManagedTypePropertyId
join ManagedType mt
on mtp.ManagedTypeId = mt.ManagedTypeId
where
mt.TypeName = 'Microsoft.SystemCenter.DataWarehouse' and
mtp.ManagedTypePropertyName = 'MainDatabaseServerName'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment