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


Backing up a VERY large database


Backing up a VERY large database

Author
Message
ianhenderson
ianhenderson
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 34
Good afternoon

I've recently discovered that there's a database attached to my SQL 2005 catalog that isn't being backed up, which means that it also isn't being shrunk down.

Although the MDF file is less than 55Mb, the LDF file is currently sitting at a massive 397GB (no, that's not a typo).

Now, before anyone points out the obvious, I know that this represents a monumental error in judgement when organising my maintenance plans, but that's what I'm in the process of trying to rectify.

Obviously, I want to backup and shrink this database to try and return as much of the used space as possible to the operating system. The problem I have is that the volume containing this fat boy is showing only 193Gb of free space and I'm concerned that the initial backup could try to create a file at least that big - this volume contains my databases so I can't have it running out of space. The only other volume I have to play with on that server is showing even less space available (122Gb), so I'm at a loss what to do.

Because this is an active database, I'm also rather loathe to run a maintenance schedule on it during working hours, so I need to be confident thatever I set to run in the small hours won't gobble up the remaining drive space and cause the server to start generating errors. The box is business critical (call-centre CTI system) so I can't risk any unscheduled downtime.

TIA
e4d4
e4d4
SSC Veteran
SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)SSC Veteran (275 reputation)

Group: General Forum Members
Points: 275 Visits: 2397
If you can change the recovery mode to simple for a maintain purpose, you can try this:
- recovery mode to simple
- full db backup
- shirink log to proper size
- recovery mode back to full/bulk logged
- configure log and db backups and perform first full db backup (to start new log chain)
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: 47133 Visits: 44346
Please read through this - Managing Transaction Logs

Once you get log backups running again you can do a once-off shrink of the log to get it back to a reasonable size. If there's no where on the local drives to write that first log backup you can write it to a network location or USB drive or, if recovering prior to current time is not required, switch to simple recovery and then back to full, take a full backup, shrink the log file then restart the log backups.


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