---
title: "vCenter Server 5.5 on SQL Server 2012 installation – Part 2"
date: "2013-11-02T07:30:57Z"
tags: ["SQL Server", "SQL Server 2012 SP1", "Windows Server", "Windows Server 2012", "vCenter Server"]
categories: ["Microsoft", "VMware"]
---

![vCenter Server Part - 2][1]

In the second post of vCenter 5.5 installation, I will cover following topics.

* MSSQL databases preparation
* MSSQL ODBC connectivity
<!--more-->
<!--adsense-->
## vCenter Server 5.5 database creation

In order to create database execute following script //vCenter-Server/dbschema/**DB\and\schema\creation\scripts_MSSQL.txt**

Change database name, username, password and database location according to your setup.

```sql
use [master]
go
CREATE DATABASE [VCDB] ON PRIMARY 
(NAME = N'vcdb', FILENAME = N'C:VCDB.mdf', SIZE = 3000KB, FILEGROWTH = 10% )
LOG ON
(NAME = N'vcdb_log', FILENAME = N'C:VCDB.ldf', SIZE = 1000KB, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
go
use VCDB
go
sp_addlogin @loginame=[vpxuser], @passwd=N'vpxuser!0', @defdb='VCDB', @deflanguage='us_english'
go
ALTER LOGIN [vpxuser] WITH CHECK_POLICY = OFF
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
use MSDB
go
CREATE USER [vpxuser] for LOGIN [vpxuser]
go
```

After Database is successfully created we should create ODBC connection which will allow vCenter to communicate with SQL Server.

## MSSQL ODBC configuration

In your vCenter Server go to **Control Panel Administrative Tools ODBC Data Sources (64-bit)**

![Windows Server 2012 ODBC Data Source (64-bit)][2]

and select **System DSN**. Click Add and select **SQL Server Native Client 11.0**.

![Windows Server 2012 SQL Server Native Client DSN][3]

In new window provide data source name, description and location of the database (in my case local).

![Windows Server 2012 DSN 1][4]

Change the default database to vCenterDB, click next and Finish. Next step is to test if the connection works. Click **Test Data Source** and you should receive information about a successful connection.

![Windows Server 2012 DSN 3][5]

Before installing vCenter server I added user ap-vcenter@marusiak.local to security logins and I granted sysadmin rights to vCenterDB.

In order to do that go to SQL Server Management Studio and navigate to **Security Logins** and click **New Login**.

![Windows Server 2012 New Security Login][6]

In new window provide username - in my case **Marusiak\ap-vcenter**. Go to **Server Roles** and grant user **sysadmin** rights.

![Windows Server 2012 New Security Login Sysadmin][7]

Next go to **User Mappings**, select vCenterDB and grant user **db_owner** rights.

![Windows Server 2012 New Security Login dbowner][8]

After all, preparation was done we can easily install vCenter Server 5.5 which I will cover in third and last part of series.

In third post <a title="Third part of SQL Server 2012 installation" href="https://www.wojcieh.net/vcenter-server-5-5-on-sql-server-2012-installation-part-3/" target="_blank" rel="noopener">https://www.wojcieh.net/vcenter-server-5-5-on-sql-server-2012-installation-part-3/</a> I went through vCenter Server components installation.

[1]: /images/uploads/2013/11/vCenter-Server-Part2.webp
[2]: /images/uploads/2013/10/Windows-Server-2012-ODBC-Data-Source-64-bit.webp
[3]: /images/uploads/2013/10/Windows-Server-2012-SQL-Server-Native-Client-DSN.webp
[4]: /images/uploads/2013/10/Windows-Server-2012-DSN-1.webp
[5]: /images/uploads/2013/10/Windows-Server-2012-DSN-3.webp
[6]: /images/uploads/2013/10/Windows-Server-2012-New-Security-Login.webp
[7]: /images/uploads/2013/10/Windows-Server-2012-New-Security-Login-Sysadmin.webp
[8]: /images/uploads/2013/10/Windows-Server-2012-New-Security-Login-dbowner.webp
