Solved

Move MDF to larger volume?

Posted on 2008-09-30
7
222 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 500 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

786 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