We have a database that uses the same drive for logs and
data. After a new disk has been installed what is the
easiest way (and reliable) way to move the logs to the new
disk.
I'm thinking of dumping and restoring the database using
the log on clause of restore. Any other ideas ?
TIA,
JackYour two best options are probably
BACKUP and RESTORE (WITH MOVE)
or
sp_detach_db and sp_attach_db
More information on each of these can be found within Books Online =(within your SQL Server program group).
-- Keith
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message =news:1b06e01c44fce$eadf5a60$a601280a@.phx.gbl...
> > We have a database that uses the same drive for logs and > data. After a new disk has been installed what is the > easiest way (and reliable) way to move the logs to the new > disk.
> > I'm thinking of dumping and restoring the database using > the log on clause of restore. Any other ideas ?
> > TIA,
> Jack|||Hi,
Steps to move LDF file to new drive
1. Execute detach database (SP_DETACH_DB <dbname>
2. Copy the LDF file to new drive
3. Attach the database (SP_DETACH_DB <dbname>,'MDF file with path','LDF file
with path'
Before doing the above steps , make the database single user
alter database <dbname> set single_user with rollback immediate
After the activity turn the databse to multi user by executing
alter database <dbname> set multi_user
Thanks
Hari
MCDBA
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message
news:1b06e01c44fce$eadf5a60$a601280a@.phx.gbl...
> We have a database that uses the same drive for logs and
> data. After a new disk has been installed what is the
> easiest way (and reliable) way to move the logs to the new
> disk.
> I'm thinking of dumping and restoring the database using
> the log on clause of restore. Any other ideas ?
> TIA,
> Jack|||Backup and then Restore WITH MOVE
Detach\Reattach requires downtime
Greg Jackson
PDX, Oregon|||Just to be clear: both options require some downtime. -- Keith
"Jaxon" <GregoryAJackson@.hotmail.com> wrote in message =news:%234EOGi$TEHA.1260@.TK2MSFTNGP11.phx.gbl...
> Backup and then Restore WITH MOVE
> > Detach\Reattach requires downtime
> > > > Greg Jackson
> PDX, Oregon
> >|||In article <OZKelQgUEHA.1012@.TK2MSFTNGP09.phx.gbl>, "Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote:
>Just to be clear: both options require some downtime. >-- >Keith
Huh?
Why wouldn't you just add a second logfile, move the data to the secondfile,
then remove the first logfile?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment