Topic Last Modified: 2011-04-06

When you are removing the Microsoft Lync Server 2010 deployment, you need to remove database and log files on one or more database servers. You may encounter a scenario where you need to retain the database and log files (for example, a hardware move), or in a different scenario where you need to delete the database and log files (for example, moving from test to production).

Important:
The following procedure notes whether a step might cause irreversible loss of the database files given a particular scenario.

To uninstall SQL Server instances and, databases

  1. Log on to the computer where Lync Server Management Shell is installed as a member of the Domain Admins group or the RTCUniversalServerAdmins group. You must also be a SQL Server sysadmin or equivalent on the SQL Server where the databases are located.

  2. Start the Lync Server Management Shell: Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Management Shell.

  3. To drop and retain the database and log files associated with user information (for example, access control lists, home server or pool, and scheduled conferences), type:

    Copy Code
    Uninstall-CsDatabase -DatabaseType User -Detach -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    
    Warning:
    The following command drops, and then deletes the database files and logs. The action cannot be reversed.
    Copy Code
    Uninstall-CsDatabase -DatabaseType User -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    

    The commands acts on the following data files and logs:

    • Transient user and presence data: rtcdyn.mdf and rtcdyn.ldf

    • Persistent user data: rtc.mdf and rtc.ldf

    • Address book service information (secondary copy for performance): rtcab, rtcab1.mdf and rtcab, rtcab1.ldf

  4. To drop and retain the database and log files associated with applications in Lync Server 2010 (for example, the Call Park server and the Response Group service), type:

    Copy Code
    Uninstall-CsDatabase -DatabaseType Application -Detach -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    
    Warning:
    The following command drops, and then deletes the database files and logs. The action cannot be reversed.
    Copy Code
    Uninstall-CsDatabase -DatabaseType Application -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    

    The commands acts on the following data files and logs:

    • Call Park dynamic information: cpsdyn.mdf and cpsdyn.ldf

    • Response Group service data: rgsconfig.mdf and rgsconfig.ldf

    • Response Group service dynamic data: rgsdyn.mdf and rgsdyn.ldf

  5. To drop and retain the database and log files associated with applications in Lync Server 2010 (for example, the Call Park server and the Response Group service), type:

    Copy Code
    Uninstall-CsDatabase -DatabaseType Archiving -Detach -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    
    Warning:
    The following command drops and then deletes the database files and logs. The action cannot be reversed.
    Copy Code
    Uninstall-CsDatabase -DatabaseType Archiving -Detach -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    

    The commands acts on the following data files and logs:

    • Archiving Server database files for retention of instant messages and conferencing data: lcslog.mdf and lcslog.ldf

  6. To drop and retain the database and log files associated with the Monitoring Server in Lync Server 2010 (for example, Quality of Experience (QoE) data and call detail records), type:

    Copy Code
    Uninstall-CsDatabase -DatabaseType Monitoring -Detach -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    
    Warning:
    The following command drops and then deletes the database files and logs. The action cannot be reversed.
    Copy Code
    Uninstall-CsDatabase -DatabaseType Monitoring -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    

    The commands acts on the following data files and logs:

    • Call detail records data and log files: lcscdr.mdf and lcscdr.ldf

    • QoE data and log files: qoemetrics.mdf and qoemetrics.ldf

  7. To drop and retain the database and log files associated with the Central Management store in Lync Server 2010 (for example, QoE data and call detail records), type:

    Copy Code
    Uninstall-CsDatabase -CentralManagementDatabase -Detach -SqlServerFqdn sqlbe.contoso.net [-SqlInstanceName <instance name>]
    
    Warning:
    The following command drops, and then deletes the database files and logs. The action cannot be reversed.
    Copy Code
    Uninstall-CsDatabase -CentralManagementDatabase -SqlServerFqdn sqlbe.contoso.net[-SqlInstanceName <instance name>]
    
    Warning:
    This action cannot be reversed without restoring the SQL Server and associated configurations. The command drops, and then deletes the databases, files, and logs.

    The commands acts on the following databases, files, and logs:

    • Current configuration of Lync Server 2010 topology data: xds.mdf and xds.ldf

    • Location Information service data: lis.mdf and lis.ldf

See Also

Other Resources

Uninstall-CsDatabase