Solved

defragging our SQL server

Posted on 2013-05-30
6
440 Views
Last Modified: 2013-05-31
I run tasks on our SQL database to rebuild indexes periodically, but it just dawned on me that I never run the Windows Defragging utility on the actual server.  I am using Windows 2003 server.  

If I use this utility regularly, would it make a significant difference in the performance of the SQL database?  Are there any dangers to using it?  The database is only about 8GB in size
0
Comment
Question by:al4629740
  • 3
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 39208732
the Windows defragger does not actually impact the SQL fragmentation as the defragger has no knowledge of SQL data storage.
0
 
LVL 23

Expert Comment

by:nemws1
ID: 39208787
There's no real need.  I can imaging a case where the databases have been set up horribly (small auto-grows and auto-shrink turned on - ugh!) and the way they grew was oddly spread out so that disk fragmentation occurred, but it is very unlikely.

Have you run disk defrag on your DATA and/or LOG drives and just done an analysis to see how fragmented they were?

My gut says don't defrag.  *IF* your fragmentation is really bad, say 40% or higher, then I would think about it.  You can run disk de-frag anytime, even on open files, but performance goes to the crapper while its running.
0
 

Author Comment

by:al4629740
ID: 39209861
How do I run defrag just on the Data?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 23

Assisted Solution

by:nemws1
nemws1 earned 250 total points
ID: 39209871
Most DBAs store their DATA and LOG files on separate drives.  Your asking of the question makes me think this is not the case for you (and that you have both on the same drive, which is bad).  You can only defrag an entire drive (which I'm thinking you already know).
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 39210222
>>How do I run defrag just on the Data?

you just need to reindex and the data will be defragged.
0
 
LVL 23

Expert Comment

by:nemws1
ID: 39211486
Thanks for the points
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question