Solved

defragging our SQL server

Posted on 2013-05-30
6
438 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 69

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 69

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Error in WHERE Clause 5 37
ASP.NET 5 Templates 2 65
SQL Select Statement 2 20
Serach for record in Microsoft SQL Management Studio 8 18
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now