2.5

Table Of Contents
For example,
SELECT * from CB_FN_GOS_LICENSE_PAYG('Test Hierarchy', '2011-01-14 00:00:00.000', '2011-07-14
23:59:59.999');
The function returns values similar to the output of a SELECT query on the CB_VIEW_GOS_LICENSE_INVENTORY
database view. However, in this case the data for only a given hierarchy and for a specific duration is returned.
NOTE The CB_FN_GOS_LICENSE_PAYG function assumes that all the virtual machines in vCenter Chargeback
Manager under the Pay as You Go model for any hierarchy organization is present under Pay as You Go >
Any_OrgVDC > vApps Folder > vApps.
Running the Guest OS Licensing Script in Oracle
You must have the SELECT permission on the tables in the vCenter Chargeback Manager database to run the
guest OS licensing script.
On running the script, two database objects are created.
n
The CB_VIEW_GOS_LICENSE_INVENTORY database view.
n
The CB_FN_GOS_LICENSE_PAYG function.
The CB_VIEW_GOS_LICENSE_INVENTORY view contains the guest OS details and the corresponding memory,
vCPU, and power state details for all the virtual machines that are part of any hierarchy created in vCenter
Chargeback Manager. The CB_FN_GOS_LICENSE_PAYG function returns the guest OS details and the
corresponding memory, vCPU, and power state details for all the virtual machines in the Pay As You Go model
for a given hierarchy ($hierarchy_name) and for the specified time period ($start_time : $end_time).
Table 8-2 lists the details of the columns in the CB_VIEW_GOS_LICENSE_INVENTORY database view. The
CB_FN_GOS_LICENSE_PAYG function returns values similar to the output of a SELECT query on the
CB_VIEW_GOS_LICENSE_INVENTORY database view. However, in this case the data for only a given hierarchy and
for a specific duration is returned.
For example,
SELECT * from TABLE(CB_FN_GOS_LICENSE_PAYG('Test Hierarchy',to_timestamp('20110114 00:00:00',
'YYYYMMDD HH24:MI:SS'), to_timestamp('20110714 23:59:59', 'YYYYMMDD HH24:MI:SS')));
NOTE The CB_FN_GOS_LICENSE_PAYG function is created based on the assumption that all the virtual machines
in vCenter Chargeback Manager under the Pay as You Go model for any hierarchy organization is present
under Pay as You Go > Any_OrgVDC > vApps Folder > vApps.
Storage Allocation Script
The storage allocation script helps you identify the storage allocation details for the virtual machines that are
part of any hierarchy created in vCenter Chargeback Manager.
Running the Guest OS Licensing Script in SQL Server
You must have the SELECT permission on the tables in the vCenter Chargeback Manager database to run the
guest OS licensing script.
On running the script, two database objects are created.
n
The CB_VIEW_STORAGEALLOC_INVENTORY database view.
n
The CB_FN_STORAGE_ALLOC_PAYG function.
The CB_VIEW_STORAGEALLOC_INVENTORY view contains the storage allocation values for the virtual machines that
are part of any hierarchy created in vCenter Chargeback Manager. Table 8-4 lists the details of the columns in
the CB_VIEW_STORAGEALLOC_INVENTORY view.
Chapter 8 Administration Utilities
VMware, Inc. 143