SQL log sizes

Hi Experts,

when i type this command in the Management Studio:

DBCC SQLPERF (logspace)

then I get the output of all my logfiles, space , and space used.

But why some DB has this:

Log Size (MB):  11734,49
Log Space Used (%):  0,7036548

That means less than 1% is used here from 11GB.
Is there a way to use this space ?
Eprs_AdminSystem ArchitectAsked:
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.

mcsweenSr. Network AdministratorCommented:
Log and Database files are pre-allocated by SQL.  This is to allow contingent disk space to be available for the entire log.  If you allocate too much to start or start log pruning way after the fact the actual log file will not shrink; it just frees space within the file.

You can use the following SQL code to shrink the file.  My example shrinks the file called LogFileName in MyDataBase to 7 MB.

USE MyDataBase;
GO
DBCC SHRINKFILE (LogFileName, 7);
GO

Open in new window

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
Eprs_AdminSystem ArchitectAuthor Commented:
ok i understand.
But what about to bring the DB to simple mode and back to recovery ?
Not needed here ?
0
mcsweenSr. Network AdministratorCommented:
No, you shouldn't need to do that.  That has to do with backups and when the log is actually truncated.  I would suggest performing a full backup on the database you are going to shrink before you do it though.
0
Eprs_AdminSystem ArchitectAuthor Commented:
ok thanks.
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 2008

From novice to tech pro — start learning today.