Solved

Regarding fragmentation

Posted on 2008-10-22
8
247 Views
Last Modified: 2012-05-05
Hi Experts i would be rebuilding the index inoder to get rid of framentation .
Im bit worried about the fill factor , non-clustered indexes, primary key and foreign key, any dependency with other table. Iam enclosing the query for your reference, i need to understand how to take care for fill factor or non clustered indexes and any other dependency , is it taken care by sql engine or by default it will take the fill factor which already exist.
frag.txt
0
Comment
Question by:Sandeepiii
  • 2
  • 2
  • 2
8 Comments
 
LVL 37

Expert Comment

by:momi_sabag
ID: 22775324
what do you mean by
is it taken care by sql engine or by default it will take the fill factor which already exist ?

if you don't specify a new fill factor, sql server will use the one that is already defined
0
 

Author Comment

by:Sandeepiii
ID: 22775560
what about the references like primary key , foreign key ,non clustered indexes for example
a table will have clustered index as well as non clustered indexes will non clustered indexes are also rebuild .thanks
0
 
LVL 37

Accepted Solution

by:
momi_sabag earned 250 total points
ID: 22775626
depends on how you are going to rebuild but you can specify it in the rebuild command (if you use  DBCC DBREINDEX  for example)
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 18

Assisted Solution

by:jmoss111
jmoss111 earned 250 total points
ID: 22775752
If you have the luxury of time, you could drop and recreate your indexes. Also, one other thing to consider is total fragmentation on the database. A solution is to download contig.exe from sysinternal.com. Its a free download from M$ and  allows you to make contiguous a file.
0
 

Author Comment

by:Sandeepiii
ID: 22775897
thanks ok i will download the contig.exe file , in the meanwhile i have got a link from microsoft
which helps in fragmentation.
http://technet.microsoft.com/en-us/library/ms188388(SQL.90).aspx
I don't have luxury of time as i have to do the activity online no downtime is given to us.
Iam using the code in the script which i have attached , alter index ......rebuild.it is sql server2005 enterprise edition.
0
 
LVL 18

Expert Comment

by:jmoss111
ID: 22775981
contig requires no downtime
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

911 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

22 Experts available now in Live!

Get 1:1 Help Now