Change index fillfactor


Author
Message
ChanKK
ChanKK
StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)StrataFrame User (248 reputation)
Group: Forum Members
Posts: 190, Visits: 1.3K
Hi

I have PK defined to all tables via DDT and deployed to customer already. I found that I missed out index fillfactor. I tried to change the fillfactor and rebuild package to deploy to customer again. However, I hit error PK constaint must be drop first before able to change fillfactor.



What should I do for this? Should I remove the PK, and create it again via DDT as workaround?



Thank you
Reply
Jason Seidell
Jason Seidell
StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)StrataFrame Novice (69 reputation)
Group: Forum Members
Posts: 59, Visits: 180
I ran into this on some of our databases because the DDT was setup (by default) to set the FillFactor to 0, which tells MSSQL to use whatever the default fillfactor value is.  The problem can occur when a DBA has a script that runs that drops and rebuilds or re-organizes indexes and sets a new fillfactor value different than the default.  I had to do this on some of our larger indexes becuase the index files were getting extraneously large and filled with large amounts of blank space.  Then the DDT wouldn't work until you changed the FillFactor in the DDT to the exact same percentage as the index already in the database.  I was able to fix by just changing to make the numbers match, but if you aren't in control or even know what the end server is set to the above mentioned solution would probably work better.  But you may bear in mind that another DBA maybe upset to have their indexes reset/rebuilt to a different value for optimization reasons.

Jason

Jason Seidell

Programmer/Analyst

Infinedi

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search