Site sponsored by: Idera Try Idera’s new SQL admin toolset
SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Quiz
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


FAQ Topics

All FAQ's
General DBA
General Developer
DBA Performance Tuning
Developer Performance Tuning
Clustering
Error Messages

Write for Us

Share you SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

Policy Based Management in SQL Server 2008
Inside SQL Server Cluster Setup and Troubleshooting Techniques - Part I ...
Configure and Manage Policy Based Management in SQL Server 2008 ...
Using Column Sets with Sparse Columns

More     
 
Latest FAQ's

Cannot Start SQL Server Service
Users are able to connect to report manager but not able ...
Errors when SQL Server Snapshot Replication is Running
How to Display Server Name or IP Address in a Reporting ...

More     
   
Latest Software Reviews

Spotlight on ApexSQL Doc 2008
ApexSQL Enforce
Embarcadero Change Manager
SQL Server DBA Dashboard

More     

My question is how do I move already existing log files in a different drive, or how can I separate data files and log files into different drives?



Question

I am just starting as a DBA in a new company. We are running a single SQL server. We have about 15 databases, the largest being 2 GBs. During peak hours and weekends, there are several hits on the server that affect performance. I found out that the data files and log files are on a single drive, which may be causing disk contention. My question is how do I move already existing log files to a different drive, or how can I separate data files and log files onto different drives? We are not using RAID. Are there any other methods to improve performance?



Answer

The first thing I would recommend would be to move to a RAID array, preferably a RAID 10 array. This would not only offer a performance boost, but would provide very necessary data redundancy.

If you try the above, and disk contention is still a problem, or if you can't move to a RAID array, then you can of course move the log files to a separate disk. Doing so can significantly reduce disk contention and boost SQL Server's performance. Keep in mind that the new disk should be devoted exclusively to log files so that they can be accessed sequentially, which is the most efficient way to access log files.

One of the easiest ways to move log files from one disk to another is to first detach the databases (and their logs) using sp_detach_db, the copy the log files to an appropriate location on a different drive, and then reattach the database files and log files using sp_attach_db. When you reattach the database, you can specify where the data and log files reside.

If you are not familiar with these two commands, you can find out more about them from the SQL Server Books Online.








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 1999-2008 by T10 Media. All rights reserved