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
- You don’t care where the databases and logs are created
- 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
Why not to use the topology builder to create the databases (i.e. via the Shell)
- When you (Lync Admin) are not the admin of the SQL server (Split permission model)
- You want the database and log files to be created in specific locations (for performance and management reasons)
- You need to create an empty CMS database, prior to moving the CMS from one Front-End to another
- 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:
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.
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.