Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.


call sa_reset_identity('tablename')

throws the error:

ERROR [HY000] [Sybase][ODBC Driver][SQL Anywhere]RAISERROR executed: invalid new_identity value

The used table has only one autoincrement column. If a new start value is explicitly provided it works.

Any idea, what's the problem with the default usage?

asked 18 Dec '20, 04:49

Martin's gravatar image

accept rate: 14%

edited 18 Dec '20, 04:50

So what's the current max_identity of that particular table according to the system catalog?

(18 Dec '20, 07:22) Volker Barth
Replies hidden

it says 930

(18 Dec '20, 07:52) Martin

Hm, that doesn't look "difficult". Does get_identity() work as expected?

(18 Dec '20, 08:39) Volker Barth

yes that works

(18 Dec '20, 09:12) Martin

The new_identity value is not optional as currently implemented. The default should likely be 1 and not NULL as currently defined.

To workaround, please supply all parameters or include new_identity as in the following example:

call sa_reset_identity('tablename', new_identity=1 );
permanent link

answered 18 Dec '20, 09:51

Chris%20Keating's gravatar image

Chris Keating
accept rate: 32%

I tried to add a comment in DCX but the login failed (before I was asked fro credentials). Is that a pitfall of the new SAP Universal ID process?

Website returns: "SAML response has errors. Please check the logs". Guess I don't have permissions to do that :)

(21 Dec '20, 06:37) Volker Barth

I have made a fix for this issue which will be available in 17.0 Build 6254 or newer. The fix will change the default to 0 making the next identity value 1. Further, only non-negative non-NULL values will be permitted.

(05 Jan '21, 14:59) Chris Keating
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 18 Dec '20, 04:49

question was seen: 943 times

last updated: 05 Jan '21, 14:59