Shrinking Vault database

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
asears
Posts: 4
Joined: Mon Dec 05, 2005 8:38 am

Shrinking Vault database

Post by asears » Wed Oct 07, 2009 7:01 am

Are there any SQL scripts available to clear out obliterated files in order to shrink the size of the Vault server database?

Are there any other options for shrinking the size of the database in order to optimize the backup process?

We are using Vault 4.14 with SQL 2005.

Thanks,
Andrew

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Shrinking Vault database

Post by Beth » Wed Oct 07, 2009 12:18 pm

Obliterated files are no longer in the Vault database. In case you haven't obliterated yet, I want to let you know that obliterates make it nearly impossible to use the Export/Import tool.

The database will keep hold of the empty space though. What you can do is first, make a backup of the database. Then, run the following in query analyzer:

Code: Select all

 DBCC SHRINKDATABASE ('sgvault')


There is a Microsoft KB article on shrinking databases here: http://technet.microsoft.com/en-us/libr ... 89080.aspx.

If the database doesn't shrink with what I wrote, you might try:

Code: Select all

DBCC SHRINKDATABASE ('sgvault', truncateonly)
Beth Kieler
SourceGear Technical Support

Post Reply