Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SHRINK LOG FILE IN SIMPLE RECOVERY MODEL. Expand / Collapse
Author
Message
Posted Saturday, January 25, 2014 1:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 18, 2014 10:53 AM
Points: 2, Visits: 87
HELLO,

I consider my self as newbie in the DBA field, and this is my first topic in the forums.

I took a .bak file in order to restore a db.When the restore completed,i came up with a
a DB operating in SIMPLE RECOVERY MODEL and with a LOG file about 8GB.Since the data is not crucial
I AM TAKING full BCK EVERY 8 HOURS.

THE LOG FILE HAS MANY VLF, SINCE THE AUTOGROWTH POLICY WAS THE DEFAULT (1mb 10%) ,AND MANY OF THEM ARE INACTIVE.

WHAT IS THE RECOMMNED WAY TO SHRINK THE LOG FILE PHYSICAL SIZE.
JUST EXECUTE THE SHRINK FILE COMMAND ON THE LOG FILE?

AND IS IT SAFE TO CHANGE THE LOG FILE SIZE AUTOGROWTH PROPERTY AFTER HE SHRINK OPREATION?

THANKS IN ADVANCE
Post #1534743
Posted Sunday, January 26, 2014 2:39 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:38 PM
Points: 6,350, Visits: 13,675
Firstly, DONT TYPE IN CAPS, its extremely rude

To shrink the log file the first step you have accomplished, setting recovery to simple. Next issue the following

DBCC SHRINKFILE (Logfilename, 1)

Post back any output


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1534774
Posted Sunday, January 26, 2014 4:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 18, 2014 10:53 AM
Points: 2, Visits: 87
Perry Whittle (1/26/2014)
Firstly, DONT TYPE IN CAPS, its extremely rude

To shrink the log file the first step you have accomplished, setting recovery to simple. Next issue the following

DBCC SHRINKFILE (Logfilename, 1)

Post back any output


Perry thanks for the reply,

My db is already on simple recovery so i will run the command
Post #1534778
Posted Sunday, January 26, 2014 5:03 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:25 PM
Points: 43,008, Visits: 36,164
For more info on the log, take a read through this http://www.sqlservercentral.com/articles/Administration/64582/


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1534780
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse