Vault General

Reply
Distinguished Contributor
Raider_007
Posts: 476
Registered: ‎08-22-2006
Message 1 of 9 (448 Views)

How to reduce the size of KnowledgeVaultMaster_log.ldf

448 Views, 8 Replies
12-03-2012 01:18 PM

Hi guys,

 

We are looking at ways to reclaim some space as the Purge function is not working in Vault yet and we have no idea when this will be fixed so...

 

I was going through anything I could uninstall and delete etc and then I noticed something and I am not sure if this is supposed to be like this but the Vault DB is 13.4 Gb in size. The KnowledgeVaultMaster.mdf db is only 70Mb but the KnowledgeVaultMaster_log.ldf (located in C:\Program Files\Microsoft SQL Server\MSSQL10.AUTODESKVAULT\MSSQL\DATA) is 11.6 Gb in size!.  Is this not just a log file and is there no way to reduce its size?

I did run a Vault mainetenance script as per the advanced config guide but nothing changed really...

 

Our Vault 2013 stats are as follows:

Number of files: 694553

Database Size: 13.4 Gb

Filestore size: 513.75 Gb

Largest version: 414

AVG number of versions: 5.2

Total size of Vaults (SQL Databases): 24.51 Gb - This is what got me looking as the Vault DB size is only 13.4Gb

 

Anyway any advice would be appreciated!

 

Thanks

Pieter

Employee
paul.gunn
Posts: 442
Registered: ‎06-07-2010
Message 2 of 9 (427 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-04-2012 05:33 AM in reply to: Raider_007

Hi,

 

It sounds like the recovery model for the knowledge master may be incorrect. It should be set to simple - otherwise you can experience log growth as described. Here are some steps for checking the recovery model of the database (from sql management studio):

 

http://technet.microsoft.com/en-us/library/ms189272.aspx

 

Paul

Distinguished Contributor
Raider_007
Posts: 476
Registered: ‎08-22-2006
Message 3 of 9 (415 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-04-2012 09:12 AM in reply to: paul.gunn

Thanks for feedback. After running this query I get Model: Full

 

SELECT name, recovery_model_desc

   FROM sys.databases

      WHERE name = 'model' ;

GO

 

Do I need to change it? How do I change it?

Employee
paul.gunn
Posts: 442
Registered: ‎06-07-2010
Message 4 of 9 (409 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-04-2012 10:10 AM in reply to: Raider_007

Yes - you will want to change the recovery model to simple in order to shrink the log file. Here is a sql query to do this:

 

ALTER DATABASE KnowledgeVaultMaster SET RECOVERY SIMPLE

 

You may need to perform a backup before the log shrinking takes affect.

 

Paul

Distinguished Contributor
Raider_007
Posts: 476
Registered: ‎08-22-2006
Message 5 of 9 (406 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-04-2012 10:22 AM in reply to: paul.gunn

Hi Paul,

 

Thanks for the response.

May I ask how this could have happened or got to this state in the first place? Is there a step during installation where this can be set?

 

Ok and then lastly are you saying that I need to actually start a backup of Vault using the ADMS console, for the shrinking to kick in? Am I understanding you correctly?

 

Ok so all I need to do is run the query from SQL management studio. Would I need to do a backup first?

 

Thanks

 

Pieter

Employee
paul.gunn
Posts: 442
Registered: ‎06-07-2010
Message 6 of 9 (402 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-04-2012 10:29 AM in reply to: Raider_007

Hi,

 

Normally when we create the databases, this option is set - however this wasn't always the case in earlier versions of the product. Possibly when the database was migrated the knowledge master may have been overlooked. In any case, once you run the query you should be good from that point on.

 

So my recommendation would be to run the query. Then (when convenient) run the ADMS console backup - once the backup is run you should see a reduction in the log file size. There should be no need to run a backup before running the query.

 

Hope this helps,

 

Paul

 

 

Distinguished Contributor
Raider_007
Posts: 476
Registered: ‎08-22-2006
Message 7 of 9 (396 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-04-2012 10:44 AM in reply to: paul.gunn

Hi Pault I will give it a go and let you know. Thanks for the help.

 

Pieter

Distinguished Contributor
Raider_007
Posts: 476
Registered: ‎08-22-2006
Message 8 of 9 (349 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-19-2012 10:38 PM in reply to: paul.gunn

Hi Paul,

 

Ok the backup just finished successfully and the log file is still the same size. Does it take a while or should it reduce in size immediately?

Employee
paul.gunn
Posts: 442
Registered: ‎06-07-2010
Message 9 of 9 (343 Views)

Re: How to reduce the size of KnowledgeVaultMaster_log.ldf

12-20-2012 05:53 AM in reply to: Raider_007

Hi,

 

My understanding is that the log should have reduced size immediately. From the link I posted earlier:

 

  • After switching to the simple recovery model

    • Discontinue any scheduled jobs for backing up the transaction log.

    • Ensure periodic database backups are scheduled. Backing up your database is essential both to protect your data and to truncate the inactive portion of the transaction log.

       

      I am very puzzled as to why changing the recovery model and subsequent backup wouldn't have reduced the log size.

       

      We could try running a shrink on the log (see the sql management studio steps in the following link). However based on the previous article and information in this link, manually shrinking the log is not normally necessary.

      http://msdn.microsoft.com/en-us/library/ms178037(v=sql.105).aspx

       

      Paul

       

       

       

       

       

       

       

       

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
New button for Platinum & Gold Subscription customers
Gold & Platinum Subscription customers can alert Autodesk if they require assistance with their forum post

Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community