--- title: "Migrating to a new SQL instance | v8.4+" canonical: "https://ai-docs.certero.com/space/CUP/118917838/Migrating%20to%20a%20new%20SQL%20instance%20%7C%20v8.4%2B" format: markdown --- <span style="color: #555555">This article is intended for organizations that are running Certero v8.4+ and have their SQL provisioned on a separate server to the Certero application. </span> ## <span style="color: #000000">Preparing the SQL Instance </span> <span style="color: #555555">Before the new SQL instance can be added to Certero Provisioning, the authentication between the Certero server and the SQL instance needs to be in place. </span> <span style="color: #555555">Please modify the SQL statements below and run them against the new SQL instance. </span> ``` CREATE LOGIN [DOMAIN\SERVERNAME$] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english] GO ``` ``` ALTER SERVER ROLE [sysadmin] ADD MEMBER [DOMAIN\SERVERNAME$] GO ``` <span style="color: #555555">Once this has been completed login to Certero Provisioning and select the </span><span style="color: #0000ff">SQL Instance </span><span style="color: #555555">tab at the top of the screen. Click the plus icon + near the top right of the screen to open the </span><span style="color: #0000ff">New SQL Instance </span><span style="color: #555555">properties. </span> <span style="color: #555555">In the </span><span style="color: #0000ff">Name </span><span style="color: #555555">field, enter the new SQL instance name in the format SERVERNAME\INSTANCENAME for a named instance, or SERVERNAME for the default instance. TAB to Description to verify the authentication has been configured correctly, you will see a green tick, then click </span><span style="color: #0000ff">Save </span><span style="color: #555555">. </span> ## <span style="color: #000000">Perform a backup </span> <span style="color: #555555">Select the </span><span style="color: #0000ff">Tenants </span><span style="color: #555555">tab at the top of the screen and on the actions menu </span>  <span style="color: #555555">Next to the tenant name select the </span><span style="color: #0000ff">Backup </span><span style="color: #555555">option. Enter a description (e.g. Pre Migration backup) and click Submit to perform a backup. </span> ## <span style="color: #000000">Moving your Certero Tenant to the new SQL Instance </span> <span style="color: #555555">Again, select the </span><span style="color: #0000ff">Tenants </span><span style="color: #555555">tab at the top of the screen and on the actions menu </span>  <span style="color: #555555">Next to the tenant name select the </span><span style="color: #0000ff">Configure </span><span style="color: #555555">option. On the next page, select the </span><span style="color: #0000ff">Database </span><span style="color: #555555">tab near the top of the screen and use the drop-down to select the new SQL Instance and then click </span><span style="color: #0000ff">Save </span><span style="color: #555555">. Click </span><span style="color: #0000ff">OK </span><span style="color: #555555">to confirm your request to migrate the Certero databases to the new SQL instance.</span> <span style="color: #555555">A migration task list will now run. A fresh backup will be performed, databases will be removed from the existing SQL instance and then restored on the new SQL instance. </span> <span style="color: #555555">Once the migration is completed the required SQL server role can be changed to dbcreator. Again modify the SQL statement below and run it against the new SQL instance. </span> ``` ALTER SERVER ROLE [dbcreator] ADD MEMBER [DOMAIN\SERVERNAME$] GO ALTER SERVER ROLE [sysadmin] DROP MEMBER [DOMAIN\SERVERNAME$] GO ```