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 |
Dance Doll
Yak Posting Veteran
54 Posts |
Posted - 2008-03-12 : 17:11:47
|
Hi there,I need help on moving few data files to different drive. I have 26 data files on one database and I want move 2 of them to the other drive. Can someone help me? Do I need to make the DB offline? sp_attach doesn't work for the DB which more than 16 files. |
|
Haywood
Posting Yak Master
221 Posts |
Posted - 2008-03-12 : 18:17:11
|
sp_attach won't work, but it is documented in the Remarks section of BOL:Remarkssp_attach_db should only be executed on databases that were previously detached from the database server using an explicit sp_detach_db operation. If more than 16 files must be specified, use CREATE DATABASE with the FOR ATTACH clause.So, lookup CREATE DATABASE in BOL and find the FOR ATTACH reference. |
 |
|
Dance Doll
Yak Posting Veteran
54 Posts |
Posted - 2008-03-12 : 19:56:56
|
It works! Thanks a lot. |
 |
|
Haywood
Posting Yak Master
221 Posts |
Posted - 2008-03-13 : 10:03:18
|
No sweat, glad to see you got it working. Pretty easy stuff when you know where/what to look for. :) |
 |
|
|
|
|