Manual creation of Lync 2010 Databases

Another quick post.

As great as the topology builder is at creating databases during publishing of the topology, I’m finding that apart from quick testing, coming production I usually have to create the databases via the Lync Shell whether manually or from the topology information via the InstallCSDatabase cmdlet to create the database and log files in specific location for performance.

When to use the Topology Builder to create the databases

  1. You don’t care where the databases and logs are created
  2. The SQL server\instance has configured the default database and log locations (within the SQL server properties) and this is where you want the database and logs for the Lync databases to be created

image

Why not to use the topology builder to create the databases (i.e. via the Shell)

  1. When you (Lync Admin) are not the admin of the SQL server (Split permission model)
  2. You want the database and log files to be created in specific locations (for performance and management reasons)
  3. You need to create an empty CMS database, prior to moving the CMS from one Front-End to another
  4. You going to publish the topology to an enterprise pool and you want the CMS and Front-End database and logfiles in specific locations on the back-end database server

You have two options for creating databases via the Shell:

Manually creating Database, i.e. empty databases

So this creates empty databases in very specific locations, prior to them being defined in the topology via a server role being defined specifying a given SQL store

for the CMS databases:

Install-CsDatabase -CentralManagementDatabase –SqlServerFqdn sqlbe.contoso.net -SqlInstanceName instance1 -DatabasePaths “D:\Logs”,”E:\Data”

For other databases:

Install-CsDatabase -DatabaseType <Application | Archiving | Monitoring | User | Provision> –SqlServerFqdn sqlbe.contoso.net -SqlInstanceName instance1 -DatabasePaths “D:\Logs”,”E:\Data”

Below a matrix on which databases get created with which switches:

image

Creating Database from the Topology

Firstly when publishing the topology, remember to deselect for the creation of databases during publishing on the Create database page.

clip_image002

Following the publishing and enabling of the topology, from the Lync Shell running the following (whether the Lync Admin or the SQL Admin)

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn SqlServerFqdn sqlbe.contoso.net -SqlInstanceName instance1 -DatabasePaths “D:\Logs”,”E:\Data”

A bit about SQL Split Permission Model

In large organisations, it is possible the Lync databases will be hosted on a SQL farm managed by a completely separately and a Lync Admin has no right over SQL and nor does a SQL admin have any right over Lync, See: Deployment Permissions for SQL Server http://technet.microsoft.com/en-us/library/gg398375.aspx

In this case, I would recommend the Lync Admin define the server roles and then the SQL Admin logons onto a Lync Server and then from the Shell runs the Install-CsDatabase -ConfiguredDatabases command, do make sure that the SQL Admin has permission over the file systems on the SQL server, I spent about a day troubleshooting a weird error code due to the SQL admin being a sysadmin yet not a local admin on the SQL server.

Advertisements

2 thoughts on “Manual creation of Lync 2010 Databases

  1. Pingback: Manual creation of Lync 2010 Databases | ariprotheroe « JC’s Blog-O-Gibberish

  2. Pingback: Moving SQL Express Database and Log File for a Lync Standard Edition Server | ariprotheroe

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s