Monday, February 13, 2012

am I backing up free space

sql2k sp3
All ideas are welcomed. In my db;
dbfile1 used 5796.94mb, free 295.56mb
dbfile2 used 4212.52mb, free 75.62mb
log used 75.14mb, free 4401.1mb
My backup is 13.2 gigs. By my calulations it should be 10.
How can it be?
TIA, Chrisi'm pretty sure you are backing up the free space. try restoring one
of the dbs and you can see then how the files are restored. do you
need such a large transaction log?
think you would be better shrinking it and letting it grow again.
advice from - http://www.sql-server-performance.com/misc_tips.asp
According to Microsoft, the way to shrink a log file is to use DBCC
SHRINKFILE. This process is painfully slow and inefficient. Even after
running the procedure numerous times, you may not get much free space.
Here's another way to shrink your logs that is guaranteed to work
every time. First, back up the database and then detach (sp_detach_db)
it (you will have to bring the database down to do this). Next,
delete the log file and then re-attach (sp_attach_db) the database,
not providing the old log file location from within the sp_attach_db
command. This will create a new log file with the old log file name in
the old location with default size i.e. 512 KB.
To make sure there is no problem during the operation, the old log
file can be renamed and kept until the database is reattached
successfully. This provides a backup plan if for some reason SQL
server fails to attach the database without the old log file.
This trick won't work if the database has more than one log file, but
if you need to, you can alter the database so that it only has a
single log file, while will allow you to perform the above steps.
After carrying out the detach and attach database activity, the
database can be again altered to add more log files. [7.0, 2000] Added
2-24-2003 Contributed by Gaurav Bindlish
hope this helps,
rh
"chris" <anonymous@.discussions.microsoft.com> wrote in message news:<21fb01c3e081$13570960$a401280a@.phx.gbl>...
> sql2k sp3
> All ideas are welcomed. In my db;
> dbfile1 used 5796.94mb, free 295.56mb
> dbfile2 used 4212.52mb, free 75.62mb
> log used 75.14mb, free 4401.1mb
> My backup is 13.2 gigs. By my calulations it should be 10.
> How can it be?
> TIA, Chris

No comments:

Post a Comment