vmich
asked on
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?
you are talking about the Vmware SQL database ? if you can the ldf and mdf file size of the database.
ASKER
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.
ASKER
well we used the sql express and not a sql server
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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 tables...in the database VIM_VCDB
There are two scripts here, the first one will show the row and total space used in the table.
the second script here, will remove Tasks and Events from the Db
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.
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 tables...in 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 s.id = OBJECT_ID(a.[Table Name])) AS [Row count], [Total space used (MB)] FROM
(
SELECT QUOTENAME(USER_NAME(o.uid)) + '.' + QUOTENAME(OBJECT_NAME(i.id)) 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)
ON
i.id = o.id AND
((o.type IN ('U', 'S')) OR o.type = 'U') AND
(OBJECTPROPERTY(i.id, 'IsMSShipped') = 0)
WHERE indid IN (0, 1, 255)
GROUP BY QUOTENAME(USER_NAME(o.uid)) + '.' + QUOTENAME(OBJECT_NAME(i.id))
) as a
ORDER BY [Total space used (MB)] DESC
the second script here, will remove Tasks and Events from the Db
alter table VPX_EVENT_ARG drop constraint FK_VPX_EVENT_ARG_REF_EVENT, FK_VPX_EVENT_ARG_REF_ENTITY
alter table VPX_ENTITY_LAST_EVENT drop constraint FK_VPX_LAST_EVENT_EVENT
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
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.
ASKER
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?
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?
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.
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.
ASKER
Ok is there an easy way to verify that we are using sql express over sql?
ASKER
I just did a search for mdb files on the C drive of the vctr, but it did not find anything.
try here...
C:\Program Files\Microsoft SQL Server\MSSQL10_50.VIM_SQLE XP\MSSQL\D ATA
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 ?
C:\Program Files\Microsoft SQL Server\MSSQL10_50.VIM_SQLE
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 ?
ASKER
db size