Difference between revisions of "Virtual Centre"

Jump to navigation Jump to search
2,697 bytes added ,  10:48, 6 April 2010
→‎SQL Database: Added SQL maintenance
m (→‎Troubleshooting: Added "Virtual Machine won't export")
(→‎SQL Database: Added SQL maintenance)
Line 84: Line 84:
# Login using the VI Client and ensure everything looks good (clusters, ESX's, VM's, Alarms, Guest Customisations etc)
# Login using the VI Client and ensure everything looks good (clusters, ESX's, VM's, Alarms, Guest Customisations etc)


=== SQL Database Maintenance ===
''Summary of maintenance info from http://www.vmware.com/files/pdf/vc_microsoft_sql_server.pdf''
====Index Fragmentation====
'''This maintenance procedure can be performed inline (ie without stopping the DB or VirtualCenter)'''
# Log into the SQL database using Query Analyser
## Run up SQL Query Analyzer, and log into the SQL server
# Perform query to check the level of fragmentation (may take 2 mins or so to run). Create and execute the following query;
#* <code> USE DB </code> (replace DB with whatever the database is called
#* <code> GO </code>
#* <code> DBCC SHOWCONTIG (VPX_HIST_STAT,VPXII_HIST_STAT) </code>
#* <code> GO </code>
# Check the query results for either of the following bad conditions
#* Scan Density < 90%
#* Logical Scan Fragmentation > 10%
# If required, perform defragmentation by running the following query (will take some time depending on level of fragmentation)
#* <code> DBCC INDEXDEFRAG ('DB', 'VPX_HIST_STAT', 'VPXII_HIST_STAT') </code>
#* <code> GO </code>
# Reheck the level of fragmentation using the following query (if Logical Scan Fragmentation is still > 30%, then may need to do reindex)
#* <code> DBCC SHOWCONTIG (VPX_HIST_STAT,VPXII_HIST_STAT) </code>
#* <code> GO </code>
# Update the statistics to continue providing accurate metrics, use the following query;
#* <code> UPDATE STATISTICS VPX_HIST_STAT WITH FULLSCAN </code>
#* <code> GO </code>
You may occasionally encounter a deadlock issue that causes the INDEXDEFRAG session to
terminate. If the session terminates in this way, there is no adverse impact on the database, and the
database continues running normally. You can issue the INDEXDEFRAG command again and the operation
resumes where it left off.
====Index Reindexing====
'''This maintenance procedure can only be performed with the database offline, the VirtualCenter Server Service must be shutdown'''
# Perform query to check the level of fragmentation (may take 2 mins or so to run). Create and execute the following query;
#* <code> USE DB </code>
#* <code> GO </code>
#* <code> DBCC SHOWCONTIG (VPX_HIST_STAT,VPXII_HIST_STAT) </code>
#* <code> GO </code>
# Check the query results for either of the following bad conditions
#* Scan Density < 70%
#* Logical Scan Fragmentation > 30%
# Stop the VirtualCenter Server Service
# Reindex the table by running this query;
#* <code> DBCC DBREINDEX ('VPX_HIST_STAT', '', 70) </code>
#* <code> GO </code>
# Once complete, restart the VirtualCenter Server Service
===Other Tasks===
Its also possible to delete old data from the database, this is achieved by running a script against the database, see http://kb.vmware.com/kb/1000125 for further info.


== Troubleshooting ==
== Troubleshooting ==

Navigation menu