SQL7.0 and Disk Defragmentation

SQL7.0 and Disk Defragmentation

Post by Steven Spr » Mon, 25 Feb 2002 23:55:37



Is using a disk defrag utility on a SQL server .DAT device
file OK?

I cannot imagine this is OK, yet can find nothing at
Microsoft saying so. They do have have bad stuff to say
about using NTFS Compression.  I was in a meeting on
Thursday, and MS Consulting was telling a customer this
was OK.

Imagine I create a clustered index on a table on this
device.  Correct me if I am wrong, but isn't a clustered
index about the physical organization of data pages on the
disk, for fast sequential reads?  Wouldn't using a disk
defrag utility (of course shutting down SQL Server so the
file is not in use) blow SQL Server's mind as data pages
are moved underneath it?

Thanks

 
 
 

SQL7.0 and Disk Defragmentation

Post by Narayana Vyas Kondredd » Tue, 26 Feb 2002 02:39:40


Steven, if the database file itself is fragmented and spread all over the
disk, then an operating system level defrag is okay (while SQL Server is
stopped). Then start the SQL Server service, and rebuild your clustered
indexes, to make sure there's no fragmentation within the clustered indexes.

In general, if you create your database files large enough in the beginning,
they don't grow afterwards, and that helps in keeping the complete file
together at the OS level. In that case, a clustered index rebuild is good
enough, especially when your queries perform large index scans.
--
HTH,
Vyas, MVP (SQL Server)

http://vyaskn.tripod.com/


Is using a disk defrag utility on a SQL server .DAT device
file OK?

I cannot imagine this is OK, yet can find nothing at
Microsoft saying so. They do have have bad stuff to say
about using NTFS Compression.  I was in a meeting on
Thursday, and MS Consulting was telling a customer this
was OK.

Imagine I create a clustered index on a table on this
device.  Correct me if I am wrong, but isn't a clustered
index about the physical organization of data pages on the
disk, for fast sequential reads?  Wouldn't using a disk
defrag utility (of course shutting down SQL Server so the
file is not in use) blow SQL Server's mind as data pages
are moved underneath it?

Thanks

 
 
 

SQL7.0 and Disk Defragmentation

Post by Andrew Diab » Tue, 26 Feb 2002 04:59:25


Hi Vyas,

How does one rebuild the indexes the easiest way?

Thanks
Andrew



> Steven, if the database file itself is fragmented and spread all over the
> disk, then an operating system level defrag is okay (while SQL Server is
> stopped). Then start the SQL Server service, and rebuild your clustered
> indexes, to make sure there's no fragmentation within the clustered
indexes.

> In general, if you create your database files large enough in the
beginning,
> they don't grow afterwards, and that helps in keeping the complete file
> together at the OS level. In that case, a clustered index rebuild is good
> enough, especially when your queries perform large index scans.
> --
> HTH,
> Vyas, MVP (SQL Server)

> http://vyaskn.tripod.com/



> Is using a disk defrag utility on a SQL server .DAT device
> file OK?

> I cannot imagine this is OK, yet can find nothing at
> Microsoft saying so. They do have have bad stuff to say
> about using NTFS Compression.  I was in a meeting on
> Thursday, and MS Consulting was telling a customer this
> was OK.

> Imagine I create a clustered index on a table on this
> device.  Correct me if I am wrong, but isn't a clustered
> index about the physical organization of data pages on the
> disk, for fast sequential reads?  Wouldn't using a disk
> defrag utility (of course shutting down SQL Server so the
> file is not in use) blow SQL Server's mind as data pages
> are moved underneath it?

> Thanks

 
 
 

SQL7.0 and Disk Defragmentation

Post by BP Margoli » Tue, 26 Feb 2002 05:20:56


Andrew,

Check out the section "DBCC DBREINDEX (T-SQL)" in the SQL Server 7.0 Books
Online.

-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


> Hi Vyas,

> How does one rebuild the indexes the easiest way?

> Thanks
> Andrew



> > Steven, if the database file itself is fragmented and spread all over
the
> > disk, then an operating system level defrag is okay (while SQL Server is
> > stopped). Then start the SQL Server service, and rebuild your clustered
> > indexes, to make sure there's no fragmentation within the clustered
> indexes.

> > In general, if you create your database files large enough in the
> beginning,
> > they don't grow afterwards, and that helps in keeping the complete file
> > together at the OS level. In that case, a clustered index rebuild is
good
> > enough, especially when your queries perform large index scans.
> > --
> > HTH,
> > Vyas, MVP (SQL Server)

> > http://vyaskn.tripod.com/



> > Is using a disk defrag utility on a SQL server .DAT device
> > file OK?

> > I cannot imagine this is OK, yet can find nothing at
> > Microsoft saying so. They do have have bad stuff to say
> > about using NTFS Compression.  I was in a meeting on
> > Thursday, and MS Consulting was telling a customer this
> > was OK.

> > Imagine I create a clustered index on a table on this
> > device.  Correct me if I am wrong, but isn't a clustered
> > index about the physical organization of data pages on the
> > disk, for fast sequential reads?  Wouldn't using a disk
> > defrag utility (of course shutting down SQL Server so the
> > file is not in use) blow SQL Server's mind as data pages
> > are moved underneath it?

> > Thanks

 
 
 

SQL7.0 and Disk Defragmentation

Post by Andrew Diab » Tue, 26 Feb 2002 13:00:40


Thanks BP.

Andrew


> Andrew,

> Check out the section "DBCC DBREINDEX (T-SQL)" in the SQL Server 7.0 Books
> Online.

> -------------------------------------------
> BP Margolin
> Please reply only to the newsgroups.
> When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
> can be cut and pasted into Query Analyzer is appreciated.



> > Hi Vyas,

> > How does one rebuild the indexes the easiest way?

> > Thanks
> > Andrew



> > > Steven, if the database file itself is fragmented and spread all over
> the
> > > disk, then an operating system level defrag is okay (while SQL Server
is
> > > stopped). Then start the SQL Server service, and rebuild your
clustered
> > > indexes, to make sure there's no fragmentation within the clustered
> > indexes.

> > > In general, if you create your database files large enough in the
> > beginning,
> > > they don't grow afterwards, and that helps in keeping the complete
file
> > > together at the OS level. In that case, a clustered index rebuild is
> good
> > > enough, especially when your queries perform large index scans.
> > > --
> > > HTH,
> > > Vyas, MVP (SQL Server)

> > > http://vyaskn.tripod.com/



> > > Is using a disk defrag utility on a SQL server .DAT device
> > > file OK?

> > > I cannot imagine this is OK, yet can find nothing at
> > > Microsoft saying so. They do have have bad stuff to say
> > > about using NTFS Compression.  I was in a meeting on
> > > Thursday, and MS Consulting was telling a customer this
> > > was OK.

> > > Imagine I create a clustered index on a table on this
> > > device.  Correct me if I am wrong, but isn't a clustered
> > > index about the physical organization of data pages on the
> > > disk, for fast sequential reads?  Wouldn't using a disk
> > > defrag utility (of course shutting down SQL Server so the
> > > file is not in use) blow SQL Server's mind as data pages
> > > are moved underneath it?

> > > Thanks

 
 
 

1. Disk Defragmentation After Processing Cubes

Does anyone have recommendations (or Best Practices
Documentation) for running disk defrag on the disk
partition where the cube files resides?  

I process (refresh / rebuild) most of my Analysis Services
Cubes on a daily basis.  After processing the cubes I
notice significant disk fragmentation.  Will scheduling a
defrag after processing the cubes improve OLAP performance?

Our platform is SQL Server 2000 SP3 running on Windows
2000 Server.

2. Checkpoints across different architectures

3. Disk Defragmentation for SQL 7.0 dB on windows 2000 Server

4. DBMS_Java.GRANT_PERMISSION() problem, NT 4.0, shared drives

5. Disk defragmentation and SQL Server?

6. Making the application directory-independent

7. Disk defragmentation prudent for SQL Server?

8. log shipping with bcp

9. disk defragmentation

10. Sql7 server doesn't recognize new 36 gb hot swap disk

11. sql7 server does not recognize newly installed hot swap disk

12. does SQL7 db shrink require disk space?

13. Import sql7 DB from sql7 Enterprise to sql7 desktop