Мне нужно создать резервные копии таблиц SAP HANA программным способом с помощью .NET Core. Я использую
Код: Выделить всё
Sap.Data.Hana
Код: Выделить всё
HanaBulkCopy
I programmatically create the target table with generated identity column, as I cannot alter it later.
For the source tables with generated identity column,
Код: Выделить всё
HanaBulkCopy
When try to run a manual insert query, I got following error:
INSERT, UPDATE and UPSERT are disallowed on the generated field: cannot inser into generated identity column field ID.
I tried to run this query:
Код: Выделить всё
SET IDENTITY_INSERT MYTABLE OFF;
SQL syntax error: incorrect syntax near "IDENTITY_INSERT": line 1...
Please note that I have constraints so I need to insert the IDs of the source to target as it is. And I need to have the auto generated identity behavior in the target as well.
Does anyone know how to get around this?
Источник: https://stackoverflow.com/questions/764 ... ity-column