Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesWe 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!!!
Post Follow-up to this messageFrom 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!!! >
Post Follow-up to this messageThank 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... > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread