
Table 9-1.
Generic SQL Scripts
Script Name
Description
countActiveConns
This script returns the number of active connections to the database.
countRows
This script returns the number of rows in each of the tables in the database.
dbSize
This script return the space occupied by the tables in the database.
Space Calculation Scripts
The space calculation scripts shipped with vCenter Chargeback enable you to calculate the space that can be
retrieved by purging the old data from the database tables.
Prerequisites for Running the Space Calculation Scripts
You must have the SELECT permission on the tables in the vCenter Chargeback database to run the space
calculation scripts. The
v_months_in_history
parameter in the Oracle scripts and the
@MONTHS_IN_HISTORY
parameter in the SQL Server scripts is set to 6 months by default. You can change this in the scripts to the
desired number of months.
About the Space Calculation Scripts
Table 9-2
lists the space calculation scripts provided with vCenter Chargeback.
Table 9-2.
Space Calculation Scripts
Script
Description
spaceCostData
This script returns the amount of space that can be retrieved by purging the cost data that is older
than the specified number of months.
spaceHierarchyData
This script returns the amount of space that can be retrieved by purging the hierarchy data that
is older than the specified number of months.
spaceReportData
This script returns the amount of space that can be retrieved by purging the report data that is
older than the specified number of months.
spaceTablesData
This script returns the amount of space that can be retrieved by purging the cost, hierarchy, and
report data that is older than the specified number of months.
spaceStatsData
This script returns the amount of space that can be retrieved by purging the performance statistics
data (from the
CB_VC_PERFORMANCE_STAT
table) that is older than the specified number of
months.
Data Purging Scripts
The data purging scripts enable you to remove data older than the specified number of months from the vCenter
Chargeback database tables.
Prerequisites for Running the Data Purging Scripts
You must have the SELECT and DELETE permissions on the vCenter Chargeback database tables to run the
data purging scripts. Before you run the scripts, take a backup of the vCenter Chargeback database.
About the Data Purging Scripts
Table 9-3
lists the data purging scripts provided with vCenter Chargeback.
Chapter 9 Administration Utilities
VMware, Inc.
131