Link to home
Start Free TrialLog in
Avatar of robbcharlton
robbcharlton

asked on

Move MDF to larger volume?

Hello all.

I'm looking for a way to move an .mdf to a larger volume. After a couple years, shrink isn't giving me any extra space. After running EXEC sp_spaceused, I see that there isn't any unallocated space left and it has gotten too big for the existing volume.

Thanks in advance.

Edit: Not sure why it says I'm a guru in this subject. Obviously I'm not :)
ASKER CERTIFIED SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of robbcharlton
robbcharlton

ASKER

Lol, I thought so, but it seemed too easy a solution to me. Thanks again!
Alternatively...(to avoid bringing the db down for a long copy time)

> Create a new db with files on new drive using a full backup on current db.  Name that db DB1_NEW
> Migrate all users from DB1 to DB1_NEW
> Rename DB1 to DB1_OLD and DB1_NEW to DB1
> Done (when you feel safe and finished testing drop DB1_OLD)....

HTH
Thanks for the add'l info. Chapmandew's instructions did the trick.
<<Chapmandew's instructions did the trick.>>

That's fine...sp_detachdb is a nice way to do it on regular db's...I wish I had the luxury of sp_detachdb on my 150Gb files and have my clients accept the file copy downtime ....
Yeah, my file wasn't quite that big. I just told my users to find something else to do for 30 minutes.

Thanks again for all the feedback.