Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI have a SQL 2000 database in place running fine. However, the Database and the Logs files are on the same drive. I want to move the Transaction log to another drive seperate from my database location. What is the best way to accomplish this? Can I just detach the database and copy the log file to a different drive? Re-attach the database and point the new location of the log file. Thanks
Post Follow-up to this messageYes, this method is fine. However, remember that your database will remain unavailable for the duration from being detached till being re-attached. "Larry Bird" wrote: > I have a SQL 2000 database in place running fine. However, the Database a nd > the Logs files are on the same drive. I want to move the Transaction log to > another drive seperate from my database location. > > What is the best way to accomplish this? > > Can I just detach the database and copy the log file to a different drive? > Re-attach the database and point the new location of the log file. > > Thanks >
Post Follow-up to this messageYou can also accomplish this while keeping the database available to the application and users. But this method is slightly complicated and it will take more time than the earlier method. Please take a Full Database Backup before using this method. Here are the steps for this: 1. Use ‘Alter Database … ADD LOG FILE…’ to add a new Log File. The N ew Log File should be located on the other Hard Disk. Size of the New Log File should be equal to (or greater than) the size of the existing Log File (Old Log File). 2. Use ‘DBCC SHRINKFILE ..........EMPTYFILE’ to ‘empty’ the Old Log File. 3. Use ‘Alter Database … REMOVE FILE …’ to remove the Old Log File. "Absar Ahmad" wrote: > Yes, this method is fine. However, remember that your database will remain > unavailable for the duration from being detached till being re-attached. > > "Larry Bird" wrote: >
Post Follow-up to this messageUse GOOGLE. This question has been posted a million (milliard) times before! "Larry Bird" < LarryBird@discussion s.microsoft.com> wrote in message news:945B443F-146F-4861-84E3- 77A79579EE89@microso ft.com... >I have a SQL 2000 database in place running fine. However, the Database >and > the Logs files are on the same drive. I want to move the Transaction log > to > another drive seperate from my database location. > > What is the best way to accomplish this? > > Can I just detach the database and copy the log file to a different drive? > Re-attach the database and point the new location of the log file. > > Thanks >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread