Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

Log size for SharePoint database

I find that there are several big log files on SharePoint,  can I use the normal SQL backup procedure to backup the log with truncate, and then shrink the transaction log file.

In a long run, can I change the recovery mode for these SQL database to Recovery ? Will there be any concern on this ?  

Tks

SharePoint_Config
SharePoint_AdminContent_xxxx
WSS_Content
SSISDB
Avatar of QPR
QPR
Flag of New Zealand image

Yes, backup the logs (if not in simple mode) then backup with truncate.
The recovery mode you select depends on what data you can afford to lose in a disaster.
Full mode will give you the ability to restore from backup (DB backup) and then restore all transaction log backups taken since the DB backup.
Simple mode means you can only restore the DB backup as there are no log backups.

I would put the content databases in full and others in simple.
Have a nightly DB backup for all and an hourly log backup for the DBs in full recovery mode.

While in the area check that the autogrow value on the files are not too small. Larger values with cut down on (CPU intensive) auto growths and reduce VLFs (virtual log files) within the logs
Avatar of AXISHK
AXISHK

ASKER

One more check,

Can I directly shrink the transaction log without doing the backup with truncate option, or just doing the backup without truncate option ? What's that option used for ?

Tks
Backup without truncate won't shrink, DBCC shrinkfile will, backup with truncate will
Avatar of AXISHK

ASKER

Sorry,

Do u mean that I can issue DBCC shrinkfile on the transaction log and it will truncate the committed transaction and reduces the physical size of the log file ?
I would truncate follow by DBCC shrinkfile to be sure
Avatar of AXISHK

ASKER

We can only truncate the transaction log through the backup, correct ?

The truncate and shrinkfile works on transaction log only, no need to carry out on the database, correct ?

Tks
Shrinkfile also works on the DB file too.
Avatar of AXISHK

ASKER

HOW TO Shrink database?
Can i truncate trx. log directly or it can only be truncate through backup?
ASKER CERTIFIED SOLUTION
Avatar of QPR
QPR
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK

ASKER

Tks