Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-01-20 : 17:35:53
|
| William writes "I've searched your site and Books online, but I just want to verify what I'm about to do (I got nominated to be DBA even though I'm not exactly qualified).I have a database called SDP7 which resides on the C directory of a Server (Morrow_Money). Anyway, when the SQL Server was installed, it was mistakenly put on C instead of D and C is just about out of space. Hence, I need to move it to do. Is using the sp_detach_db then using sp_attach_db approach a good solution? What I'm thinking is that first I back up everything, then run the following sp_detach_db SDP7, copy the database and log files over to the D drive somewhere, then use sp_attach_db 'SDP7', 'd:\newdrivelocation\SDP7' ?I guess what my concern is is that I don't have a mssql directory on the D drive. Does that matter (I think I know the answer to this)? If so, do I need to reinstall the server on D?Thanks again,Bill Ryan" |
|
|
smccreadie
Aged Yak Warrior
505 Posts |
Posted - 2002-01-20 : 20:07:21
|
| What you're describing is accurate.1. Backup everything2. Get all the user off3. Use sp_dettach_db to dettach4. Move the mdf and ldf files to d: (it doesn't matter what directory it's in)5. Use sp_attach_db to reattach |
 |
|
|
|
|
|