Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Backing up a VERY large database Expand / Collapse
Author
Message
Posted Saturday, April 20, 2013 9:45 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, May 3, 2013 9:39 AM
Points: 10, Visits: 20
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
Post #1444717
Posted Saturday, April 20, 2013 11:48 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, July 17, 2014 6:47 AM
Points: 223, Visits: 1,718
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)
Post #1444729
Posted Saturday, April 20, 2013 12:50 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 2:50 AM
Points: 42,451, Visits: 35,506
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 2008, MVP
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

Post #1444737
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse