Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 OS level defrag of a SQL Data disk

Author  Topic 

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2012-06-15 : 06:04:18
Hi all,

We have 40% OS-level fragmentation of the windows disk that houses SQL data. This server is involved in Log Shipping. We are planning to run this on the secondary server first, as a test.

Could anyone list any gotcha's??

Thanks,

JB

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2012-06-15 : 10:51:19
You may not see much or any performance improvement, but it probably won't cause any problems.

What version of Windows are you running? What program are you planning to use to defragment the volume?

If you use the native DEFRAG command, you will need to shutdown SQL Server while it runs, and that may require a lot of SQL Server downtime until it completes.

You might consider a third-party utility, like Diskeeper, that can defragment open database files and be scheduled to run automatically.
http://www.condusiv.com/business/diskeeper/server/default.aspx



CODO ERGO SUM
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2012-06-15 : 13:30:33
Its a very bad design to house sql data on the same disks as OS.You probably should change that.

After Monday and Tuesday even the calendar says W T F ....
Go to Top of Page

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2012-06-18 : 12:07:43
We're running W2K3, 32bit. Are you certain that NT Native defragmentation will require the stopping of the SQL service?

You say it probably won't cause any problems (aside from downtime), have their been any cases of db objects or data being corrupted as a result of NT defragmentation? Presumably this is something that every data disk requires at some point or another.
Go to Top of Page

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2012-06-18 : 12:10:17
Sach, we're not keeping the OS on the same disk as the databases.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2012-06-18 : 21:39:50
quote:
Originally posted by JaybeeSQL

We're running W2K3, 32bit. Are you certain that NT Native defragmentation will require the stopping of the SQL service?

You say it probably won't cause any problems (aside from downtime), have their been any cases of db objects or data being corrupted as a result of NT defragmentation? Presumably this is something that every data disk requires at some point or another.



According to this, "Disk Defragmenter will not defragment files that are in use."
http://blogs.technet.com/b/askperf/archive/2008/03/14/disk-fragmentation-and-system-performance.aspx

When I said it probably won't cause any problems, I meant that it will not make performance any worse.

I wouldn't say that every data disk requires it at some point. I managed an installation of hundreds of servers where we never defragmented any of the data disks.




CODO ERGO SUM
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2012-06-19 : 04:49:38
quote:
Originally posted by JaybeeSQL

Sach, we're not keeping the OS on the same disk as the databases.



"..We have 40% OS-level fragmentation of the windows disk that houses SQL data.."

The above part made me assume that you might be having sql server data on same disks as the OS.

Only free men can negotiate..
Go to Top of Page
   

- Advertisement -