Shrinking a log file SQL 05

Hello all.  I have a huge log file 5 gig.  The database file is 3 gig which is normal.  I tried going into shrink files and selected the log and it says it has 95% unused space.  I hit shrink but it does nothing even if I set it a gig smaller.  Any ideas on how to shrink this thing?
sbornstein2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slam69Commented:
Hi,

back up the transactaion log and this will empty it back down to zero for you ;o)
0
slam69Commented:
Right click your db

select tasks, back up and then select options to back up your transaction log
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

sbornstein2Author Commented:
did this and it completed pretty fast but the log file is still showing over 5 gig and in the properties of the database it also still shows allocated 5 gig.  Maybe that is just the size it should be huh?
0
slam69Commented:
ok if you go right click database and select properties go to files tabe

You wil lsee the line for your log file which will have an initial size next to it sounds like this is set to 5gb for you. Set it to be a size relative to your db use and data file and set it to grow by 10 percent unrestricted and monitor for a few days
0
sbornstein2Author Commented:
tried that to and it doesnt take.  It stays the same after I open it back up and look at properties again.
0
slam69Commented:
Hi sounds like the recovery mode might not be set to full

check teh following post

http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_23077499.html
0
slam69Commented:
hang on... is it just oin that initial size screen the log is showing as 5gb?

if so and you go to teh back up files option change the filetype to log and you will see allocated space as 5gb and available free space its liekly thsi available free space is about 99.9% if you have shrunk etc.

Not sure if you can change the size onc ethe db has been set up, only thing you could do would be take db offline. create a new logfile for the db an dthen drop teh existing 5gb one
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sbornstein2Author Commented:
ya its set to full currently
0
slam69Commented:
check my very last comment should clear it all up for you
0
sbornstein2Author Commented:
thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.