473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

moving data files to a new disk, same server

Hello, I have been having a bit of trouble finding help on the safest
way to move data files to a different disk on the same server. Most
help is about moving data files to a different sqlserver. I just want
to move the files to a different drive on the same server. Any help
would be appreciated.

Thanks,

David

Jul 23 '05 #1
6 5944
There shouldn't be any real difference between moving a database to a
new location on the same server or to a different one, unless you have
special requirements such as not being able to take the database
offline. Backup/restore and attach/detach are both possible solutions:

http://support.microsoft.com/default...b;en-us;224071
http://support.microsoft.com/default...b;en-us;221465

If this isn't helpful, perhaps you could give some more details of what
solutions you've looked at, and why they don't meet your requirements.

Simon

Jul 23 '05 #2
Thanks, I was looking at detach/attach. Do I just detach the db, move
the data files in explorer, and reattach the db?

David

Jul 23 '05 #3

1. First detach the db using as :
sp_detach_db <db-name>

2. And place all your files using windows explorer or the command prompt
utility to the locations of your choice.

3. Then attach the db using as :
sp_attach_db <db-name>,<path and file1>,<path and file2>,....,<path
and file16>

If you are using more than 16 files use CREATE DATABASE statement
using the FOR ATTACH option.

That will be enough!

Regards
Debian

*** Sent via Developersdex http://www.developersdex.com ***
Jul 23 '05 #4

<da*********@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Thanks, I was looking at detach/attach. Do I just detach the db, move
the data files in explorer, and reattach the db?

David


The first link I posted has all the details, but yes, that's all you have to
do. And of course, it would be a good idea to make a backup before moving
the database, just in case.

Simon
Jul 23 '05 #5
Just back it up, delete it and restore it in the new location. No
reason to mess around with all that attach, detach junk.

Jul 23 '05 #6

"pb648174" <go****@webpaul.net> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Just back it up, delete it and restore it in the new location. No
reason to mess around with all that attach, detach junk.
I don't understand your aversion to attach/detach. It's fairly
straightforward and in cases like this can be faster.


Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stephen Ghelerter | last post by:
I am moving a web site with a MySql database to another server. Can I create a database on the new server with the same name and then move the tables there, or is life not that simple? Or can I...
2
by: bryja_klaudiusz[at]poczta[dot]fm | last post by:
Hi, How to copy database diagram (all data) to other server using only MSDE server and VS.Net Proffesional? I have no Enterprice manager. I have to move database (create on my machine) to my...
1
by: adude | last post by:
I am interested to hear if people think it would be a good idea to move the Master & TempDB to a different HD. Here is my DB Server's set up: 1. Processor: (1) AMD XP 2800 2. 1st HD (IDE 0) is...
6
by: Hemant Shah | last post by:
Folks, I need to move HOME directory of an instance to another directory. What is the best way of doing it? Is changing password file enough? or dies DB2 store this info in it's own config? ...
6
by: Woody Splawn | last post by:
I have been using SQL Server 2000 on my stand-alone machine as a back-end to a VS.net application. It is time to switch environments and take the application to the customer. I need to install...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
11
by: ulyses | last post by:
Let's assume I have following file: 2938929384902491233..... 923949919199191919112.... File contains INTs only. What is more they are huge. For example first row in file may contain integer...
2
by: fuzzybr80 | last post by:
I am using MySQL 5.0 with a number of innodb tables whose ibdata files are growing quite quickly and filling up the /var partition (file is /var/mysql/ibdata1). Earlier on I followed instructions...
3
by: Marc C | last post by:
Hello, I have a SQL 2000 installation on a small partion that I would like to move to a second larger partion on the same disk array array with the config as follows: d: full installation of prod...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.