Solved

Move MDF to larger volume?

Posted on 2008-09-30
7
221 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
Comment Utility
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
Comment Utility
0
 

Author Closing Comment

by:robbcharlton
Comment Utility
Lol, I thought so, but it seemed too easy a solution to me. Thanks again!
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
Comment Utility
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
Comment Utility
Thanks for the add'l info. Chapmandew's instructions did the trick.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
Comment Utility
<<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
Comment Utility
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Grid querry results 41 51
Granting access to Microsoft SQL Server 17 25
INSERT INTO SELECT JOIN THING 2 24
Help with SQL Query 23 39
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now