Move Lync database to new sql server.

This is how I’ve done it. First in lab then in production. This is moving enterprise edition databases. For this to work you need one extra temporary sql server and one Lync server in a temporary Lync pool ,along with the new SQL production server.

1. Export Lync configuration just in case.
export-csconfiguration -file c:\lyncconfig.zip
export-cslisconfiguration -file c:\lynclisconfig.zip
2. Install a new Lync server in a new pool. I.e temppool.corp.local
3. Install a new CMS (configuration management store) on temporary sql server.
install-csdatabase -CentralManagementDatabase -sqlserverfqdn tempsql.corp.local
4. Enable topology.
enable-cstopology
5. Logon to new server in new pool and move CMS Lync server.
move-csmanagementserver
Verify that you are moving it to the new server and select.
Get-csmanagementreplicationstatus
Wait for replication.
6. Uninstall old CMS database.
Uninstall-csdatabase -CentralManagementDatabase -sqlserverfqdn OLDSQLSERVERFQDN.corp.local
7. Backup Lync databases. All of them.
8. In topologybuilder create a new sql server at the enterprise pool properties and publish topology.
9. Run Lync server setup deployment wizard.
10. Turn off all Lync frontend servers.
11. Restore Databases to the newley created databases. Remember to enable Chaining on the RTC and RTCDYN databases. Enable cross database chaining in the sql server properties. (SQL 2008 R2) In SQL-query : alter-database rtc set db_chaining = on alter-database rtcdyn set db_chaining = on
12. Start Lync servers.
13. Mover CMS to new SQLserver. step 1 – 6
14. Delete temppool from topologybilder and publish.

4 thoughts on “Move Lync database to new sql server.”

  1. Hi,
    I Need only restore all Lync database for the same instance, I need to run alter-database rtc set db_chaining = on alter-database rtcdyn set db_chaining = on?

    My databases is the problem so I have to restore RTC.

    Thanks!

  2. If you move the database you will have to enable db chaining. Restore to the same database server/instance should keep the db chaining enabled, but there is no harm in enabling it as it is required by the Lync server.
    /Atle

  3. Hey, I was wondering if its needed to add the extra temp pool and db if lync 2010 isnt production. Ive only installed edge and front end pools, no users is enabled. I just want to move the database to a SQL cluster.

    1. The reason for using the temp pool and sql is that you have to move CMS database to another pool , you can’t just move it to another sql server. I have used this several times in production environments. In your case I would probably reinstall , that would probably be the easiest.
      /Atle

Leave a Reply