> Is there a SQL Server equivalent of Access' "compact database"?
> 
> I would like to dump all the data in certain tables and for 
> the Identity fields to start renumbering from 1.

These are two different things. When you compact an Access database, it
doesn't delete any records. It simply discards the space where records used
to be before they were deleted. I'm not sure how identity columns in Access
are affected by this, if you delete records from the end of a table and then
compact the database - I'd kind of hope that it doesn't ever reuse an
identity value, simply because the database may be poorly designed and
missing the appropriate declarative referential integrity.

You can reduce the size of a database in SQL Server from within the
Enterprise Manager interface. In addition, you can configure databases so
that they automatically resize as the dataset grows and shrinks.

If you want to delete data from a table, and reinitialize its identity
column back to the original seed value, you can use the T-SQL statement
TRUNCATE TABLE.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to