How to merge uipath_orch identity tables into the existing database?
Issue Description:
Post upgrade to 2020.10.3, the identity tables are within a separate database called uipath_orch. How can uipath_orch identity tables be merged into the existing database?
Resolution:
Steps to merge the Identity database to the Orchestrator database, in case the database was created separately:
- Back up both databases, in case an issue is encountered, so a restore is done.
- On the Uipath_orch, right-click on the database that needs to be moved -> Tasks -> Generate Scripts
- Click Next and on the Choose Objects screen click on select specific database objects.
- From Tables check all the identity tables. And on the schema, select the identity schema.
- Click Next, on the Set Scripting Options, select "Save as script" file, and then Advanced.
- On the advance page, change Types of data to script from Schema to Schema and data. Click OK.
- Click Next and then Next again. When the script is finalized to be generated Click on finalize.
- Now, open the script that was just generated, modify the first line from Use [name_of_database] to Use [UiPath].
- Run the script. If no errors occurred, there is one more step required. Go to the Orchestrator installation folder, go into Identity folder (E.G. C:\Program Files (x86)\UiPath\Orchestrator\Identity) and here open the file appsettings.Production.json
- Change the connection string from:
"DefaultConnection": "Data Source=.\\SQLEXPRESS;Initial Catalog=OldDatabaseName;User ID=User;Password=Password"
To
"DefaultConnection": "Data Source=.\\SQLEXPRESS;Initial Catalog=NewDatabaseName;User ID=User;Password=Password"
- Restart Orchestrator and retest the connection to it.