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

x
?
Solved

Identity Seed value

Posted on 2013-10-24
3
Medium Priority
?
241 Views
Last Modified: 2013-11-08
Is there a way to set, on a database basis, the seed value and increment for identity columns?    

Also, I have a set of tables that at some point the seed value seems to have been set to 10000, with increment of 1.   Can a backup/restore cause this?    Can this easily be done, inadvertently?
0
Comment
Question by:HLRosenberger
3 Comments
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 total points
ID: 39598714
This is how to do it: http://technet.microsoft.com/en-us/library/ms176057(v=sql.100).aspx

<< Can a backup/restore cause this? >>


A restore yes, however that is unlikely to go silent in my opinion as you must restore the entire database since 2000 and up.
0
 
LVL 5

Expert Comment

by:MohitPandit
ID: 39599829
Hello,

yes, we can achieve customize script or settings (also with DBCC CHECKIDENT).

Could you please let us know exactly, what do you want based on that will create small snippet and will share with you?

Best Regards,
Mohit Pandit
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 39634496
Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

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