VMware Cloud Community
IKirill
Enthusiast
Enthusiast

Different ways to shrink DB SQL Vcenter 5.5 and Vcenter 6.0

Hi! help clarify which tools to use to reduce the size of the SQL database and which one to choose!

Way 1:

VMware Knowledge Base

simple run DBCC SHRINKDATABASE ( DatabaseName , 5);

Way 2:

VMware Knowledge Base

simple run procedure dbo.cleanup_events_tasks_proc

Way 3:

VMware Knowledge Base

again this aticle and see attachments in kb:

Attachment s

1025914_VCDB_Purge_ORACLE.zip

1025914_VCDB_Purge_MSSQL.zip

Note that the article does not say a word about the work of these scripts. I only found the official YouTube video.

Way 4:

https://kb.vmware.com/s/article/2110031

here we must use sqlcmd

4 ways! very nice!

In my cases

1. VC 5.5 and SQL Server 2008r2

I run simple run procedure dbo.cleanup_events_tasks_proc and then 1025914_VCDB_Purge_MSSQL.zip

procedure dbo.cleanup_events_tasks_proc work fine, BUT 1025914_VCDB_Purge_MSSQL.zip cant delete rows!

Why? I don't know! Should I use the script after the procedure?

Then i go to shring DB in SQL studio and BOOM! My database has shrunk from 200 gigabytes to 30!

2. VC 6.0 and SQL Server 2012

In this case i use sqlcmd with 2110031_MS_SQL_task_event_stat.

Works fine, and DB has shrunk too!

What i must use?

Reply
0 Kudos
0 Replies