[dba-SQLServer] Fw: RESEED deletes records

Francisco Tapia fhtapia at gmail.com
Tue Jul 1 15:04:40 CDT 2008


I am having a hard time re-producing your results, here is what I tried from
the article on SqlServerCentral
http://www.sqlservercentral.com/articles/RESEED/62847/

--Create table
CREATE TABLE dbo.reseedtest (reseedtestId INT IDENTITY(1,1), column2
NVARCHAR(50));
--Insert a few rows
INSERT dbo.reseedtest (column2) VALUES ('One')
INSERT dbo.reseedtest (column2) VALUES ('Two')
--RESEED on a non-virgin table and insert a few rows
DBCC CHECKIDENT('dbo.reseedtest',RESEED,3);

INSERT dbo.reseedtest (column2) VALUES ('Three')
INSERT dbo.reseedtest (column2) VALUES ('Four')

select * from reseedtest

The only thing

On Tue, Jul 1, 2008 at 9:34 AM, Susan Harkins <ssharkins at gmail.com> wrote:

> I forgot to mention that I'm using SQL Server 2005 Express -- not sure why
> that would matter, but it might.
>
> Susan H.
>
>
> > I'm running some tests on DBCC CHECKIDENT and only one surprise:
> >
> > DBCC CHECKIDENT (tablename, RESEED)
> >
> > deletes the table's records. Now, I wasn't expecting that, since the
> > documentation says it corrects the seed value -- in truth, I wasn't sure
> > what that meant, hence the testing.
> >
> > I'm going to do a little research, but if someone already has an
> > explanation and doesn't mind sharing, please do.
> >
> > Susan H.
>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>


-- 
-Francisco
http://sqlthis.blogspot.com | Tsql and More...



More information about the dba-SQLServer mailing list