Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server 2005 defragmenting index primary key

Posted on 2012-03-19
3
Medium Priority
?
292 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 70

Accepted Solution

by:
Scott Pletcher earned 1600 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 400 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Screencast - Getting to Know the Pipeline

972 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