Recently, we have installed a new raid disk on server, I want to migrate
transaction log to new disk for improving performance, is this possible and
how can I do it?
Thanks
YifeiOne method is to detach the database, move the log file and attach the
database files from the new location. See sp_detach_db and sp_attach_db in
the Books Online for details.
Hope this helps.
Dan Guzman
SQL Server MVP
"Yifei" <yjiang@.sdg.aust.com> wrote in message
news:%23hbx8Pk3DHA.1908@.TK2MSFTNGP10.phx.gbl...
quote:
> Hey, All,
> Recently, we have installed a new raid disk on server, I want to migrate
> transaction log to new disk for improving performance, is this possible
and
quote:|||Hey, Dan,
> how can I do it?
> Thanks
> Yifei
>
I think I need to clarify that I only need change transaction log file
location and keep the database file as is.
I have tried detach and attach, it seems not work at this situation.
Any other ideas would be appreciated.
Thanks
Yifei
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:%23jPQCkk3DHA.2144@.TK2MSFTNGP10.phx.gbl...
quote:
> One method is to detach the database, move the log file and attach the
> database files from the new location. See sp_detach_db and sp_attach_db
in
quote:|||Dan is right,,, sp_attach/detach will work..
> the Books Online for details.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Yifei" <yjiang@.sdg.aust.com> wrote in message
> news:%23hbx8Pk3DHA.1908@.TK2MSFTNGP10.phx.gbl...
> and
>
Do an sp_detachdb dbname,
then copy the log file to the new destination, and remove the orig.
then sp_attachdb dbname, datafilename, logfilename
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Yifei" <yjiang@.sdg.aust.com> wrote in message
news:eKtOf8k3DHA.556@.TK2MSFTNGP11.phx.gbl...
quote:|||Like Wayne said, you can leave the data file(s) in the original location.
> Hey, Dan,
> I think I need to clarify that I only need change transaction log file
> location and keep the database file as is.
> I have tried detach and attach, it seems not work at this situation.
> Any other ideas would be appreciated.
> Thanks
> Yifei
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:%23jPQCkk3DHA.2144@.TK2MSFTNGP10.phx.gbl...
> in
migrate[QUOTE]
possible[QUOTE]
>
However, you should specify all database data and files when attaching the
database regardless of whether or not they were moved.
Hope this helps.
Dan Guzman
SQL Server MVP
"Yifei" <yjiang@.sdg.aust.com> wrote in message
news:eKtOf8k3DHA.556@.TK2MSFTNGP11.phx.gbl...
quote:|||Thanks Dan and Wayne, It works.
> Hey, Dan,
> I think I need to clarify that I only need change transaction log file
> location and keep the database file as is.
> I have tried detach and attach, it seems not work at this situation.
> Any other ideas would be appreciated.
> Thanks
> Yifei
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:%23jPQCkk3DHA.2144@.TK2MSFTNGP10.phx.gbl...
> in
migrate[QUOTE]
possible[QUOTE]
>
Yifei
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:uI5jQ1o3DHA.360@.TK2MSFTNGP12.phx.gbl...
quote:
> Dan is right,,, sp_attach/detach will work..
> Do an sp_detachdb dbname,
> then copy the log file to the new destination, and remove the orig.
> then sp_attachdb dbname, datafilename, logfilename
>
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Computer Education Services Corporation (CESC), Charlotte, NC
> www.computeredservices.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
>
> "Yifei" <yjiang@.sdg.aust.com> wrote in message
> news:eKtOf8k3DHA.556@.TK2MSFTNGP11.phx.gbl...
sp_attach_db[QUOTE]
> migrate
> possible
>
No comments:
Post a Comment