Hello.

After successfully executed rebuild of database SA 5.0 to SA 12.0.1, I have problems wtih autoincrement fields, because values are not retained from the old database. They all start with 0. I've found the -l switch for dbunload, but it's not working, see picture

Please help.

Thanks, Robert

asked 28 Sep '11, 08:53

enroberte's gravatar image

enroberte
16223
accept rate: 0%

edited 28 Sep '11, 09:50

Volker%20Barth's gravatar image

Volker Barth
29.9k294446654

I can't tell what went wrong, but this FAQ might help...

(28 Sep '11, 09:52) Volker Barth

AFAIK, in v5 there's no max_identity column in table syscolumn. That might be the reason why the -l option seems to fail here.

Note that specifying "unload -l" is only necessary if larger autoincrement values have been used in the according column than what is contained in the old database - which usually would mean that these larger values have been deleted in the meantime. I guess this would usually only be a problem with SQL Remote or other synchronization technologies (that's why I asked the cited FAQ...), not with single databases.

The default behaviour of LOAD TABLE does set the maximum autoincrement value based on maximum value of the loaded rows, so usually you'll be fine without specifying -l.

And additionally, you might also explicitly set the values after the reload with the help of the sa_reset_identity system procedure.

permanent link

answered 28 Sep '11, 11:25

Volker%20Barth's gravatar image

Volker Barth
29.9k294446654
accept rate: 32%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×408
×36
×12

question asked: 28 Sep '11, 08:53

question was seen: 1,820 times

last updated: 28 Sep '11, 11:25