Solved

SQL Server 2005 defragmenting index primary key

Posted on 2012-03-19
3
285 Views
Last Modified: 2012-03-19
Can defragmenting, rebuilding or reorganizing a SQL Server 2005 index which is used as an identity specification primary key field for a table change the values in the field? (Destroying queries based on the primary key values)
0
Comment
Question by:machine_run
3 Comments
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 400 total points
ID: 37739545
No.  None of those activities will change the actual values in any column.  

More specifically for identity, once an identity value has been assigned, it will never change.
0
 
LVL 40

Assisted Solution

by:lcohan
lcohan earned 100 total points
ID: 37739643
"Destroying queries based on the primary key values" - only thing may be gone is(are) old cached query plans but this is a good not a bad thing. If you have some "sticky" cache you may need iisreset if a update statistics and sp_recompile on that table do not help.
0
 
LVL 1

Author Closing Comment

by:machine_run
ID: 37739684
THANKS!!!!!!!!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

830 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