Re: optimum log file size
From: Hari Prasad (hari_prasad_k_at_hotmail.com)
Date: 06/25/04
- Next message: Steve Thompson: "Re: Access 2000 & Stored Procedures"
- Previous message: reddy: "optimum log file size"
- In reply to: reddy: "optimum log file size"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Jun 2004 22:32:05 +0530
Hi,
Fixing of Transaction log file based up on the amount of bulk transaction
you have. CUrrent log growth will be because of FULL recovery mode. The only
solution for this is Backup the transaction log in intervals (1 hour once
minimum). If you do not require a point in time recovery or if your database
is development/test then set the recovery as SIMPLE.
COmmand to set SIMPLE recovery:
ALTER database <dbname> set recovery simple
-- How to reduce size.
How to clear the existing logs and shrink the file:-
Since the file is really huge, I recomment you to set the database to single
user model before doing the below steps.
-- Setting database single user.
Alter database <dbname> set single_user with rollback immediate
-- Truncate the transaction log
BACKUP log <dbname> with truncate_only
-- shrink the transacton log file
DBCC SHRINKFILE('logical_ldf_name',truncateonly)
After doing the above steps execute the below command to see the transaction
log size and usage.
DBCC SQLPERF(LOGSPACE)
-- Now set the database multi user
Alter database <dbname> set multi_user
-- Thanks Hari MCDBA "reddy" <reddy@discussions.microsoft.com> wrote in message news:B60DE98A-F466-4B52-B5F7-BC7876C66E64@microsoft.com... > hi friends, > > my log file is growing continuouly from mb's to gb.how can i avoid this.what should be the optimum log file size. > if my datafile is 500mb what should be the optimum log file size. > is there any recomendations from microsoft regarding this logsize. > > please help > > thanks > reddy
- Next message: Steve Thompson: "Re: Access 2000 & Stored Procedures"
- Previous message: reddy: "optimum log file size"
- In reply to: reddy: "optimum log file size"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|