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

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:

a

VCDB_mssql.SQL

b

insert_stats_proc_mssql.sql

c

load_stats_proc_mssql.sql

d

purge_stat2_proc_mssql.sql

e

purge_stat3_proc_mssql.sql

f

purge_usage_stats_proc_mssql.sql

g

stats_rollup1_proc_mssql.sql

h

stats_rollup2_proc_mssql.sql

i

stats_rollup3_proc_mssql.sql

j

cleanup_events_mssql.sql

k

delete_stats_proc_mssql.sql

l

upsert_last_event_proc_mssql.sql

m

load_usage_stats_proc_mssql.sql

n

TopN_DB_mssql.sql

o

calc_topn1_proc_mssql.sql

p

calc_topn2_proc_mssql.sql

q

calc_topn3_proc_mssql.sql

r

calc_topn4_proc_mssql.sql

s

clear_topn1_proc_mssql.sql

t

clear_topn2_proc_mssql.sql

u

clear_topn3_proc_mssql.sql

v

clear_topn4_proc_mssql.sql

w

rule_topn1_proc_mssql.sql

x

rule_topn2_proc_mssql.sql

y

rule_topn3_proc_mssql.sql

z

rule_topn4_proc_mssql.sql

aa

process_license_snapshot_mssql.sql

ab

l_stats_rollup3_proc_mssql.sql

ac

l_purge_stat2_proc_mssql.sql

ad

l_purge_stat3_proc_mssql.sql

ae

l_stats_rollup1_proc_mssql.sql

af

l_stats_rollup2_proc_mssql.sql

ag

VCDB_views_mssql.sql

6

(Optional) Run the scripts to enable database health monitoring.

a

job_dbm_performance_data_mssql.sql

b

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.

a

job_schedule1_mssql.sql

b

job_schedule2_mssql.sql

c

job_schedule3_mssql.sql

d

job_cleanup_events_mssql.sql

e

job_topn_past_day_mssql.sql

f

job_topn_past_week_mssql.sql

g

job_topn_past_month_mssql.sql

h

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 v
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

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.