?
Solved

Move MDF to larger volume?

Posted on 2008-09-30
7
Medium Priority
?
227 Views
Last Modified: 2012-08-13
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 :)
0
Comment
Question by:robbcharlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 2000 total points
ID: 22605940
you'll need to detach the database, move the file to where you need it, and then attach the file.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22605946
0
 

Author Closing Comment

by:robbcharlton
ID: 31501567
Lol, I thought so, but it seemed too easy a solution to me. Thanks again!
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 22607886
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
0
 

Author Comment

by:robbcharlton
ID: 22607997
Thanks for the add'l info. Chapmandew's instructions did the trick.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 22608269
<<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 ....
0
 

Author Comment

by:robbcharlton
ID: 22608293
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question