You don't need to shut down the server or kick everyone off. You DO need to have no users in the database that you are detaching and reattaching.
Dave
-----Original Message-----
From: Meg Hardy [mailto:[Email Address Removed] Thursday, June 13, 2002 11:24 AM
To: SQLDBA (E-mail)
Subject: RE: sp_detach, sp_attach
Thanks for that,
Do I need to shut down at the end? and do I need to make sure no one is
using the server
-----Original Message-----
From: Farnsworth, Dave [mailto:[Email Address Removed] Thursday, June 13, 2002 5:24 PM
To: Meg Hardy; SQLDBA (E-mail)
Subject: RE: sp_detach, sp_attach
After you detach the database then move the files to the new location before
doing the attach.
Dave
-----Original Message-----
From: Meg Hardy [mailto:[Email Address Removed] Thursday, June 13, 2002 11:14 AM
To: SQLDBA (E-mail)
Subject: sp_detach, sp_attach
Hello!
I am moving the log file of a database to a different disk. I am going to
do
sp_detach_db 'dbname'
and then going to do
EXEC sp_attach_db @dbname = 'dbname',
@filename1 = 'f:\mssql7\data\dbnamedata_Data.mdf',
@filename2 = 'g:\mssql7\data\dbnamelog_Log.ldf'
then i'm going to reboot the server. Is this correct? Do i need to copy
the files over to the new directory before attaching again?
Thanks
Meg
**********************************************************************
DISCLAIMER
Any opinions expressed in this email are those of the individual and not
necessarily of Mondial Assistance (UK) Ltd. This email and any files
transmitted with it, including replies and forwarded copies (which may
contain alterations) subsequently transmitted from the Company, are
confidential and solely for the use of the intended recipient. If you are
not the intended recipient or the person responsible for delivering to the
intended recipient, be advised that you have received this email in error
and that any use is strictly prohibited.
If you have received this email in error please notify the IT support desk
by telephone on +44 (0)208 2393984 or via email to
[Email Address Removed] including a copy of this message. Please
then delete this email and destroy any copies of it. Thank you.
Mondial Assistance (UK) Ltd
Mondial House
102 George Street
Croydon
CR9 1AJ
Mondial Assistance (UK) Ltd Registered in England No.1710361 Registered
office as above
**********************************************************************
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/
MS Sql Server LazyDBA home page