Hi Max,
I am sorry for bringing you confusion since I did not notice that you were
trying to deploy it to a new location.
I think that I was confused with your description:
[quoted text, click to view] >I understand that we can choose the .mdf database file through the
>connection string in SQL 2005. Do we still need to use sp_detachdb when we
>prepare mdf files for this feature?
There seems to be no relationship between sp_detach_db and SQL 2005
connectionstring. If you want to specify the .mdf file in your connection
string, it is no need to detach the database.
Could you please let me know what your real want is? or could you please
describe your senario more detailed?
From your reply, I understand that you want to move your current data files
to another location ( may be a network share or another hard disk), right?
For your question:
[quoted text, click to view] >Do we need to detach the mdf data files before deploying it to a new
>location? I am sure that this is not true in SQL Server 2000. I wonder is
it
>the same in SQL Server 2005?
If you use BACKUP/RESTORE, you do not need to detach the mdf data files
before deploying it to a new location.
You can use RESTORE DATABASE FROM DISK='backup file path' WITH MOVE
'filename' TO 'new_location_path';
If you want to use ALTER DATABASE or sp_attach_db, the data files are
required to use use sp_detach_db first.
Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Sincerely yours,
Charles Wang
Microsoft Online Community Support
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================