<?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>Thu, 23 May 2013 14:22:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #020 &#124; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-438048</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #020 &#124; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 16 Mar 2013 01:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-438048</guid>
		<description><![CDATA[[...] DBCC RESEED Table Identity Value – Reset Table Identity My early career blog discusses about Table Identity Value and how to reset them to the original value. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] DBCC RESEED Table Identity Value – Reset Table Identity My early career blog discusses about Table Identity Value and how to reset them to the original value. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pl</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-423813</link>
		<dc:creator><![CDATA[pl]]></dc:creator>
		<pubDate>Tue, 19 Feb 2013 09:23:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-423813</guid>
		<description><![CDATA[Love your blog Pinal Dave, I use it a lot. 
Is it worth mentioning that if the table has no rows then the first row will have an identity of the seed value, not seed + 1?]]></description>
		<content:encoded><![CDATA[<p>Love your blog Pinal Dave, I use it a lot.<br />
Is it worth mentioning that if the table has no rows then the first row will have an identity of the seed value, not seed + 1?</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-421322</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 10:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-421322</guid>
		<description><![CDATA[You need to join with the numbers table to find this

select n.number from numbers as n left join your_table as t on n.number=t.id_col
where t.id_col is null]]></description>
		<content:encoded><![CDATA[<p>You need to join with the numbers table to find this</p>
<p>select n.number from numbers as n left join your_table as t on n.number=t.id_col<br />
where t.id_col is null</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris K</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-419182</link>
		<dc:creator><![CDATA[Chris K]]></dc:creator>
		<pubDate>Thu, 07 Feb 2013 18:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-419182</guid>
		<description><![CDATA[Select Row_number() over (partition by customer_id order by trans_id asc) as trans_number, * from Table]]></description>
		<content:encoded><![CDATA[<p>Select Row_number() over (partition by customer_id order by trans_id asc) as trans_number, * from Table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shahid</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-418177</link>
		<dc:creator><![CDATA[Shahid]]></dc:creator>
		<pubDate>Tue, 05 Feb 2013 15:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-418177</guid>
		<description><![CDATA[Hi Pinal,
There are 100s of records in a table having identy columns out that 15 records has been deleted. My question is that how to find that what are the identities which has been deleted.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
There are 100s of records in a table having identy columns out that 15 records has been deleted. My question is that how to find that what are the identities which has been deleted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anil redy</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-390631</link>
		<dc:creator><![CDATA[anil redy]]></dc:creator>
		<pubDate>Mon, 10 Dec 2012 10:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-390631</guid>
		<description><![CDATA[hi]]></description>
		<content:encoded><![CDATA[<p>hi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Israel G.</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-306142</link>
		<dc:creator><![CDATA[Israel G.]]></dc:creator>
		<pubDate>Tue, 26 Jun 2012 17:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-306142</guid>
		<description><![CDATA[Thanks a lot.
Greetings from México.]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot.<br />
Greetings from México.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jidesh David</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-293222</link>
		<dc:creator><![CDATA[Jidesh David]]></dc:creator>
		<pubDate>Sun, 03 Jun 2012 08:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-293222</guid>
		<description><![CDATA[Thank u Dave... Please tell me how insert DateDiff values to a table

Date to be compared retrieve from another table..

I mean Start Date taken from tb1, End Date taken from tb2, values inserted to tb2]]></description>
		<content:encoded><![CDATA[<p>Thank u Dave&#8230; Please tell me how insert DateDiff values to a table</p>
<p>Date to be compared retrieve from another table..</p>
<p>I mean Start Date taken from tb1, End Date taken from tb2, values inserted to tb2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Husrat</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-286141</link>
		<dc:creator><![CDATA[Husrat]]></dc:creator>
		<pubDate>Sat, 19 May 2012 13:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-286141</guid>
		<description><![CDATA[DBCC CHECKIDENT(&#039;schema.TableName&#039;,reseed,34)]]></description>
		<content:encoded><![CDATA[<p>DBCC CHECKIDENT(&#8216;schema.TableName&#8217;,reseed,34)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Cicotte</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-269073</link>
		<dc:creator><![CDATA[Ron Cicotte]]></dc:creator>
		<pubDate>Wed, 28 Mar 2012 18:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-269073</guid>
		<description><![CDATA[IF @schema != ”dbo”]]></description>
		<content:encoded><![CDATA[<p>IF @schema != ”dbo”</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Cicotte</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-269062</link>
		<dc:creator><![CDATA[Ron Cicotte]]></dc:creator>
		<pubDate>Wed, 28 Mar 2012 18:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-269062</guid>
		<description><![CDATA[The  != appears to be missing in the code posted
SET @schema =  PARSENAME(&quot;?&quot;,2) IF @schema  &#039;&#039;dbo&#039;&#039;]]></description>
		<content:encoded><![CDATA[<p>The  != appears to be missing in the code posted<br />
SET @schema =  PARSENAME(&#8220;?&#8221;,2) IF @schema  &#8221;dbo&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Cicotte</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-269060</link>
		<dc:creator><![CDATA[Ron Cicotte]]></dc:creator>
		<pubDate>Wed, 28 Mar 2012 17:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-269060</guid>
		<description><![CDATA[I have been dealing with the issues around DBCC CHECKIDENT and i think I have found the issue and the solution.  I&#039;ve been trying to create an environment where I can refresh the database after doing some development leaving all tables empty.  I tried Ron Moses solution but still found some tables would add 1 to the reseed values while others would begin with the next higher value.  It turns ou that this is related to whether we are truncating or deleting records due to the presence of a foreign key.  I found that the following code solves the problem.  Please note that I am refreshing tables in all schemas except dbo.

EXEC sp_MSForEachTable &#039;ALTER TABLE ? NOCHECK CONSTRAINT ALL&#039;  
-- USE DELETE on Tables with foreign keys and Truncate on others
EXEC sp_MSForEachTable &#039;declare @schema varchar(255);
    SET @schema =  PARSENAME(&quot;?&quot;,2) IF @schema  &#039;&#039;dbo&#039;&#039;
    BEGIN
		IF OBJECTPROPERTY(object_id(&#039;&#039;?&#039;&#039;), &#039;&#039;TableHasForeignRef&#039;&#039;) = 1 
		BEGIN  
			DELETE FROM ? 
			IF OBJECTPROPERTY(object_id(&#039;&#039;?&#039;&#039;), &#039;&#039;TableHasIdentity&#039;&#039;) = 1 
				DBCC CHECKIDENT (&#039;&#039;?&#039;&#039;, RESEED,0) WITH   NO_INFOMSGS
		END 
		else   		
		BEGIN   
			TRUNCATE TABLE ? 
			IF OBJECTPROPERTY(object_id(&#039;&#039;?&#039;&#039;), &#039;&#039;TableHasIdentity&#039;&#039;) = 1 
				DBCC CHECKIDENT (&#039;&#039;?&#039;&#039;, RESEED,1) WITH   NO_INFOMSGS
		END 
    END;
 &#039;

EXEC sp_MSForEachTable &#039;ALTER TABLE ? CHECK CONSTRAINT ALL&#039;]]></description>
		<content:encoded><![CDATA[<p>I have been dealing with the issues around DBCC CHECKIDENT and i think I have found the issue and the solution.  I&#8217;ve been trying to create an environment where I can refresh the database after doing some development leaving all tables empty.  I tried Ron Moses solution but still found some tables would add 1 to the reseed values while others would begin with the next higher value.  It turns ou that this is related to whether we are truncating or deleting records due to the presence of a foreign key.  I found that the following code solves the problem.  Please note that I am refreshing tables in all schemas except dbo.</p>
<p>EXEC sp_MSForEachTable &#8216;ALTER TABLE ? NOCHECK CONSTRAINT ALL&#8217;<br />
&#8211; USE DELETE on Tables with foreign keys and Truncate on others<br />
EXEC sp_MSForEachTable &#8216;declare @schema varchar(255);<br />
    SET @schema =  PARSENAME(&#8220;?&#8221;,2) IF @schema  &#8221;dbo&#8221;<br />
    BEGIN<br />
		IF OBJECTPROPERTY(object_id(&#8221;?&#8221;), &#8221;TableHasForeignRef&#8221;) = 1<br />
		BEGIN<br />
			DELETE FROM ?<br />
			IF OBJECTPROPERTY(object_id(&#8221;?&#8221;), &#8221;TableHasIdentity&#8221;) = 1<br />
				DBCC CHECKIDENT (&#8221;?&#8221;, RESEED,0) WITH   NO_INFOMSGS<br />
		END<br />
		else<br />
		BEGIN<br />
			TRUNCATE TABLE ?<br />
			IF OBJECTPROPERTY(object_id(&#8221;?&#8221;), &#8221;TableHasIdentity&#8221;) = 1<br />
				DBCC CHECKIDENT (&#8221;?&#8221;, RESEED,1) WITH   NO_INFOMSGS<br />
		END<br />
    END;<br />
 &#8216;</p>
<p>EXEC sp_MSForEachTable &#8216;ALTER TABLE ? CHECK CONSTRAINT ALL&#8217;</p>
]]></content:encoded>
	</item>
	<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>
</channel>
</rss>
