Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to reduce the size of KnowledgeVaultMaster_log.ldf

12 REPLIES 12
Reply
Message 1 of 13
Raider_71
2338 Views, 12 Replies

How to reduce the size of KnowledgeVaultMaster_log.ldf

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

12 REPLIES 12
Message 2 of 13
paul.gunn
in reply to: Raider_71

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

Message 3 of 13
Raider_71
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?

Message 4 of 13
paul.gunn
in reply to: Raider_71

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

Message 5 of 13
Raider_71
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

Message 6 of 13
paul.gunn
in reply to: Raider_71

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

 

 

Message 7 of 13
Raider_71
in reply to: paul.gunn

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

 

Pieter

Message 8 of 13
Raider_71
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?

Message 9 of 13
paul.gunn
in reply to: Raider_71

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

       

       

       

       

       

       

       

       

Message 10 of 13
scottmoyse
in reply to: paul.gunn

@Raider_71 did you ever get to the bottom of this? I have a site here with a _log.ldf file sitting at 92GB, when the actual DB is only 23GB. I've changed it to the Simple recovery type and have an SQL maintenance plan running at the moment. I haven't tried a backup since change to Simple yet. I will run that once the maintenance plan has finished.


Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


Design & Manufacturing Technical Services Manager at Cadpro New Zealand

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

Message 11 of 13
Raider_71
in reply to: scottmoyse

Hi Scott,

 

No I have not found a solution yet.

 

Please let me know if you come accross something though.

 

Pieter

Message 12 of 13
Mark.Lancaster
in reply to: Raider_71

My understanding after you change the plan to simple, the maintenance plan should take care of it the next time it is run.  But I have also seen where you have to manually go back in and reset the initial size as described in the Vault SQL maintenance plan: http://knowledge.autodesk.com/support/vault-products/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU...

 

So I would try that...

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Message 13 of 13
Vaibhav.Shelar
in reply to: Raider_71

I am also facing the same issue of _log.ldf having larger size.  I have manually tried shrining it. The size got reduced but Vault is not working. while running Tools- Administration it shows error as "Failure calling Web Services on 'http://servername/'. See log for details". Any one tried manually successful shrinking ?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report