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 :)
Who is Participating?

Improve company productivity with a Business Account.Sign Up

chapmandewConnect With a Mentor Commented:
you'll need to detach the database, move the file to where you need it, and then attach the file.
robbcharltonAuthor Commented:
Lol, I thought so, but it seemed too easy a solution to me. Thanks again!
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
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)....

robbcharltonAuthor Commented:
Thanks for the add'l info. Chapmandew's instructions did the trick.
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
<<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 ....
robbcharltonAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.