This topic describes how to create database objects manually instead of letting the vCenter Server installer create the data objects automatically.

Procedure

  1. Log in to a Microsoft SQL Server Management Studio session with the vCenter Server database user account that you created on the vCenter Server and msdb databases.
  2. In the vCenter Server installation package, locate the dbschema scripts in the vCenter-Server/dbschema directory.
  3. Open the VCDB_mssql.SQL and the TopN_DB_mssql.sql files by using Microsoft SQL Server Management Studio and replace all occurrences of $schema with your schema name.
  4. Open the VCDB_views_mssql.sql file by using Microsoft SQL Server Management Studio and after each occurrence of ;, insert a new line and write go.
  5. Run the scripts in a sequence on the database.
    The DBO user must own the objects created by these scripts. Open the scripts one at a time in Microsoft SQL Server Management Studio and press F5 to execute each script in the following order:
    1. VCDB_mssql.SQL
    2. insert_stats_proc_mssql.sql
    3. load_stats_proc_mssql.sql
    4. purge_stat2_proc_mssql.sql
    5. purge_stat3_proc_mssql.sql
    6. purge_usage_stats_proc_mssql.sql
    7. stats_rollup1_proc_mssql.sql
    8. stats_rollup2_proc_mssql.sql
    9. stats_rollup3_proc_mssql.sql
    10. cleanup_events_mssql.sql
    11. delete_stats_proc_mssql.sql
    12. upsert_last_event_proc_mssql.sql
    13. load_usage_stats_proc_mssql.sql
    14. TopN_DB_mssql.sql
    15. calc_topn1_proc_mssql.sql
    16. calc_topn2_proc_mssql.sql
    17. calc_topn3_proc_mssql.sql
    18. calc_topn4_proc_mssql.sql
    19. clear_topn1_proc_mssql.sql
    20. clear_topn2_proc_mssql.sql
    21. clear_topn3_proc_mssql.sql
    22. clear_topn4_proc_mssql.sql
    23. rule_topn1_proc_mssql.sql
    24. rule_topn2_proc_mssql.sql
    25. rule_topn3_proc_mssql.sql
    26. rule_topn4_proc_mssql.sql
    27. process_license_snapshot_mssql.sql
    28. l_stats_rollup3_proc_mssql.sql
    29. l_purge_stat2_proc_mssql.sql
    30. l_purge_stat3_proc_mssql.sql
    31. l_stats_rollup1_proc_mssql.sql
    32. l_stats_rollup2_proc_mssql.sql
    33. VCDB_views_mssql.sql
  6. (Optional) Run the scripts to enable database health monitoring.
    1. job_dbm_performance_data_mssql.sql
    2. process_performance_data_mssql.sql
  7. For all supported editions of Microsoft SQL Server except Microsoft SQL Server Express, run the scripts to set up scheduled jobs on the database.
    These scripts ensure that the SQL Server Agent service is running.
    1. job_schedule1_mssql.sql
    2. job_schedule2_mssql.sql
    3. job_schedule3_mssql.sql
    4. job_cleanup_events_mssql.sql
    5. job_topn_past_day_mssql.sql
    6. job_topn_past_week_mssql.sql
    7. job_topn_past_month_mssql.sql
    8. job_topn_past_year_mssql.sql
  8. For all the procedures you created in Step 5, grant the execute privilege to the vCenter Server database user in the vCenter Server database.
    For example, to grant execute privilege for the procedures to the vpxuser user, you can run the following script.
    grant execute on insert_stats_proc to vpxuser
    grant execute on purge_stat2_proc to vpxuser
    grant execute on purge_stat3_proc to vpxuser
    grant execute on purge_usage_stat_proc to vpxuser
    grant execute on stats_rollup1_proc to vpxuser
    grant execute on stats_rollup2_proc to vpxuser
    grant execute on stats_rollup3_proc to vpxuser
    grant execute on cleanup_events_tasks_proc to vpxuser
    grant execute on delete_stats_proc to vpxuser
    grant execute on upsert_last_event_proc to vpxuser
    grant execute on load_usage_stats_proc to vpxuser
    grant execute on load_stats_proc to vpxuser
    grant execute on calc_topn1_proc to vpxuser
    grant execute on calc_topn2_proc to vpxuser
    grant execute on calc_topn3_proc to vpxuser
    grant execute on calc_topn4_proc to vpxuser
    grant execute on clear_topn1_proc to vpxuser
    grant execute on clear_topn2_proc to vpxuser
    grant execute on clear_topn3_proc to vpxuser
    grant execute on clear_topn4_proc to vpxuser
    grant execute on rule_topn1_proc to vpxuser
    grant execute on rule_topn2_proc to vpxuser
    grant execute on rule_topn3_proc to vpxuser
    grant execute on rule_topn4_proc to vpxuser
    grant execute on process_license_snapshot_proc to vpxuser
    grant execute on l_stats_rollup3_proc to vpxuser
    grant execute on l_purge_stat2_proc to vpxuser
    grant execute on l_purge_stat3_proc to vpxuser
    grant execute on l_stats_rollup1_proc to vpxuser
    grant execute on l_stats_rollup2_proc to vpxuser
    

    If you ran the script process_performance_data_mssql.sql in Step 5, grant the following execute privilege to the vCenter Server database.

    grant execute on process_performance_data_proc to vpxuser

Results

You created the vCenter Server tables manually.
Note: During the vCenter Server installation, when a database reinitialization warning message appears, select Do not overwrite, leave my existing database in place and continue the installation.