|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Attach...Detach database - odd results
Over the weekend, I decided to do a little database management. We have installed several new RAID arrays, and I wanted to start moving the mdf/ldf/ndf files around to optimize performance across the arrays.
In order to do this, I stopped the sql services, copied the directories from one array to another, and restarted the services. I then went through the steps listed in this article to detach the databases, and reattach them using the new file locations (http://support.microsoft.com/kb/224071). The only exception was that I didn't use sp_detach_db and sp_attach_db, I did it through EM. When I finished detaching and reattaching all of the databases, I went into Query Analyzer and ran sp_helpfile for all of the databases. It showed that the database files had been moved to my new file locations, which is what I thought it would. When I came in this morning though, I was surprised to find that it had reverted! The databases now show the original file locations, and sp_helpfile does as well! How can this be??
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
|
#2
|
||||
|
||||
|
Couldn't you just detach, move, attach instead of move, detach, attach?
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
||||
|
||||
|
Yeah - probably, but given that detach/attach is acting so strange, would it make a difference?
Should I be looking to ALTER DATABASE MODIFY FILE instead? |
|
#4
|
||||
|
||||
|
Quote:
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Attach...Detach database - odd results |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|