Analysis of vcenter Embedded and outer chain database

Source: Internet
Author: User
Tags db2 ibm db2 odbc postgresql

Vcenter supports both inline and out-of-chain databases, as well as its two common deployment modes.

Vcenter supports inline, and the embedded database is vpostgresql by default.

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/A7/36/wKioL1njdMWAlSagAAFPX3vUHVg511.png-wh_500x0-wm_ 3-wmp_4-s_1887215484.png "title=" 000.png "alt=" Wkiol1njdmwalsagaafpx3vuhvg511.png-wh_50 "/>

Built-in database for small deployments, easy installation and no ODBC configuration

An embedded database can be selected on a small scale, but an Oracle database is typically selected at scale.

Another point is the PSC, small scale is also embedded, but large-scale, multi-VC preferably using a separate PSC

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/08/85/wKiom1njeJzDcyZsAAL23GkClMQ622.png-wh_500x0-wm_ 3-wmp_4-s_3444369827.png "title=" 1111.png "alt=" Wkiom1njejzdcyzsaal23gkclmq622.png-wh_50 "/>

There is also the Vcneger is deployed on Windows systems, followed by the SQL SERVER database in general. The sql2008 R2 can be used with bundled databases for small deployments (up to 5 hosts and 50 virtual machines).

If Vcenter deployed vcenter SERVER APPLIANCE, the

The vcenter Server Appliance 5.0.1 version uses PostgreSQL for the embedded database instead of the IBM DB2 (IBM DB2 is used in VCenter Server Appliance 5.0).

Most of the external databases are Oracle, and you need to configure ODBC and enable Vcenter-related services in Windows vcenter. If it is vcenter Server appliance it is not necessary.

Support for ipv6,6.5 is not supported under VCenter Server Appliance 6.0.

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/08/86/wKiom1njepqTKZBlAANlzTCLCg4116.png-wh_500x0-wm_ 3-wmp_4-s_1282110862.png "title=" VC service. png "alt=" wkiom1njepqtkzblaanlztclcg4116.png-wh_50 "/>

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/08/86/wKiom1njemuzILDhAAIXwEeZSKw602.png-wh_500x0-wm_ 3-wmp_4-s_3742514302.png "title=" Odbc.png "alt=" Wkiom1njemuzildhaaixweezskw602.png-wh_50 "/>

Attention:

The VCenter Server Appliance 5 Embedded database is configured to manage a manifest that contains more than 5 hosts and more than 50 virtual machines. If you use an embedded database with Vcenter server Appliance, exceeding these limits can cause many problems, including causing VCenter server to stop responding.


Vcenterserver 6.0 The default bundled PostgreSQL database is for environments with up to 20 hosts and 200 virtual machines. For Vcenterserver Appliance, an embedded PostgreSQL database can be used in an environment with up to 1,000 hosts and 10,000 virtual machines, but the embedded database offload is Appliance with the VC. Our production is an external Oracle database.


In version 5.5, even the Oracle database outside the chain can not exceed 50GB, table row number of 800 million, or upgrade to 6.0 when the full, need to do cleanup to rise.

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/08/86/wKiom1nje-7S0Of4AAKGrS-RZ8Y623.png "title=" 999. PNG "alt=" Wkiom1nje-7s0of4aakgrs-rz8y623.png "/>

Supplemental statements to clean up the database:

Use VCDB;--VCDB is the name of the Vcenter database, and if it is a different name, replace all vcdb in the script with the actual name.

DELETEFROM dbo. vpx_event_arg;--Deleting an event log table

12.

Deletefromdbo. vpx_event;--Deleting an event log table


droptable dbo. vpx_hist_stat1;--Delete Table dbo. VPX_HIST_STAT1;

16.

droptable dbo. vpx_hist_stat2;--Delete Table dbo. VPX_HIST_STAT2;

17.

droptable dbo. vpx_hist_stat3;--Delete Table dbo. VPX_HIST_STAT3;

18.

droptable dbo. vpx_hist_stat4;--Delete Table dbo. VPX_HIST_STAT4;


Use [VCDB]

/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT1] Script Date: 12/17/2013 15:32:57 ******/


Setansi_nullson

GO

Setquoted_identifieron

GO

createtable [dbo]. [VPX_HIST_STAT1] (

[COUNTER_ID] [bigint] Notnull,

[TIME_ID]  [bigint] Notnull,

[Stat_val] [bigint] Notnull

) on [PRIMARY]

/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT1] Completed ******/

Use [VCDB]


/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT2] Script Date: 12/17/2013 15:33:30 ******/

Setansi_nullson

GO

Setquoted_identifieron

GO

createtable [dbo]. [VPX_HIST_STAT2] (

[COUNTER_ID] [bigint] Notnull,

[TIME_ID]  [bigint] Notnull,

[Stat_val] [bigint] Notnull

) on [PRIMARY]

/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT2] Completion script Date: 12/17/2013 15:33:30 ******/


Use [VCDB]

GO


/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT3] Script Date: 12/17/2013 15:34:20 ******/


Setansi_nullson

GO

Setquoted_identifieron

GO

createtable [dbo]. [VPX_HIST_STAT3] (

[COUNTER_ID] [bigint] Notnull,

[TIME_ID]  [bigint] Notnull,

[Stat_val] [bigint] Notnull

) on [PRIMARY]


/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT3] Completed ******/


Use [VCDB]

GO

/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT4] Script Date: 12/17/2013 15:34:57 ******/


Setansi_nullson

GO

Setquoted_identifieron

GO

createtable [dbo]. [VPX_HIST_STAT4] (

[COUNTER_ID] [bigint] Notnull,

[TIME_ID]  [bigint] Notnull,

[Stat_val] [bigint] Notnull

) on [PRIMARY]



/****** Rebuild Table object: Table [dbo]. [VPX_HIST_STAT4] Completed ******/


/****** Shrinking Database ******/


Use [VCDB]

GO

DBCC shrinkdatabase (N ' vcdb ')

GO

/****** Shrinking Database ******/



By the 6.5 version, more powerful, embedded and outside the chain database size difference is not big.

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/08/86/wKiom1njfITRu2sFAAEJSUDIyE4848.png "title=" 888. PNG "alt=" Wkiom1njfitru2sfaaejsudiye4848.png "/>


Another question

How to make Linux vmware vcenter support MySQL

Study Microsoft SQL's definition table and make MySQL table closest to Microsoft SQL table. Starting with file/usr/lib/vmware-vpx/vcdb_mssql.sql, I created a later vcdb_mysql.sql file.


The conversions are as follows, however these changes will force vcenter to support only UTF-8 strings. You can easily support UTF-16, but there is a limit to MySQL with a scale index of 1000 bytes, and some types of nvarchar fields extend and pass this limitation.


Convert ntext type to text type or blob type (if you want to support UTF-16) nvarchar type convert to varchar nvarchar type to varchar

Accessible and interval are treated as MySQL keywords so they need to make the following conversions:


INTERNAL to ' INTERVAL '

ACCESSIBLE to ' ACCESSIBLE '


Finally, some of the same features in Microsoft SQL Server and MySQL will not do the same thing-especially the IsNull function. This is a point of contention in MySQL, not a Microsoft SQL or Oracle NVL function equivalent to the ISNULL function. This change is as follows:


IsNull Change to Ifnull

ISNULL changed to Ifnull


In addition, the cast function in MySQL has different parameters than Microsoft SQL. I had to change the cast by signed type instead of bigint to convert the numbers, because the cast function in MySQL does not support bigint. In addition, Len is not a valid MySQL function, so we must also modify the two database declarations mentioned above to length, not Len.


The last problem is the case of capitalization. Everything in Linux is case-sensitive, including the MySQL database name, so the final change is the conversion case.


Vpx_sequence to Vpx_sequence

Vpx_object_type to Vpx_object_type

Vpx_lock to Vpx_lock

Vpx_version to Vpx_version


Use the following command to submit a new schema to the MySQL database server. Note: You should use the IP address of your MySQL server, replace the ipofmysqlserver parameter, replace the Mysqlusername parameter with your MySQL username, and the command will require a password.


Mysql-p-H ipofmysqlserver-u mysqlusername < Vcdb_mysql.sql


Now, all that remains is to resolve some stats stored programs, undoing and deleting the database.


However, even after all these updates, the MySQL attempt still fails because the VPXD service does not recognize that MySQL is a valid database. However, with some specific Linux tools, I found that PostgreSQL is a valid database.


For Gnu/linux-based vcenter server, the support of open source database is necessary.


This article is from the "Hollows Jie Sun" blog, be sure to keep this source http://xjsunjie.blog.51cto.com/999372/1972593

Parsing of Vcenter inline and out-of-chain databases

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.