Welcome to Comunidade Bloggers |create|it| Sign in | Join | Help

António Vargas - SharePoint 2010


.Net
SharePoint
Silverlight
Reset Identity value

Today, i needed to reset the Identity value for one column in the SQL Server database.

I used the following commando to view the current identity value:

DBCC CHECKIDENT ('TableName1', NORESEED)

and then, it returned the following message:

Checking identity information: current identity value '53', current column value '53'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Finally, after I've checked the current identity value, i needed to reset this value and I've used the following command:

DBCC CHECKIDENT (TableName1, RESEED, 0)

and then, it returned the following message: 

Checking identity information: current identity value '53', current column value '0'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Posted: Tuesday, January 12, 2010 10:55 AM by antoniovargas
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS