SharePoint deployment: DBA created databases and named instances

The SharePoint configuration wizard normally creates the databases for you. That's easy, but requires the sysadmin role in the database server. In some cases the DBA requires to create the database. The documentation at technet is very useful, but miss some details regarding accessing database named instances.

First off; the technet documentation you should read:

In my scenario I was going to access a SQL Server named instances behind a firewall in a different domain (but trusted). SQL browser was turned off and surface area was only TCP/IP. I tried the command:

Syntax: Psconfig –cmd configdb –create –server <SqlServerName> –database <SqlDatabaseName> –user <DomainName\UserName> –password <password> –admincontentdatabase <SqlAdminContentDatabaseName>

Sample: Psconfig –cmd configdb –create –server dbserver\moss –database SharePoint_Config –user adomain\moss-prod-farmadmin –password ***** –admincontentdatabase SharePoint_Admin

The first error message told me that the database server could not be found and that connection failed using Named Pipes, which was strange since I was only opening for TCP/IP. OK, the error message isn't always accurate. Keep that in mind when you check the SharePoint ULS logs. After a lot of try and fail I found out what the issues was:

  • The SQL Server use SQL Server browser to tell applications how they can access a named instances (port number, etc).
  • SQL Server Browser traffic requires that the firewall opens for UDP 1434.
  • The TCP port for the SQL Server named instance must also be opened in the firewall (1433 is the default)

The SQL Server Browser was not running and the UDP 1434 was not opened in the firewall (and we didn't want to change this). I therefore needed to specify all the details and the syntax of server must be correct (as I found out....).

The solution

Here is the what I used to get this working (important info in bold):

Sample: Psconfig –cmd configdb –create –server "dbserver\moss,1433" –database SharePoint_Config –user adomain\moss-prod-farmadmin –password ***** –admincontentdatabase SharePoint_Admin

As you can see I had to wrap the database server name in "", and specify the port number (even though it is the default port). With this little change everything went smoothly.

About the environment

Database server: dbserver\moss
- Surface area: remote TCP/IP
- Port: 1433

Firewall opening: TCP 1433

Farm admin account: adomain\moss-prod-farmadmin