Configure SQL Server Express 2008 R2 instance to host the vCloud Director database

This blog will explain how to configure the vCenter Server SQL Express 2008 R2 instance to host the vCloud Director database.  This can be handy when you have limited resources in your test environment. SQL Server Express 2008 R2  is not a supported database for vCloud Director.  For production environments check always first the VMware interoperability Matrix to know what’s supported .

image

Steps:

image

  • – Select “New Query”

image

  • The following script (from vCloud Director installation and configuration guide) creates a database named “vcloud” on the c-drive  and a special SQL user "vcloud” . Customize this script for your environment.
  • Paste this script in the “New Query” window”
    USE [master] 
    

    GO

    CREATE DATABASE [vcloud] ON PRIMARY

    (NAME = N’vcloud’, FILENAME = N’C:\vcloud.mdf’, SIZE = 100MB, FILEGROWTH = 10% )

    LOG ON

    (NAME = N’vcdb_log’, FILENAME = N’C:\vcloud.ldf’, SIZE = 1MB, FILEGROWTH = 10%)

    COLLATE Latin1_General_CS_AS

    GO

     

    USE [vcloud]

    GO

    ALTER DATABASE [vcloud] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

    ALTER DATABASE [vcloud] SET ALLOW_SNAPSHOT_ISOLATION ON;

    ALTER DATABASE [vcloud] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;

    ALTER DATABASE [vcloud] SET MULTI_USER;

    GO

     

    USE [vcloud]

    GO

    CREATE LOGIN [vcloud] WITH PASSWORD = ‘vcloudpass’, DEFAULT_DATABASE =[vcloud], DEFAULT_LANGUAGE =[us_english],CHECK_POLICY=OFF

    GO

    CREATE USER [vcloud] for LOGIN [vcloud]

    GO

     

    USE [vcloud]

    GO

    sp_addrolemember [db_owner], [vcloud]

    GO

     

    • Execute the script (1)  and make sure it has executed successfully (2)

    image

    • Open Start – All Programs – Microsoft SQL Server 2008 R2 – Configuration Tools – SQL Server Configuration Manager
    • Expand the “SQL Server Network Configuration” (1)
    • Select TCP/IP (2) and open the properties

    image

    • In the IPALL section, select the TCP port and fill in “1433”

    image

    • Restart the SQL Server (VIM_SQLEXP) service

    image

    • Open the command prompt on the SQL Server and check if port 1433 is listening by using this command:
    netstat -an | find "1433"
    

    image

    • Configure vCloud Director and point to the SQL Express instance
    image

Add SQL Server Management Studio to Microsoft SQL Server Express 2008 R2

When installing VMware vCenter 5 with the default database engine (Microsoft SQL Server Express 2008 R2) the SQL Management Studio is not installed by default. It can be confusing to add SQL Management studio at a later time. Here are the steps explained:

1. Download Microsoft SQL Express 2008 R2 (can be found here) or browse the vCenter installation ZIP or ISO. The installation package can be found in the “\redist\SQLEXPR” folder.

2. Select “New Installation or add features to an existing installation”.

2011-12-06 13h12_40

3. Select “New installation or add shared features”.

2011-12-06 13h14_41

– Only select “Management Tools – Basic”.

2011-12-06 13h15_07

When the installation is completed you see the “SQL Server Management Studio” listed under the start menu.

2011-12-06 13h24_54

Important to know is that you need exactly to follow these steps. If you choose the wrong option and  use the back button the “Management Tools – Basic” isn’t listed anymore. Strange….

Choosing between SQL 2005 Express or SQL standard/Enterprise for the VC database

VMware VirtualCenter uses standard the Micrososft SQL Express 2005 database. The statement of VMware is:

Microsoft SQL Server 2005 Express is intended to be used for small deployments of up to 5 hosts and 50 virtual machines

Microsoft SQL 2005 Expresss supports 1 CPU, 1 GB of RAM and a maximum database size of 4 GB.

There is a nice SQL Server 2005 Features Comparison page table available between Microsoft SQL Express, Workgroup, Standard and Enterprise link. Thanks ablej for pointing.