Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 the size of backup file

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2006-09-20 : 11:21:35
I have a data file size 5GB and Log file size 6.2GB

the size of back up file fot the database is 5GB and log file is 6GB..

are the size of back up files going to be same as the actual file size?

Also, I am doing a log back up every hour
and
the first log back up size is the same as the actual log file ( 6Gb), after that it's only 10~ 100kb.Can you explain to me why?

Here is the log file info

Size space used
App 6251.242 1.017712

As you can see, the size of log file is 6.2 GB but only 1% of space being used... Why it tryin gto back up the whole log file even though there is only 1% of space has been used??


X002548
Not Just a Number

15586 Posts

Posted - 2006-09-20 : 11:59:44
BBecause backups weren't taken previously and the size of the log was not managed and it continued to grow. SQL Server does not reduce the size of the log automatically, and for good reason. It adds to the overhead and would impact performance.

You need to look at DBCC SHRINKLOG and DBCC SHRINKFILE to reduce it

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

jung1975
Aged Yak Warrior

503 Posts

Posted - 2006-09-20 : 12:17:39
Thanks, I guess my questio is that why the first log back up is so huge and after that it's fairly smaill.
I am doing a transaction log back up every hour.


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-20 : 12:21:03
Everything that you have described is normal. The full backup will be about the size of the used space in the MDF file. The transaction log backup will be about the size of the used space in the LDF file. When you performed the first one, the used space was around 6GB. All of your future tlog backups will be smaller.

Shrinking the files will not change these backup sizes as the size only has to be with space used and not space total.

Tara Kizer
Go to Top of Page

jung1975
Aged Yak Warrior

503 Posts

Posted - 2006-09-20 : 12:49:39
thanks tara,

When you said,
"When you performed the first one, the used space was around 6GB".
does this mean there was 6GB of log file during the first transaction log back up?

why it says only 1% of spaced being used? is it because I am doing the hourly transaction log back up?


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-20 : 12:55:52
sp_spaceused can be inaccurate. Did you run the @updateusage option for sp_spaceused or DBCC UPDATEUSAGE?

Tara Kizer
Go to Top of Page

jung1975
Aged Yak Warrior

503 Posts

Posted - 2006-09-20 : 13:07:08

When I run sp_spaceused
on APP Database

[coce]
dataabse size unallocated space
App 11757.44 MB -271.38 MB
[/code]

why is the unallocaed space negative number?


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-20 : 13:09:36
Did you read my last post?

Tara Kizer
Go to Top of Page
   

- Advertisement -