Solved

Identity Seed value

Posted on 2013-10-24
3
213 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 39

Accepted Solution

by:
lcohan earned 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
migration MS SQL database to Oracle 30 61
Help Required 2 32
VB.net and sql server 4 35
sqlserver get datetime field and create a string 5 18
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

770 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