How can I check the database size for VMware ESXi 5.1

I need to check to see how much of the 10GB database is being used by the VMware  host for the database and was wondering how can I check this to see how much of the 10GB is being used?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you are talking about the Vmware SQL database ? if you can the ldf and mdf file size of the database.
vmichAuthor Commented:
where do are these files located so I can check them..
its on the sql server, you need to check this on the sql server.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

vmichAuthor Commented:
well we used the sql express and not a sql server
ok,, its on the same vcenter server?  it must be in the C drive search for the same in C drive. or you need to install the sql management studio to check the database and u can get the all the informaition of the database tables size.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
A quick check of the file size in the Program Files folder will show, what the file size is of the MDB file.

SQL Express is limited to a Max size of 10GB, after this it will stop, and vCenter Server will stop.

How many hosts and VMs do you have using the SQL Express Server ?

OR do you want to see how large the data sets and tables are in the DB ?

Check the following the database VIM_VCDB

There are two scripts here, the first one will show the row and total space used in the table.

SELECT [Table Name],
(SELECT rows FROM sysindexes s WHERE s.indid < 2 AND = OBJECT_ID(a.[Table Name])) AS [Row count], [Total space used (MB)] FROM 
                SELECT  QUOTENAME(USER_NAME(o.uid)) + '.' + QUOTENAME(OBJECT_NAME( AS [Table Name],
                                CONVERT(numeric(15,2),(((CONVERT(numeric(15,2),SUM(i.reserved)) * (SELECT low FROM master.dbo.spt_values (NOLOCK) WHERE number = 1 AND type = 'E')) / 1024.)/1024.)) AS [Total space used (MB)]
                FROM    sysindexes i (NOLOCK)
                                                INNER JOIN
                                sysobjects o (NOLOCK)
                       = AND
                                ((o.type IN ('U', 'S')) OR o.type = 'U') AND
                                (OBJECTPROPERTY(, 'IsMSShipped') = 0)
                WHERE indid IN (0, 1, 255)
                GROUP BY           QUOTENAME(USER_NAME(o.uid)) + '.' + QUOTENAME(OBJECT_NAME(
                ) as a
ORDER BY            [Total space used (MB)] DESC 

Open in new window

the second script here, will remove Tasks and Events from the Db


truncate table VPX_TASK
truncate table VPX_ENTITY_LAST_EVENT
truncate table VPX_EVENT
truncate table VPX_EVENT_ARG

alter table VPX_EVENT_ARG add
constraint FK_VPX_EVENT_ARG_REF_EVENT foreign key(EVENT_ID) references VPX_EVENT (EVENT_ID) on delete cascade, 
constraint FK_VPX_EVENT_ARG_REF_ENTITY foreign key (OBJ_TYPE) references VPX_OBJECT_TYPE (ID)

alter table VPX_ENTITY_LAST_EVENT add
constraint FK_VPX_LAST_EVENT_EVENT foreign key(LAST_EVENT_ID) references VPX_EVENT (EVENT_ID) on delete cascade

Open in new window

You run these scripts "as is", and your responsibility.

I would run the first script and check, if the tasks and events are large... and these are the tables causing the excessive space issue.
vmichAuthor Commented:
well we have 4 host and will be adding in another one for a total of 5.
So I just want to check the dbs files so I can see if we are close to using the 10Gb because I don't want the vctr to go down..
So do I look for these files on the vctr itself?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Check the files on SQL Server Express, e.g. on vCenter Server.

Too many, 4 hosts is really too many for SQL Express, and it's hosts, vCenter Server and ESXi is very noisy these days, the Tasks and Event tables ca n get very large.

Run my scripts, but I would recommend upgrading to SQL Full Edition.
vmichAuthor Commented:
Ok is there an easy way to verify that we are using sql express over sql?
vmichAuthor Commented:
I just did a search for mdb files on the C drive of the vctr, but it did not find anything.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
try here...

C:\Program Files\Microsoft SQL Server\MSSQL10_50.VIM_SQLEXP\MSSQL\DATA

sorry, file extension is *.mdf

1. Did you purchase a license for SQL ?

2. When you install vCenter Server, did you also just install SQL Express ?

3. Where is the SQL Server located ?

4. Check the DSN?

5. Is you SQL Server installed on vCenter Server ?

6. do you have a Microsoft SQL Service in Services ?
vmichAuthor Commented:
db size
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.