<?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>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-57731</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 19 Nov 2009 09:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-57731</guid>
		<description>Hi Dave,
It&#039;s worth notting that DBCC commands should only be used on a local server.
If you tried a command like this: DBCC CHECKIDENT (&#039;LINKD_SERVER.DB.SCHEMA.TABLE&#039;, NORESEED); then you will get the following error from SQL server:

Server: Msg 2501, Level 16, State 2, Line 1
Could not find a table or object named &#039;LINKD_SERVER.DB.SCHEMA.TABLE&#039;. Check sysobjects.

I recommend you to run DNCC CHECKINDENT on the table by connecting directly to the SQL instance that manages the database where your table is.

It is however possible to run DBCC commands outside a database but on the same instance as follows:
DBCC CHECKIDENT (&#039;DB.SCHEMA.TABLE&#039;, NORESEED);
I hope this answers your query.

God bless,
Chris Musasizi</description>
		<content:encoded><![CDATA[<p>Hi Dave,<br />
It&#8217;s worth notting that DBCC commands should only be used on a local server.<br />
If you tried a command like this: DBCC CHECKIDENT (&#8216;LINKD_SERVER.DB.SCHEMA.TABLE&#8217;, NORESEED); then you will get the following error from SQL server:</p>
<p>Server: Msg 2501, Level 16, State 2, Line 1<br />
Could not find a table or object named &#8216;LINKD_SERVER.DB.SCHEMA.TABLE&#8217;. Check sysobjects.</p>
<p>I recommend you to run DNCC CHECKINDENT on the table by connecting directly to the SQL instance that manages the database where your table is.</p>
<p>It is however possible to run DBCC commands outside a database but on the same instance as follows:<br />
DBCC CHECKIDENT (&#8216;DB.SCHEMA.TABLE&#8217;, NORESEED);<br />
I hope this answers your query.</p>
<p>God bless,<br />
Chris Musasizi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Sundell</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-56349</link>
		<dc:creator>Dave Sundell</dc:creator>
		<pubDate>Fri, 02 Oct 2009 15:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-56349</guid>
		<description>How can we reseed or use the DBCC CheckIdent on a table with the prefix of a  link server name. I get a syntax error when prefixing the table location with a link server name, e.g. DBCC CHECKIDENT ([LinkServerName].DBName.dbo.[tableName], RESEED, 0)</description>
		<content:encoded><![CDATA[<p>How can we reseed or use the DBCC CheckIdent on a table with the prefix of a  link server name. I get a syntax error when prefixing the table location with a link server name, e.g. DBCC CHECKIDENT ([LinkServerName].DBName.dbo.[tableName], RESEED, 0)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaroslaw Dobrzanski</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-55906</link>
		<dc:creator>Jaroslaw Dobrzanski</dc:creator>
		<pubDate>Wed, 16 Sep 2009 07:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-55906</guid>
		<description>What I wanted, short and simple described.
Thanks!</description>
		<content:encoded><![CDATA[<p>What I wanted, short and simple described.<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis A.</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-54524</link>
		<dc:creator>Luis A.</dc:creator>
		<pubDate>Thu, 06 Aug 2009 12:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-54524</guid>
		<description>Thanks!! I had this problem  always, it was so helpful!!
:)</description>
		<content:encoded><![CDATA[<p>Thanks!! I had this problem  always, it was so helpful!!<br />
:)</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-53346</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 30 Jun 2009 07:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-53346</guid>
		<description>Charl,
Please delete content of a table by issuing any of the following SQL statement:

DELETE FROM Table_Name;
TRUNCATE TABLE Table_Name;

Replace Table_Name with the actual table whose content you want to delete.

Deleting a whole database means that you will need some privileges, that is database admin privileges or database owner privileges.

To delete a database, issue the following SQL statement:
DROP DATABASE Database_Name;

Regards,
Chris Musasizi</description>
		<content:encoded><![CDATA[<p>Charl,<br />
Please delete content of a table by issuing any of the following SQL statement:</p>
<p>DELETE FROM Table_Name;<br />
TRUNCATE TABLE Table_Name;</p>
<p>Replace Table_Name with the actual table whose content you want to delete.</p>
<p>Deleting a whole database means that you will need some privileges, that is database admin privileges or database owner privileges.</p>
<p>To delete a database, issue the following SQL statement:<br />
DROP DATABASE Database_Name;</p>
<p>Regards,<br />
Chris Musasizi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-47186</link>
		<dc:creator>SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Tue, 24 Feb 2009 12:06:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-47186</guid>
		<description>[...] SQL SERVER - DBCC RESEED Table Identity Value - Reset Table Identity [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; DBCC RESEED Table Identity Value &#8211; Reset Table Identity [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ari</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-44466</link>
		<dc:creator>Ari</dc:creator>
		<pubDate>Mon, 01 Dec 2008 13:37:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-44466</guid>
		<description>I was dropping and recreating tables for my unit (integration) tests and came across this reseed problem for virgin tables. My (ugly) fix was to 1) insert row into the table 2) delete all rows 3) reseed 4) insert (again) into the table. This way I could know for sure what id the inserted row got.</description>
		<content:encoded><![CDATA[<p>I was dropping and recreating tables for my unit (integration) tests and came across this reseed problem for virgin tables. My (ugly) fix was to 1) insert row into the table 2) delete all rows 3) reseed 4) insert (again) into the table. This way I could know for sure what id the inserted row got.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KaraK</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-44164</link>
		<dc:creator>KaraK</dc:creator>
		<pubDate>Tue, 11 Nov 2008 21:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-44164</guid>
		<description>Vladimir

if ur table it&#039;s new u must use:

DBCC CHECKIDENT (yourtable, reseed, seed_value)

but if u just delete that table u can use:

DBCC CHECKIDENT (yourtable, reseed, 0)


CYA</description>
		<content:encoded><![CDATA[<p>Vladimir</p>
<p>if ur table it&#8217;s new u must use:</p>
<p>DBCC CHECKIDENT (yourtable, reseed, seed_value)</p>
<p>but if u just delete that table u can use:</p>
<p>DBCC CHECKIDENT (yourtable, reseed, 0)</p>
<p>CYA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj Parmar</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-44089</link>
		<dc:creator>Raj Parmar</dc:creator>
		<pubDate>Fri, 07 Nov 2008 00:03:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-44089</guid>
		<description>Excellent article.. reliable as always and saved me a lot of time! Thanks.</description>
		<content:encoded><![CDATA[<p>Excellent article.. reliable as always and saved me a lot of time! Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dakshinamurthy</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-39785</link>
		<dc:creator>dakshinamurthy</dc:creator>
		<pubDate>Sat, 05 Jul 2008 06:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-39785</guid>
		<description>Hi, 
please let me know what will be the maximum seed value for a table which is of bigint.  I would also helpfull if i get to know what to do if we exceed the seed value for a bigint field in a table</description>
		<content:encoded><![CDATA[<p>Hi,<br />
please let me know what will be the maximum seed value for a table which is of bigint.  I would also helpfull if i get to know what to do if we exceed the seed value for a bigint field in a table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noshiri</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-38984</link>
		<dc:creator>Noshiri</dc:creator>
		<pubDate>Wed, 04 Jun 2008 15:53:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-38984</guid>
		<description>Hello have a table in my database with value like

AAABBB&lt;
1111&lt;
1222&lt;
1333&lt;
2444&lt;
2555&lt;
2666&lt;
3777&lt;
3888&lt;
3999&lt;

i want an sql query that display distinct value from column AAA and its MAX value from column BBB
as shown below.  Thanks in advance for your help!!!
1333&lt;
2666&lt;
3999&lt;
</description>
		<content:encoded><![CDATA[<p>Hello have a table in my database with value like</p>
<p>AAABBB&lt;<br />
1111&lt;<br />
1222&lt;<br />
1333&lt;<br />
2444&lt;<br />
2555&lt;<br />
2666&lt;<br />
3777&lt;<br />
3888&lt;<br />
3999&lt;</p>
<p>i want an sql query that display distinct value from column AAA and its MAX value from column BBB<br />
as shown below.  Thanks in advance for your help!!!<br />
1333&lt;<br />
2666&lt;<br />
3999&lt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike S</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-36871</link>
		<dc:creator>Mike S</dc:creator>
		<pubDate>Mon, 05 May 2008 15:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-36871</guid>
		<description>I have a table designed by a FORMER employee. There was no primary key created. In the table there are 7500 some records. The values started @ 1 through 2145, then 1600 columns are null. Then the index begins @ some random number and continues ASC. Is there a way for me to just reset the FamilyFriendSurveyID column in the entire table?, I need to now make this column be a primary key for the table, can this be done to auto increment starting @ 1? Thank you in advance for your help!!!</description>
		<content:encoded><![CDATA[<p>I have a table designed by a FORMER employee. There was no primary key created. In the table there are 7500 some records. The values started @ 1 through 2145, then 1600 columns are null. Then the index begins @ some random number and continues ASC. Is there a way for me to just reset the FamilyFriendSurveyID column in the entire table?, I need to now make this column be a primary key for the table, can this be done to auto increment starting @ 1? Thank you in advance for your help!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Sturdivant</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-35258</link>
		<dc:creator>Nick Sturdivant</dc:creator>
		<pubDate>Mon, 21 Apr 2008 20:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-35258</guid>
		<description>Thanks to Dave for the OP and to Ron Moses for the virgin table observation.  I had been troubleshooting this for some time.  Glad to have found this post.

Thanks again,
Nick</description>
		<content:encoded><![CDATA[<p>Thanks to Dave for the OP and to Ron Moses for the virgin table observation.  I had been troubleshooting this for some time.  Glad to have found this post.</p>
<p>Thanks again,<br />
Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo Espejo</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-34304</link>
		<dc:creator>Leo Espejo</dc:creator>
		<pubDate>Wed, 12 Mar 2008 20:37:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-34304</guid>
		<description>MSDN is a good reference, but you are THE reference, thank god you exist !

Best regards,
Leo Espejo</description>
		<content:encoded><![CDATA[<p>MSDN is a good reference, but you are THE reference, thank god you exist !</p>
<p>Best regards,<br />
Leo Espejo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladimir Kelman</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-34188</link>
		<dc:creator>Vladimir Kelman</dc:creator>
		<pubDate>Fri, 07 Mar 2008 22:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-34188</guid>
		<description>We experience a strange problem. Identity field of a table is set to [1,1] by generating script. Every time, when we drop the whole database, and then re-create it by running script in SQL Server 2008 Management Studio, and then insert a record into  that table programmatically (C# code), SQL Server set identity field record of that first record to 0 instead of 1!
Then we also programmatically delete all records from that table and then execute
DBCC CHECKIDENT(&#039;&quot; + targetTableName + &quot;&#039;, RESEED, 0)

Next time, the same C# function inserts records correctly, with identity field starting from 1 as expected.

So, again, identity field does not want to behave correctly if database was just created by script. After inserting a record and deleting it, everything works fine.

Is it SQL Server 2008 bug? Any idea on possible workaround?</description>
		<content:encoded><![CDATA[<p>We experience a strange problem. Identity field of a table is set to [1,1] by generating script. Every time, when we drop the whole database, and then re-create it by running script in SQL Server 2008 Management Studio, and then insert a record into  that table programmatically (C# code), SQL Server set identity field record of that first record to 0 instead of 1!<br />
Then we also programmatically delete all records from that table and then execute<br />
DBCC CHECKIDENT(&#8216;&#8221; + targetTableName + &#8220;&#8216;, RESEED, 0)</p>
<p>Next time, the same C# function inserts records correctly, with identity field starting from 1 as expected.</p>
<p>So, again, identity field does not want to behave correctly if database was just created by script. After inserting a record and deleting it, everything works fine.</p>
<p>Is it SQL Server 2008 bug? Any idea on possible workaround?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charl</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-33858</link>
		<dc:creator>Charl</dc:creator>
		<pubDate>Wed, 20 Feb 2008 14:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-33858</guid>
		<description>How do I delete the content of a table or whole database???</description>
		<content:encoded><![CDATA[<p>How do I delete the content of a table or whole database???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant Nehete</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-33100</link>
		<dc:creator>Hemant Nehete</dc:creator>
		<pubDate>Fri, 18 Jan 2008 14:26:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-33100</guid>
		<description>Hi mithilesh kumar,
    Identity columns does not stand for uniqueness,
Unless you don&#039;t define identity column as part of Primary Key.</description>
		<content:encoded><![CDATA[<p>Hi mithilesh kumar,<br />
    Identity columns does not stand for uniqueness,<br />
Unless you don&#8217;t define identity column as part of Primary Key.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Milos</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-32899</link>
		<dc:creator>Milos</dc:creator>
		<pubDate>Wed, 16 Jan 2008 09:35:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-32899</guid>
		<description>Does DBCC RESEED works with replicated databases? Can I change the identity value on a subscription database?</description>
		<content:encoded><![CDATA[<p>Does DBCC RESEED works with replicated databases? Can I change the identity value on a subscription database?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Time Out Due to Executing DELETE on Large RecordSet Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-32803</link>
		<dc:creator>SQL SERVER - Time Out Due to Executing DELETE on Large RecordSet Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Tue, 15 Jan 2008 10:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-32803</guid>
		<description>[...] will have to get the maximum identity before you truncate and reset it to that maximum identity. SQL SERVER - DBCC RESEED Table Identity Value - Reset Table Identity . If you are not using identity or do not have use for identity you do not have to [...]</description>
		<content:encoded><![CDATA[<p>[...] will have to get the maximum identity before you truncate and reset it to that maximum identity. SQL SERVER &#8211; DBCC RESEED Table Identity Value &#8211; Reset Table Identity . If you are not using identity or do not have use for identity you do not have to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charlie</title>
		<link>http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/#comment-23305</link>
		<dc:creator>charlie</dc:creator>
		<pubDate>Wed, 28 Nov 2007 16:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/03/15/dbcc-reseed-table-identity-value-reset-table-identity/#comment-23305</guid>
		<description>Thanks</description>
		<content:encoded><![CDATA[<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
