SAMStore DB Migration procedure

Document ID : KB000018523
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

What are the steps to move SAMStore DB from one server to another?

Answer:

To move the SAMStore DB from one server to another, using the same SOI Manager Server, run through the following steps:

  1. Stop all SOI Manager services.
  2. You will need to change the new SQL server hostname in the following files:

      SOI_HOME\tomcat\lib\hibernate.cfg.xml
      SOI_HOME\tomcat\registry\topology\physical\node0\sor\restserver.xml
      SOI_HOME\tomcat\registry\topology\physical\node0\sor\sorapp.xml
      SOI_HOME\tomcat\registry\topology\physical\node0\sor\ssaserver.xml
      SOI_HOME\tomcat\registry\topology\physical\node0\sor\ssaweb.xml
      SOI_HOME\ServiceDiscovery\connectivityContext.xml
      SOI_HOME\wso2registry\repository\conf\registry.xml (in both SOI Manager and UI)
      SOI_HOME\wso2registry\repository\conf\user-mgt.xml (in both SOI Manager and UI)
      SOI_HOME\ServiceDiscovery\connectivityContext.xml
  3. Backup the SAMStore from the old database server using SQL backup.
  4. Restore the old SAMStore to your new SQL server using the SQL restore.
  5. Run the SQL queries below against SAMStore after moving DB to the new sever:
      Delete from UM_USER_ROLE
      Delete from UM_USER
      Delete from REG_RESOURCE
  6. Run: %SOI_HOME%\tomcat\registry>registryloader.bat
  7. Restart the SOI Manager services.