|
Home > Archive > MS SQL Server > April 2006 > URGENT HELP !! How to move transaction log to new drive?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
URGENT HELP !! How to move transaction log to new drive?
|
|
| Tim Greenwood 2006-04-07, 9:23 am |
| We installed a new mirrored set of drives in our primary server this morning
and planned to move the transaction logs for all databases. We cannot find
how you move them. It won't let us change the primary tlog.
ARRRGHHHH....something like this should be simple.
Thanks for any help you may have!!!
| |
| Shaun Beane 2006-04-07, 11:23 am |
| From SQL Mag ... (I always keep this article handy as this is a very common
question from my students)
Use sp_detach_db to detach the database and move the log files physically,
then use sp_attach_db to attach them, specifying the new file location.
Sp_detach_db checks the database to make sure the files are clean and
removes the row in the Master database's sysdatabases table that references
the database. Sp_attach_db recreates the reference in sysdatabases and lets
you specify alternative file locations for the database files.
--
Shaun Beane, MCT, MCDST, MCDBA
dbageek.blogspot.com
"Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
news:%23RtpyrkWGHA.128@TK2MSFTNGP05.phx.gbl...
> We installed a new mirrored set of drives in our primary server this
> morning and planned to move the transaction logs for all databases. We
> cannot find how you move them. It won't let us change the primary tlog.
> ARRRGHHHH....something like this should be simple.
>
> Thanks for any help you may have!!!
>
| |
| Tim Greenwood 2006-04-07, 11:23 am |
| Thank you!! I have done the detach/attach several times from ep but never
with the sproc....me and my boss thank you!
"Shaun Beane" <shaun.beane@gmail.nojunk.com> wrote in message
news:%23wE7y6kWGHA.2268@TK2MSFTNGP02.phx.gbl...
> From SQL Mag ... (I always keep this article handy as this is a very
> common question from my students)
>
> Use sp_detach_db to detach the database and move the log files physically,
> then use sp_attach_db to attach them, specifying the new file location.
> Sp_detach_db checks the database to make sure the files are clean and
> removes the row in the Master database's sysdatabases table that
> references the database. Sp_attach_db recreates the reference in
> sysdatabases and lets you specify alternative file locations for the
> database files.
>
> --
> Shaun Beane, MCT, MCDST, MCDBA
> dbageek.blogspot.com
>
> "Tim Greenwood" <tim_greenwood A-T yahoo D-O-T com> wrote in message
> news:%23RtpyrkWGHA.128@TK2MSFTNGP05.phx.gbl...
>
>
|
|
|
|
|