Skip to content

Instantly share code, notes, and snippets.

@dalehhirt
Created February 5, 2015 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalehhirt/af66e3c381c482710724 to your computer and use it in GitHub Desktop.
Save dalehhirt/af66e3c381c482710724 to your computer and use it in GitHub Desktop.
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