I have seen many posts in common forum and it seems that many of you are having challenges when it comes to moving the SCOM database to a new SQL database instances. The process is bit complex, so it’s become a bit challenges to get all the modification do perfectly.

 

Now I must say, you do not need to worry as I have made this process completely automated and you can use my PowerShell scripts to do the job in a single click. But please remember, as it is an automated solution, you should be care about the what information you are providing else it can be a disaster. Please read each of the Script carefully to understand what it does.

 

You can find the Scripts in the following below. 

 

QCForSCOMDatabaseMovement.ps1:

 

QCForSCOMDatabaseMovement.ps1 Script will be useful to check if the SCOM database movement has been successfully executed or not.

 

https://github.com/souravmahato7/Codes/blob/SCOM/QCForSCOMDatabaseMovement.ps1

 

 

SCOMDataBaseChangeScript.ps1:

 

SCOMDataBaseChangeScript.ps1 will update the registry, config file on all the management servers and it also update the respective tables in SCOM databases.

 

https://github.com/souravmahato7/Codes/blob/SCOM/SCOMDataBaseChangeScript.ps1

 

 

SCOMDataBaseMovementComplete_V1.ps1:

 

SCOMDataBaseMovementComplete_V1.ps1 Script is a complete Script which will moved the database from one SQL server instance to another SQL server instance and update the registry, config file on all the management servers and it also update the respective tables in SCOM databases.

 

This Script will do the following:

 

1. It will take the full backup of both the SCOM databases from the current SQL server instance

2. It will then restore both the SCOM databases in the future SQL server instances where we want to move the databases.

3. Now it will create logins for the accounts in the future SQL server instances which are currently present on the current SQL server instances for each databases.

4. Now it will update the registry and config file on Management servers

5. Now it will enable the SQL broker service on future SQL server which will host the OperationsManager database.

 

https://github.com/souravmahato7/Codes/blob/SCOM/SCOMDataBaseMovementComplete_V1.ps1

 

Please note that to perform the task successfully, we need to have write access on the SQL databases and user should be part of the local administrator group on SQL server and management servers.

 

Additional Information:

 

https://docs.microsoft.com/en-us/system-center/scom/manage-move-opsdb?view=sc-om-2019

 

https://docs.microsoft.com/en-us/system-center/scom/manage-sqlserver-communication?view=sc-om-2019#how-to-configure-the-operations-manager-operational-database

 

https://docs.microsoft.com/en-us/system-center/scom/manage-move-omdwdb?view=sc-om-2019

 

I would appreciate if you could provide any feedback on this.

Leave a Reply

Your email address will not be published. Required fields are marked *