6.5.1

Table Of Contents
Procedure
1 Create a database and user for vCenter Server.
a In the master database, create a database for vCenter Server.
b Create a database user for vCenter Server and map it to the vCenter Server and msdb
databases.
For example, to create the database VCDB and user vpxuser, you can run the following script:
use master
go
CREATE DATABASE VCDB ON PRIMARY
(NAME = N'vcdb', FILENAME = N'C:\database_path\VCDB.mdf', SIZE = 10MB, FILEGROWTH = 10% )
LOG ON
(NAME = N'vcdb_log', FILENAME = N'C:\database_path\VCDB.ldf', SIZE = 1000KB, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
go
use VCDB
go
CREATE LOGIN vpxuser WITH PASSWORD=N'vpxuser!0', DEFAULT_DATABASE=VCDB,
DEFAULT_LANGUAGE=us_english, CHECK_POLICY=OFF
go
CREATE USER vpxuser for LOGIN vpxuser
go
use MSDB
go
CREATE USER vpxuser for LOGIN vpxuser
go
You now have a Microsoft SQL Server database that you can use with vCenter Server.
2 In the vCenter Server database, create a database schema and assign it to the vCenter Server
database user.
For example, to create the schema VMW in VCDB and assign it to the vpxuser user, you can run the
following script:
use VCDB
CREATE SCHEMA VMW
go
ALTER USER vpxuser WITH DEFAULT_SCHEMA =VMW
3 In the vCenter Server database, create and grant privileges to the VC_ADMIN_ROLE and
VC_USER_ROLE database roles and assign them to the vCenter Server database user.
For example, to create the roles in VCDB and assign them to the vpxuser user, you can run the
following script:
use VCDB
go
if not exists (SELECT name FROM sysusers WHERE issqlrole=1 AND name = 'VC_ADMIN_ROLE')
CREATE ROLE VC_ADMIN_ROLE;
vSphere Installation and Setup
VMware, Inc. 290