Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SHRINK LOG FILE IN SIMPLE RECOVERY MODEL.


SHRINK LOG FILE IN SIMPLE RECOVERY MODEL.

Author
Message
chmavrog
chmavrog
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 117
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
Perry Whittle
Perry Whittle
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8825 Visits: 16561
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" ;-)
chmavrog
chmavrog
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 117
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
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47351 Visits: 44392
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, MVP, M.Sc (Comp Sci)
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


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search