<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; DBCC RESEED Table Identity Value &#8211; Reset Table Identity</title>
	<atom:link href="http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 10 Feb 2012 02:12:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: abhilashkukawalkar</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-173190</link>
		<dc:creator><![CDATA[abhilashkukawalkar]]></dc:creator>
		<pubDate>Thu, 29 Sep 2011 12:14:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-173190</guid>
		<description><![CDATA[Cannot truncate table &#039; TABLE_NAME &#039; because it is being referenced by a FOREIGN KEY constraint.]]></description>
		<content:encoded><![CDATA[<p>Cannot truncate table &#8216; TABLE_NAME &#8216; because it is being referenced by a FOREIGN KEY constraint.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yash Thakkar</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-170325</link>
		<dc:creator><![CDATA[Yash Thakkar]]></dc:creator>
		<pubDate>Wed, 21 Sep 2011 13:09:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-170325</guid>
		<description><![CDATA[Hi Brijesh,

Go into design mode of that table and select that field. You will get the field properties below. Go to &quot;Identity Specification&quot; option, set (Is Identity) as yes, set Identity Increment as 1, set Identity seed as 1.

After this execute the below command.

DBCC CHECKIDENT(&#039;Your Table Name&#039;, RESEED, 0)



Thanks,
Yash Thakkar]]></description>
		<content:encoded><![CDATA[<p>Hi Brijesh,</p>
<p>Go into design mode of that table and select that field. You will get the field properties below. Go to &#8220;Identity Specification&#8221; option, set (Is Identity) as yes, set Identity Increment as 1, set Identity seed as 1.</p>
<p>After this execute the below command.</p>
<p>DBCC CHECKIDENT(&#8216;Your Table Name&#8217;, RESEED, 0)</p>
<p>Thanks,<br />
Yash Thakkar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brijesh</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-151034</link>
		<dc:creator><![CDATA[brijesh]]></dc:creator>
		<pubDate>Wed, 27 Jul 2011 12:08:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-151034</guid>
		<description><![CDATA[if have a data in table then i want to reset identity a column(which idendity record like as 1,5,6,7) (i want as 1,2,3,4)]]></description>
		<content:encoded><![CDATA[<p>if have a data in table then i want to reset identity a column(which idendity record like as 1,5,6,7) (i want as 1,2,3,4)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marie Haggberg</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-129449</link>
		<dc:creator><![CDATA[Marie Haggberg]]></dc:creator>
		<pubDate>Mon, 18 Apr 2011 06:14:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-129449</guid>
		<description><![CDATA[Just ran into the same problem mentioned by Ron Moses above. It seems the reseed issues affect newly created tables with IDENTITY(1,1) and no prior records, populated via scripts. When I ran a development query to purge data with reseed = 0, then inserted records via scripts, I got a starting identity value of 0. As an ugly workaround, I might use table variables with their own identity keys,  and use them to populate the working tables using IDENTITY_INSERT ON. (But only because this is a relatively small SQL DB, and not too many records are involved.) This occurred for me in SQL 2005.

BTW, thanks so much for this blog, it has saved me headaches time and time again.]]></description>
		<content:encoded><![CDATA[<p>Just ran into the same problem mentioned by Ron Moses above. It seems the reseed issues affect newly created tables with IDENTITY(1,1) and no prior records, populated via scripts. When I ran a development query to purge data with reseed = 0, then inserted records via scripts, I got a starting identity value of 0. As an ugly workaround, I might use table variables with their own identity keys,  and use them to populate the working tables using IDENTITY_INSERT ON. (But only because this is a relatively small SQL DB, and not too many records are involved.) This occurred for me in SQL 2005.</p>
<p>BTW, thanks so much for this blog, it has saved me headaches time and time again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Crichton</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-128881</link>
		<dc:creator><![CDATA[Scott Crichton]]></dc:creator>
		<pubDate>Thu, 14 Apr 2011 16:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-128881</guid>
		<description><![CDATA[HI Hari,

This is a common problem if you are using an int as your identity column. A better approach would be to use GUID, this is a unique value that can be entered against each row. You can see what it looks like by writing &#039;Select NewID()&#039; This will show you an example of a GUID. The data type is known as UniqueIdentifier in the SQL table. 

Hope this helps.]]></description>
		<content:encoded><![CDATA[<p>HI Hari,</p>
<p>This is a common problem if you are using an int as your identity column. A better approach would be to use GUID, this is a unique value that can be entered against each row. You can see what it looks like by writing &#8216;Select NewID()&#8217; This will show you an example of a GUID. The data type is known as UniqueIdentifier in the SQL table. </p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-118626</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 15 Feb 2011 14:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-118626</guid>
		<description><![CDATA[update table
set gender=case when gender=&#039;M&#039; then &#039;F&#039; else &#039;M&#039; end]]></description>
		<content:encoded><![CDATA[<p>update table<br />
set gender=case when gender=&#8217;M&#8217; then &#8216;F&#8217; else &#8216;M&#8217; end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhaval</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-118462</link>
		<dc:creator><![CDATA[Dhaval]]></dc:creator>
		<pubDate>Mon, 14 Feb 2011 13:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-118462</guid>
		<description><![CDATA[I have one column Gender in Table. The Data of table is in the form of &#039;M&#039; &amp; &#039;F&#039;.
Now i want to replace this data means i want to set &#039;F&#039; where &#039;M&#039; &amp; viceversa.
So how can i write query for this.
Please help me.]]></description>
		<content:encoded><![CDATA[<p>I have one column Gender in Table. The Data of table is in the form of &#8216;M&#8217; &amp; &#8216;F&#8217;.<br />
Now i want to replace this data means i want to set &#8216;F&#8217; where &#8216;M&#8217; &amp; viceversa.<br />
So how can i write query for this.<br />
Please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-115112</link>
		<dc:creator><![CDATA[stephan]]></dc:creator>
		<pubDate>Sat, 29 Jan 2011 09:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-115112</guid>
		<description><![CDATA[Thanks for your help. problem fixed on test server but i changed it to:

set rowcount 100000
Delete from “table_name”
where CALL_START_UTC between &#039;2008-12-25 00:00:00&#039; AND &#039;2008-12-31 23:59:59&#039;

while @@rowcount&gt;0
Delete from “table_name”
where CALL_START_UTC between &#039;2008-12-25 00:00:00&#039; AND &#039;2008-12-31 23:59:59&#039;

SET ROWCOUNT 0]]></description>
		<content:encoded><![CDATA[<p>Thanks for your help. problem fixed on test server but i changed it to:</p>
<p>set rowcount 100000<br />
Delete from “table_name”<br />
where CALL_START_UTC between &#8217;2008-12-25 00:00:00&#8242; AND &#8217;2008-12-31 23:59:59&#8242;</p>
<p>while @@rowcount&gt;0<br />
Delete from “table_name”<br />
where CALL_START_UTC between &#8217;2008-12-25 00:00:00&#8242; AND &#8217;2008-12-31 23:59:59&#8242;</p>
<p>SET ROWCOUNT 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-115073</link>
		<dc:creator><![CDATA[stephan]]></dc:creator>
		<pubDate>Sat, 29 Jan 2011 01:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-115073</guid>
		<description><![CDATA[madhivanan,

your solution didnt work, i edited to:

set rowcount 10000
Delete from SMC_LONGDISTANCE_CDRS
where CALL_START_UTC between 12/25/2008 AND 01/30/2009

while @@rowcount&gt;0
DELETE from SMC_LONGDISTANCE_CDRS
where CALL_START_UTC between 12/25/2008 AND 01/30/2009

and result was :
(0 row(s) affected)]]></description>
		<content:encoded><![CDATA[<p>madhivanan,</p>
<p>your solution didnt work, i edited to:</p>
<p>set rowcount 10000<br />
Delete from SMC_LONGDISTANCE_CDRS<br />
where CALL_START_UTC between 12/25/2008 AND 01/30/2009</p>
<p>while @@rowcount&gt;0<br />
DELETE from SMC_LONGDISTANCE_CDRS<br />
where CALL_START_UTC between 12/25/2008 AND 01/30/2009</p>
<p>and result was :<br />
(0 row(s) affected)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-114865</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 28 Jan 2011 08:52:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-114865</guid>
		<description><![CDATA[Try this

set rowcount 10000
DELETE from “table_name”
(call_start between ’08/01/2010 12:00:00 AM’ AND ’09/30/2010 11:59:59 PM’)

while @@rowcount&gt;0
DELETE from “table_name”
(call_start between ’08/01/2010 12:00:00 AM’ AND ’09/30/2010 11:59:59 PM’)]]></description>
		<content:encoded><![CDATA[<p>Try this</p>
<p>set rowcount 10000<br />
DELETE from “table_name”<br />
(call_start between ’08/01/2010 12:00:00 AM’ AND ’09/30/2010 11:59:59 PM’)</p>
<p>while @@rowcount&gt;0<br />
DELETE from “table_name”<br />
(call_start between ’08/01/2010 12:00:00 AM’ AND ’09/30/2010 11:59:59 PM’)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-114861</link>
		<dc:creator><![CDATA[stephan]]></dc:creator>
		<pubDate>Fri, 28 Jan 2011 08:27:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-114861</guid>
		<description><![CDATA[I have MS SQL 2005 DB with size of 120GB text content.
Need to delete old record by date and it takes for ever to delete and at it use transaction logs that end me out of storage on the server and delete process stop.

how can i bulk delete without sending records to transaction log? and doesnt wait so long.

is this script a right solution, because i dont want to lose the id key:

DELETE from &quot;table_name&quot;
(call_start between &#039;08/01/2010 12:00:00 AM&#039; AND &#039;09/30/2010 11:59:59 PM&#039;)
DBCC CHECKIDENT(&quot;table_name&quot;, RESEED, 0)]]></description>
		<content:encoded><![CDATA[<p>I have MS SQL 2005 DB with size of 120GB text content.<br />
Need to delete old record by date and it takes for ever to delete and at it use transaction logs that end me out of storage on the server and delete process stop.</p>
<p>how can i bulk delete without sending records to transaction log? and doesnt wait so long.</p>
<p>is this script a right solution, because i dont want to lose the id key:</p>
<p>DELETE from &#8220;table_name&#8221;<br />
(call_start between &#8217;08/01/2010 12:00:00 AM&#8217; AND &#8217;09/30/2010 11:59:59 PM&#8217;)<br />
DBCC CHECKIDENT(&#8220;table_name&#8221;, RESEED, 0)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hari Krishnan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-113817</link>
		<dc:creator><![CDATA[Hari Krishnan]]></dc:creator>
		<pubDate>Mon, 24 Jan 2011 12:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-113817</guid>
		<description><![CDATA[Pinal,

I have an issue. I have hosted a web application with sql serve db in a central server in state capital and there are 10 other districts here. every client machine is accessing  the apllication through the web. but if there is no connectivity they will enter the data into the local serve within the district and this data will be updated to the Central server whenever the connection establishes.

 The problem is every table is having an identity auto increment column which is primary key and this key is referencing as foreign key in the transaction tables. so at the time of synchronisation the identity will get affected and the transaction data will get affected worse. How can I override this situation. Please help on this]]></description>
		<content:encoded><![CDATA[<p>Pinal,</p>
<p>I have an issue. I have hosted a web application with sql serve db in a central server in state capital and there are 10 other districts here. every client machine is accessing  the apllication through the web. but if there is no connectivity they will enter the data into the local serve within the district and this data will be updated to the Central server whenever the connection establishes.</p>
<p> The problem is every table is having an identity auto increment column which is primary key and this key is referencing as foreign key in the transaction tables. so at the time of synchronisation the identity will get affected and the transaction data will get affected worse. How can I override this situation. Please help on this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-103465</link>
		<dc:creator><![CDATA[Ryan]]></dc:creator>
		<pubDate>Thu, 02 Dec 2010 18:23:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-103465</guid>
		<description><![CDATA[Hi,

    I have a table which has an identity column in it. This table is added as an article to  an existing Peer to peer replication.  I tried reseeding the indentity column on this table to 10000 using the below command 

DBCC CHECKIDENT ( &#039;AutoProvision.ApprovalRequestInfo_New1&#039;  , RESEED, 10000000)

No errors are reported when I run the above command , but if I go to verify the identity set in this table using the below command 

DBCC CHECKIDENT ( &#039;AutoProvision.ApprovalRequestInfo_New1&#039; )
go

I get the following output

Checking identity information: current identity value &#039;NULL&#039;, current column value &#039;NULL&#039;.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

I thought this was because the table was added as an article as part of the replication , so I added an additional new table in the DB, with no records ( virgin ) , and then tried to reseed the indentity column on this table to 1000, 
I used the DBCC CHECKIDENT  to check the indentity , but it still returned me 

Checking identity information: current identity value &#039;NULL&#039;, current column value &#039;NULL&#039;.

Any idea , why the table is not being reseeded ?

Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>    I have a table which has an identity column in it. This table is added as an article to  an existing Peer to peer replication.  I tried reseeding the indentity column on this table to 10000 using the below command </p>
<p>DBCC CHECKIDENT ( &#8216;AutoProvision.ApprovalRequestInfo_New1&#8242;  , RESEED, 10000000)</p>
<p>No errors are reported when I run the above command , but if I go to verify the identity set in this table using the below command </p>
<p>DBCC CHECKIDENT ( &#8216;AutoProvision.ApprovalRequestInfo_New1&#8242; )<br />
go</p>
<p>I get the following output</p>
<p>Checking identity information: current identity value &#8216;NULL&#8217;, current column value &#8216;NULL&#8217;.<br />
DBCC execution completed. If DBCC printed error messages, contact your system administrator.</p>
<p>I thought this was because the table was added as an article as part of the replication , so I added an additional new table in the DB, with no records ( virgin ) , and then tried to reseed the indentity column on this table to 1000,<br />
I used the DBCC CHECKIDENT  to check the indentity , but it still returned me </p>
<p>Checking identity information: current identity value &#8216;NULL&#8217;, current column value &#8216;NULL&#8217;.</p>
<p>Any idea , why the table is not being reseeded ?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-102744</link>
		<dc:creator><![CDATA[Jeremy]]></dc:creator>
		<pubDate>Mon, 29 Nov 2010 08:15:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-102744</guid>
		<description><![CDATA[Hi Chris,

thanks for the feedback.

managed to find a built in function that assisted me:

Select Row_Number() Over(Partition By Customer_ID order by Customer_ID, Trans_ID) as Trans_Number

regards
Jeremy]]></description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>thanks for the feedback.</p>
<p>managed to find a built in function that assisted me:</p>
<p>Select Row_Number() Over(Partition By Customer_ID order by Customer_ID, Trans_ID) as Trans_Number</p>
<p>regards<br />
Jeremy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-102453</link>
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Sat, 27 Nov 2010 09:55:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-102453</guid>
		<description><![CDATA[Hi Jeremy,
Declaring your column as an identity column in this case will not help you to achieve this.

I suggest that you write a good T-SQL to analyse your data &amp; do organise it the way you want it.

Try going through your data using a cursor or any optimised while loop logic and add the extra digit to the data you want.

Regards,
Chris Musasizi]]></description>
		<content:encoded><![CDATA[<p>Hi Jeremy,<br />
Declaring your column as an identity column in this case will not help you to achieve this.</p>
<p>I suggest that you write a good T-SQL to analyse your data &amp; do organise it the way you want it.</p>
<p>Try going through your data using a cursor or any optimised while loop logic and add the extra digit to the data you want.</p>
<p>Regards,<br />
Chris Musasizi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-102297</link>
		<dc:creator><![CDATA[Jeremy]]></dc:creator>
		<pubDate>Fri, 26 Nov 2010 12:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-102297</guid>
		<description><![CDATA[Hi,  please assist.  I have table that looks like the following:

Customer_ID	Trans_ID
1000	                 210
1001	                 212
1001	                 254
1001	                 300
1002	                 123
1003	                 155
1003	                 290
1004	                 230
1004	                 267
1004           	 281

I need to add in an extra column which counts each transaction instance for each Customer_ID.  It should look like below:

Customer_ID	Trans_ID	          Trans_number
1000	                 210	                    1
1001	                 212	                    1
1001	                 254	                    2
1001	                 300	                    3
1002	                 123	                    1
1003	                 155	                    1
1003	                 290	                    2
1004	                 230	                    1
1004	                 267	                    2
1004	                 281	                    3

thanks in advance.]]></description>
		<content:encoded><![CDATA[<p>Hi,  please assist.  I have table that looks like the following:</p>
<p>Customer_ID	Trans_ID<br />
1000	                 210<br />
1001	                 212<br />
1001	                 254<br />
1001	                 300<br />
1002	                 123<br />
1003	                 155<br />
1003	                 290<br />
1004	                 230<br />
1004	                 267<br />
1004           	 281</p>
<p>I need to add in an extra column which counts each transaction instance for each Customer_ID.  It should look like below:</p>
<p>Customer_ID	Trans_ID	          Trans_number<br />
1000	                 210	                    1<br />
1001	                 212	                    1<br />
1001	                 254	                    2<br />
1001	                 300	                    3<br />
1002	                 123	                    1<br />
1003	                 155	                    1<br />
1003	                 290	                    2<br />
1004	                 230	                    1<br />
1004	                 267	                    2<br />
1004	                 281	                    3</p>
<p>thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yul</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-90571</link>
		<dc:creator><![CDATA[Yul]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 22:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-90571</guid>
		<description><![CDATA[Vlad,
I would first run sp_help YourTable and look for the value of Seed. If it is 0 research stops here.
If it is 1 use profiler to trace what you C# code does. There is a chance it sets identity insert on and inserts into your identity column explicitly.
Next, try to reproduce the problem inserting into the script-generated table from SSMS. Reseed, repeat.
BTW, note that Reseed does not change the original seed value, therefore if you need to reseed do it after each truncate.

good luck,
--yul]]></description>
		<content:encoded><![CDATA[<p>Vlad,<br />
I would first run sp_help YourTable and look for the value of Seed. If it is 0 research stops here.<br />
If it is 1 use profiler to trace what you C# code does. There is a chance it sets identity insert on and inserts into your identity column explicitly.<br />
Next, try to reproduce the problem inserting into the script-generated table from SSMS. Reseed, repeat.<br />
BTW, note that Reseed does not change the original seed value, therefore if you need to reseed do it after each truncate.</p>
<p>good luck,<br />
&#8211;yul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alcontreras</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-87274</link>
		<dc:creator><![CDATA[Alcontreras]]></dc:creator>
		<pubDate>Thu, 09 Sep 2010 18:57:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-87274</guid>
		<description><![CDATA[If you have the SQL Server Management Studio then you can simply open the table in design mode, select the field, go to the Identity Seed property (in the Identity Specification group) and set it to the velue you need. This if you don&#039;t need to change the seed within your application, of course!]]></description>
		<content:encoded><![CDATA[<p>If you have the SQL Server Management Studio then you can simply open the table in design mode, select the field, go to the Identity Seed property (in the Identity Specification group) and set it to the velue you need. This if you don&#8217;t need to change the seed within your application, of course!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hina</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-85493</link>
		<dc:creator><![CDATA[Hina]]></dc:creator>
		<pubDate>Sat, 28 Aug 2010 07:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-85493</guid>
		<description><![CDATA[Hello, I am having the issue that when our staging(demo) database gets updated with live data (which is on another database), the seed is getting overwritten.  How can I ensure that the seed value (say of 50000) is maintained?]]></description>
		<content:encoded><![CDATA[<p>Hello, I am having the issue that when our staging(demo) database gets updated with live data (which is on another database), the seed is getting overwritten.  How can I ensure that the seed value (say of 50000) is maintained?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maddy...!</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-84520</link>
		<dc:creator><![CDATA[Maddy...!]]></dc:creator>
		<pubDate>Wed, 18 Aug 2010 12:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-84520</guid>
		<description><![CDATA[Thank You Dave,

I actually dont knw about how to reset my identity value, i was facing this problem every time when I want to truncate a table which is referenced by another child tables. 

It is very helpful to me.

And I want to Thank You on behalf of all my folks (people who work on database) for creating such a beautiful environment to share our knowledge and solve different kinds of problems encounterd.]]></description>
		<content:encoded><![CDATA[<p>Thank You Dave,</p>
<p>I actually dont knw about how to reset my identity value, i was facing this problem every time when I want to truncate a table which is referenced by another child tables. </p>
<p>It is very helpful to me.</p>
<p>And I want to Thank You on behalf of all my folks (people who work on database) for creating such a beautiful environment to share our knowledge and solve different kinds of problems encounterd.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-83465</link>
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 09 Aug 2010 07:59:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-83465</guid>
		<description><![CDATA[Hi Suresh,
About how many rows are in the table before you issue a TRUNCATE TABLE statement?
Secondly, do you have many indexes on this table?

If you have few rows like just a few thousand rows then your server needs a good performance drill down at database level, OS and Hardware levels.
You may find out that the problem lies elsewhere.

Try to maintain your database by checking the integrity of your table first, this might be good for a start.

Under normal circumstances, issuing a TRUNCATE TABLE runs faster than issuing a DELETE statement.

DBCC CHECKIDENT should run instantly.

Regards,
Chris Musasizi]]></description>
		<content:encoded><![CDATA[<p>Hi Suresh,<br />
About how many rows are in the table before you issue a TRUNCATE TABLE statement?<br />
Secondly, do you have many indexes on this table?</p>
<p>If you have few rows like just a few thousand rows then your server needs a good performance drill down at database level, OS and Hardware levels.<br />
You may find out that the problem lies elsewhere.</p>
<p>Try to maintain your database by checking the integrity of your table first, this might be good for a start.</p>
<p>Under normal circumstances, issuing a TRUNCATE TABLE runs faster than issuing a DELETE statement.</p>
<p>DBCC CHECKIDENT should run instantly.</p>
<p>Regards,<br />
Chris Musasizi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heena</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-81337</link>
		<dc:creator><![CDATA[Heena]]></dc:creator>
		<pubDate>Fri, 23 Jul 2010 06:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-81337</guid>
		<description><![CDATA[Hi...
Its help full article, i got my solution from this...

thanx...thanx very much...]]></description>
		<content:encoded><![CDATA[<p>Hi&#8230;<br />
Its help full article, i got my solution from this&#8230;</p>
<p>thanx&#8230;thanx very much&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naren</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-80502</link>
		<dc:creator><![CDATA[naren]]></dc:creator>
		<pubDate>Fri, 16 Jul 2010 12:09:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-80502</guid>
		<description><![CDATA[pinal got it just 

Earlier it is : DBCC CHECKIDENT (schools.tblCaste,reseed,0)

Success: DBCC CHECKIDENT (&#039;schools.tblCaste&#039;,reseed,0)]]></description>
		<content:encoded><![CDATA[<p>pinal got it just </p>
<p>Earlier it is : DBCC CHECKIDENT (schools.tblCaste,reseed,0)</p>
<p>Success: DBCC CHECKIDENT (&#8216;schools.tblCaste&#8217;,reseed,0)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suresh</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-69459</link>
		<dc:creator><![CDATA[suresh]]></dc:creator>
		<pubDate>Thu, 06 May 2010 11:38:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-69459</guid>
		<description><![CDATA[Hi Pinal,

I use the statement
DBCC CHECKIDENT(mytable, RESEED, 350) in one of my stored procedures.

The table mytable needs to be truncated before I call the above statement, due to stored procedure logic requirements.

However, I see that the execution takes very long time. Sometimes. it takes around 20-30 seconds to complete the execution of this statement. Cant see any reasons.

There are no performance issues with any of the other database objects..in general.

If you can help me answer this problem, its highly appreciated. I follow your blog quite often and I appreciate you for all the work you do for the community.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I use the statement<br />
DBCC CHECKIDENT(mytable, RESEED, 350) in one of my stored procedures.</p>
<p>The table mytable needs to be truncated before I call the above statement, due to stored procedure logic requirements.</p>
<p>However, I see that the execution takes very long time. Sometimes. it takes around 20-30 seconds to complete the execution of this statement. Cant see any reasons.</p>
<p>There are no performance issues with any of the other database objects..in general.</p>
<p>If you can help me answer this problem, its highly appreciated. I follow your blog quite often and I appreciate you for all the work you do for the community.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-67598</link>
		<dc:creator><![CDATA[Ryan]]></dc:creator>
		<pubDate>Wed, 28 Apr 2010 22:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-67598</guid>
		<description><![CDATA[Thanks Dave! Very useful information, keep up the good work.]]></description>
		<content:encoded><![CDATA[<p>Thanks Dave! Very useful information, keep up the good work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

