There are some tasks that any administrator of Lync
Server 2010 will manage at some point. This section covers some of these
items that don’t occur on a daily basis, but might be required at some
point.
Server Draining
A
new and useful feature to Lync Server 2010 is the concept of draining a
server when preparing it for maintenance. This enables an administrator
to prepare a server for maintenance without immediately affecting
users. Existing sessions on the server are ended immediately and users
will be transferred to a different server within the pool.
To prepare a server for maintenance, use the following steps:
1. | Open the Lync Server Control Panel.
|
2. | Click Topology.
|
3. | Highlight the server to be modified.
|
4. | Click Action and select Prevent new connections for all services.
|
5. | Alternatively, double-click the server to drill down further and manage the individual services.
|
Note
Preventing new connections is a feature that only
works with DNS load balancing and has no effect on whether a hardware
load balancer continues to send traffic to a server. If using a hardware
load balancer, perform the draining steps there instead.
This feature also does not cover load balancing of
the web component services. The hardware load balancer used to
distribute traffic to these services must also be drained to prevent new
connections to the server prepared for maintenance.
Database Import/Export
A tool familiar to many LCS and OCS administrators is
the database import/export tool called dmbimpexp.exe. This tool enables
administrators to import or export user contact lists using XML files.
Typically a SQL server backup captures the rtc database that contains
the user contact lists, but having the XML version available can be
useful when restoring from a backup that is slow or unavailable.
Note
It’s a good idea to schedule a task to export the
contact list from a pool from time to time. In a disaster scenario where
users must be forcibly moved to another pool, the contact list
information is lost. If organizations keep a current copy of the user
contact lists from this tool, it can be used to restore the lists almost
immediately. This enables users to be up and running on a new pool with
their original contact list while the old pool is restored.
The
dbimpexp tool is installed on servers in the <Lync Installation
Drive>\Program Files\Common Files\Microsoft Lync Server 2010\Support
folder. In cases where moving user contact lists between different Lync
servers this works great, but for scenarios where users might be moved
from OCS to Lync, the tool must be copied to the OCS server. The program
can also be found on the Lync installation media within the Support
folder.
Note
When moving user contact lists with dbimpexp, always
use the version provided with the recent product release. For instance,
when moving between OCS and Lync, use the dbimpexp version provided on
the Lync media. When moving between LCS and OCS, use the OCS version.
There are many options when running dbimpexp, but the
basic functionality is fairly straightforward. For a full list of the
options available, see the dbimpexp-readme.html file included in the
same folder as the executable.
To export all user contact lists to an XML file on a Standard Edition pool, use the following syntax:
dbimpexp.exe /hrxmlfile:"<Path and Filename>.xml"
To export all user contact lists to an XML file on an
Enterprise Edition pool, one additional parameter is required. Use the
following syntax:
dbimpexp.exe /hrxmlfile:"<Path and Filename>.xml" /sqlserver:"<SQL Server
FQDN and Instance Name if Named>"
After the contact lists are exported to XML and safe,
they can be applied back to the users at any time. A scheduled task can
easily perform this action on a nightly or weekly basis. Importing the
contact lists is just as simple as the export procedure. By default, the
contents of the XML file are merged with a user’s existing contacts,
but the /delete option can be used to empty the contact list before
performing an import.
To import all user contact lists from an XML file on a Standard Edition pool, use the following syntax:
dbimpexp.exe /import /hrxmlfile:"<Path and Filename>.xml" /restype:all
To import all user contact lists from an XML file on
an Enterprise Edition pool, one additional parameter is required. Use
the following syntax:
dbimpexp.exe /import /hrxmlfile:"<Path and Filename>.xml" /sqlserver:"<SQL
Server FQDN and Instance Name if Named>" /restype:all
This
is a powerful tool and can have a visible impact on user accounts if
used incorrectly, so run some test scenarios before doing these changes
in bulk. The export and import procedures can be targeted to only a
single user by using the /user:<SIP Address> parameter.