Topic Last Modified: 2011-03-24

Separation of roles and responsibilities between server administrators and SQL Server administrators can result in delays in implementation. Microsoft Lync Server 2010 uses role-based access control (RBAC) to mitigate these difficulties. In some instances, the SQL Server administrator must manage the installation of databases on the SQL Server-based server outside RBAC. The Lync Server Management Shell provides a way for the SQL Server administrator to run Windows PowerShell cmdlets designed to configure the databases with the correct data and log files. For details, see Deployment Permissions for SQL Server.

Important:
The following procedure assumes that at a minimum the Lync Server 2010 OCSCore.msi, SQL Server 2005 BC (SQLServer2005_BC.msi), and SQL Server Native Client (sqlncli.msi) are installed. The OCSCore.msi is located on the installation media in the \Setup\AMD64\Setup directory. SQLServer2005_BC.msi and sqlncli.msi are located in \Setup\amd64. Additionally, Active Directory preparation for Lync Server 2010 has been successfully completed.

Install-CsDatabase is the Windows PowerShell cmdlet you use to install the databases. The Install-CsDatabase cmdlet has a large number of parameters, only a few of which are discussed here. For details about the possible parameters, see the Lync Server Management Shell documentation.

Warning:
To avoid performance and possible time-out issues, always use fully qualified domain names (FQDNs) when referring to SQL Server-based servers. Avoid using host name-only references. For example, use sqlbe.contoso.net, but avoid using SQLBE.

For installing databases, Install-CsDatabase uses three primary methods for placing the databases onto the prepared SQL Server-based server:

To use Windows PowerShell cmdlets to configure the SQL Server Central Management store

  1. On any computer, log on with administrative credentials for creating the databases on the SQL Server-based server. For details, see Deployment Permissions for SQL Server.

  2. Open the Lync Server Management Shell. If you have not adjusted the execution policy for Windows PowerShell, you must adjust the policy to allow Windows PowerShell scripts to run. For details, see “Examining the Execution Policy” at http://go.microsoft.com/fwlink/?LinkId=203093.

  3. Use the Install-CsDatabase cmdlet to install the Central Management store.

    Copy Code
    Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn <fully qualified domain name of SQL Server> 
    -SqlInstanceName <named instance> -DatabasePaths <logfile path>,<database file path> 
    -Report <path to report file>
    
    Copy Code
    Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn sqlbe.contoso.net -SqlInstanceName rtc -DatabasePaths "C:\CSDB-Logs","C:\CSDB-CMS" -Report "C:\Logs\InstallDatabases.html"
    
    Tip:
    The Report parameter is optional but is useful if you are documenting the installation process.
  4. Install-CsDatabase –DatabasePaths can use up to six path parameters, each defining the paths for the drives as defined in SQL Server Data and Log File Placement. By the logical rules of the database configuration in Lync Server 2010, drives are parsed out into buckets of two, four, or six. Depending on your SQL Server configuration and the number of buckets, you will supply two paths, four paths, or six paths.

    If you have three drives, the log gets priority and the data files are distributed after. An example for a SQL Server-based server configured with six drives:

    Copy Code
    Install-CsDatabase -ConfiguredDatases -SqlServerFqdn sqlbe.contoso.net -DatabasePaths "D:\CSDynLogs","E:\CSRtcLogs","F:\MonCdrArcLogs","G:\MonCdrArchData","H:\AbsAppLog","I:\DynRtcAbsAppData" -Report "C:\Logs\InstallDatabases.html"
    
    SQL Server buckets for drive placement
  5. When the database installation completes, you can close Lync Server Management Shell or proceed to the installation of the Lync Server 2010 configured databases defined in Topology Builder.

To use Windows PowerShell cmdlets to configure the SQL Server topology configured databases

  1. To install the Topology Builder configured databases for Lync Server 2010, the Lync Server administrator must publish the topology. For details, see Publish the Topology in the Deployment documentation.

  2. On any computer, log on with administrative credentials for creating the databases on the SQL Server-based server. See the topic, Deployment Permissions for SQL Server.

    Important:
    To be able to configure the SQL Server-based databases, make sure the SQL Server administrator account used to run the steps described here is also a member of the sysadmins group (or equivalent) on the server running SQL Server and holding the Central Management Server role. This is especially important to check for any additional Lync Server pools which require SQL Server database installation or configuration. For example, if you are deploying a second pool (pool02) but the Central Management Server role is held by pool01. The SQL Server sysadmin group (or equivalent) must have permissions on both SQL Server-based databases.
  3. Open Lync Server Management Shell, if it’s not already open.

  4. Use the Install-CsDatabase cmdlet to install the Topology Builder configured databases.

    Copy Code
    Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn <fully qualified domain name of SQL Server> 
     -DatabasePaths <logfile path>,<database file path> -Report <path to report file>
    
    Copy Code
    Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn sqlbe.contoso.net 
    -Report "C:\Logs\InstallDatabases.html"
    
    Tip:
    The Report parameter is optional but is useful if you are documenting the installation process.
  5. When the database installation completes, close Lync Server Management Shell.

See Also