To move the SAMStore DB from one server to another, using the same SOI Manager Server, run through the following steps:
- Stop all SOI Manager services
- 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
- Backup the SAMStore from the old database server using SQL backup.
- Restore the old SAMStore to your new SQL server using the SQL restore.
- Run the SQL queries below against SAMStore after moving DB to the new server:
Delete from UM_USER_ROLE
Delete from UM_USER
Delete from REG_RESOURCE
- Run: %SOI_HOME%\tomcat\registry>registryloader.bat
- Restart the SOI Manager services.