Tuesday, December 9, 2014

SQL server fails with the error: An error occurred while attempting to configure the View Event database

SQL server fails with the error: An error occurred while attempting to configure the View Event database


Configuring VMware View Event database on an SQL server fails with the error: An error occurred while attempting to configure the database (1029537)


Symptoms


  • You cannot configure the VMware View Event database.
  • Configuring the VMware View Event database using the Admin UI fails.
  • You see the error:

    An error occured while attempting to configure the database. Double check the database parameters and ensure that the database is not down, restarting, or otherwise unavailable.
  • In the Connection server log located at C:ProgramData\VMware\VDM\logs, you see messages similar to:

    ERROR (0C68-0D0C) <TP-Processor8> [ConfigurationManagerBean] ADAM Error code: 2,128 com.vmware.vdi.admin.ui.ConfigurationManagerBean.updateDatabaseConfiguration(SourceFile:176)
    com.vmware.vdi.adamwrapper.exceptions.ADAMServerException: database initialization failed, SQL exception when connecting to database: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: The TDS protocol stream is not valid..

Purpose

This article provides troubleshooting steps to perform when you are unable to configure the VMware View Event database.

Resolution

To troubleshoot issues when you are unable to configure the VMware View Event database:
  1. Consult the product logs for additional error messages. For more information on log file locations, see Locations of VMware View log files (1027744).
  2. Ensure the SQL Server machine has network connectivity.
  3. Ensure the user name and password for the VMware View Event database account is correct.
  4. Ensure port 1433 is open. For more information, see Testing port connectivity with Telnet (1003487).

    Notes:
    • If you are using vCenter Server 5.1 with vCenter Single Sign-On (SSO) and using the same database as the View Event database, do not change the dynamic port setting to TCP port 1433. This causes SSO to fail.
    • If the SSO database uses a static port number, obtain the port number from the C:\Program Files\VMware\Infrastructure\SSOServer\logs\config file on the vCenter Server machine and use the same TCP port in View Connection server.
  5. Disable Windows Firewall on the SQL Server machine. If you are unable to do this, set a Firewall exception for port 1433.
  6. If the SQL Server binary or View Connection Server is running on Windows Server 2008, disable User Account Control (UAC). For more information, see the Microsoft TechNet article, User Account Control Step-by-Step Guide.
  7. If enabled, disable the Force Protocol Encryption option on the SQL Server machine. This is not enabled by default. For more information, see Microsoft Knowledge Base article 316898.
  8. Ensure the SQL Server authentication option is selected and the Enforce password policy options for the View Event database log in account is deselected.
  9. Ensure the SQL Server Configuration Manager TCP Dynamic Ports field is blank and the TCP Port field is populated with port 1433:

    Note: If you already have SQL configured and set to listen on a port other than 1433, changing the port setting can bring down the SQL databases. Therefore, change the port number only if a port is not already configured and in use.

    1. Click Start > All Programs > Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager.
    2. Expand SQL Server Network Configuration and select Protocols for the SQL Server.
    3. Right-click TCP/IP and click Properties.
    4. Click IP Addresses.
    5. In the IPAll section, delete the number in the TCP Dynamic Ports field and leave it blank.
    6. Type 1433 as the port number for this SQL Server instance. You see a message indicating that the service must be restarted.
    7. Restart the SQL Server service.
  10. Ensure the user account that is used to log in to the Event database is the owner of the database.

    To verify if the account used to log in to the Event database is the owner of the database:
    1. Connect to the database using SQL Server Management Studio.
    2. Expand the database directory.
    3. Right-click the View Event database and click Properties. This displays the account that owns the database.
  11. Ensure that the SQL Server and Windows Authentication mode is enabled on the SQL Server:

    1. Connect to the database using SQL Server Management Studio.
    2. Right-click SQL Server and click Properties.
    3. Click Security.
    4. Under Server authentication, select SQL Server and Windows Authentication mode and click OK. You see a message indicating that you need to restart the server.
    5. Click OK to restart the server.
    6. Right-click SQL Server and click Restart.
    7. Click Yes to confirm.
    8. Click Yes to restart the VirtualCenter Server service.
  12. Ensure that the event database is using a case-insensitive collation. For more information, see the Microsoft Developer Network articleSetting and Changing the Database Collection.

This issue can also occur if you are using an older version of the JDBC driver. To resolve this issue, use a newer version that has a number of bug fixes for SSL certificate issues.

To install the new JDBC driver:
  1. Stop the VMware View Connection Server service. For more information, see Stopping, starting, or restarting VMware View services (1026026)
  2. Create a back up of the sqljdbc-1.2.jar file by copying the file, and  renaming the copy to sqljdbc-1.2.jar.old or other name.

    The file will be located at: 
    • For View 4.5 and 4.6 C:\Program Files\VMware\VMware View\Server\broker\lib\sqljdbc-1.2.jar
    • For View 5.0, 5.1.x, 5.2.x  C:\Program Files\VMware\VMware View\Server\broker\shared\lib\sqljdbc-1.2.jar
  3. To replace the sqljdbc-1.2.jar file with the file from Microsoft SQL Server JDBC Driver 3.0:
    1. Download the driver from the Microsoft SQL Server JDBC Driver 3.0 download page.
    2. Extract sqljdbc4.jar from the downloaded file.
    3. Copy the new sqljdbc4.jar file, replacing the existing file, to:
      • For View 4.5 and 4.6 C:\Program Files\VMware\VMware View\Server\broker\lib\sqljdbc-1.2.jar
      • For View 5.0, 5.1.x, 5.2.x  C:\Program Files\VMware\VMware View\Server\broker\shared\lib\sqljdbc-1.2.jar
    Note: The new sqljdbc4.jar file does not need to be renamed.
  4. Start the VMware View Connection Server service. For more information, see Stopping, starting, or restarting VMware View services (1026026).
  5. Repeat steps 1 to 4 for each remaining Connection Server.

    Wait for five minutes before attempting to configure the Events database again.

Monday, December 8, 2014

VMware OS Optimization Tool



The VMware OS Optimization Tool helps optimize Windows 7/8/2008/2012 systems for use with VMware Horizon View. The optimization tool includes customizable templates to enable or disable Windows system services and features, per VMware recommendations and best practices, across multiple systems. Since most Windows system services are enabled by default, the optimization tool can be used to easily disable unnecessary services and features to improve performance.
You can perform the following actions using the VMware OS Optimization Tool:
  • Local Analyze/Optimize
  • Rempte Analyze/Optimize
  • Optimization History
  • Managing Templates
New for version 2014!
  • Updated templates for Windows 7/8 – based on VMware’s OS Optimization Guide
  • New templates for Windows 2008/2012 RDSH servers for use as a desktop
  • Single portal EXE design for ease of deployment and distribution
  • Combination of Remote and Local tools into one tool
  • Better template management, with built in and user-definable templates
  • Results report export feature.
Various bug fixes, usability enhancements, and GUI layout updates.

https://labs.vmware.com/flings/vmware-os-optimization-tool