What are the challenges you face when working across database platforms? Take the survey
Options

Error deleting data from table before generation

elsioelsio Posts: 4
edited January 13, 2015 12:01PM in SQL Data Generator
Hi,

I'm having the following error when i try to generate data with the option "Delete data fom table before generation" active:
"Parameter 3 is incorrect for this DBCC statement. The statement has been terminated."

I used a profiler to view the executed statement :
DBCC CHECKIDENT ('table_name', RESEED, -2147483649) WITH NO_INFOMSGS

I'm trying to generate data on a table with a primary key with the following identity specification: IDENTITY(-2147483648,1)

Any ideas about this error?

I really appreciate any help you can provide.

Thanks

Comments

  • Options
    Hi Elsio,

    This is occurring because the seed value is at the lower limit of the in32 data type (–2147483648). To get back to this point, with the stated increment value of 1, it needs to set the seed to be –2147483649 so that when it increments it for the first row of data it starts off at the seed value. The problem is that –2147483649 is out of the range of the int32 datatype. If you set the seed value to be –2147483647 it should not error.

    I hope this helps!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.