Friday, May 4, 2007

Shrink LOG file in SQL for Navision/NAV

Sometimes the biggest hurdle with MS Dynamics NAV with SQL implementation is maintaining the transaction log. It goes bigger and bigger, the users starts feeling the system is going slow and a headache for the system administrators.

The way forward is simple:-SHRINK THE LOG FILE

Follow the steps given below to shrink the same.

1. Open the enterprise manager and connect to the db
2. Open the query analyser and issue the following commands in the SQL editor/Query analyser

DUMP TRAN [dbname] with NO_LOG;

where [dbname] is the database name

3. Execute the query, this execution would show the query successfully executed

4. Right click on the database now and select Shrink. Shrink the log file now to your desired size.

Note: If you simply try to Shrink the log file without issuing the command then the application is unable to shrink the log file and you will still face the issues.

Hope this topic proves helpful to you.

3 comments:

Anonymous said...

Thank you very very much for this simple steps to resolve the NAV LOG issue. It was a live saver !

Cheers!
Ang A.S.

Anonymous said...

This procedure resolved my nearly "hard disc full" problem on the server.
Thx a lot.

Pol

Anonymous said...

This saved my 'hard disk full' issue. Thank you.