Thursday, March 22, 2012

changing the data files to another disk partition

Hi,

I have a sql server 7 running on a machine with two disk partitions (D: and E:).

The data files xxx.mdf and xxx.ldf are stored in D:, which has very few space available. I want to copy these files to E: but I get an error saying that it is not possible to change the source file of a database. Is it possible to do it or do i have to create another data file in E: and keep the old one in D:?

Thanks in advance,

browsersp_detach_db + sp_attach_db ... with (...)|||detach the database ... copy to new location ... then attach

or

backup the database ... restore ... sp_renamedb|||thanks ms_sql_dba and Enigma, it worked properly!sql

No comments:

Post a Comment