We need to include the NORESEED option when running DBCC CHECKIDENT to find the current identity value

Without NORESEED option if we run DBCC CHECKIDENT, then it checks the current identity value and if the identity and current value don’t match, it reseeds the identity.

USE AdventureWorks2012;

GO

DBCC CHECKIDENT (‘Person.AddressType’);

GO

If your intent is to find the current identity value, then we will have to include NORESEED option.

USE AdventureWorks2012;

GO

DBCC CHECKIDENT (‘Person.AddressType’, NORESEED);

GO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s