cancel
Showing results for 
Search instead for 
Did you mean: 

Error while import schema in HANA DB

virendra_raval
Explorer
0 Kudos

Hi...

I am trying to perform an export-import of a HANA DB user instance at schema level including all objects (in my case tables and synonyms) and data.

Export and Import works very well except importing a schema which contains a synonym referred to other existing schema .

Here is a test case

- Schema A with a Table and Schema B to contain a synonym for schema A's table.

- Exported both schemas to CSV which is done successfully and everything looked ok in export location.

- Imported Schema A and then Schema B with the following command.

Command:

IMPORT "<bkup_schema>"."*" FROM '<bkp_location>' WITH RENAME SCHEMA <bkup_schema> TO <brand_new_schema>;

The schema A (with table) imported fine.  Schema B (with synonym) gives the below error :

"SAP DBTech JDBC: [2048]: column store error: table import failed:  [2003] An index already exists with the same name "


When trying to use "REPLACE" clause in the command the error changes as below:

SAP DBTech JDBC: [2048]: column store error: table import failed:  [30117] Binary import failed (cannot execute drop statement)

Has anybody faced this type of error before??

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi, Upgrade to review HANA 74.3 or higher, in this review many errors related to export and import database schemas are resolved. Regards,

0 Kudos

Hi Raval,

Before Importing U have to clear sys_repo system  In content using SQL command

Regards,

V@li

Former Member
0 Kudos

Folks, I am running into the same issue. What I figure out was the following:

1) I turn off the autocommit

2) I run the import for the first time


import "<SCHEMA_NAME>"."*" as binary from '<location>' with replace;

rollback;

3) I get the error as described


SAP DBTech JDBC: [2048]: column store error: table import failed:  [30117] Binary import failed (cannot execute drop statement)

4) I run this import once again and commit and surprisingly the error is gone and the import is successful.


import "<SCHEMA_NAME>"."*" as binary from '<location>' with replace;

commit;

Former Member
0 Kudos

Hello,

i have the same problem:

"SAP DBTech JDBC: [2048]: column store error: table import failed:  [2003] An index already exists with the same name". while restoring schema with rename.

Mr Krishna,

how can i check the case You mentioned?

Regards,

Cezary Mikuć

Mato70
Explorer
0 Kudos

Hi,

I got the same message...

Could you resolve this error?

former_member182302
Active Contributor
0 Kudos

It seems like the when the table is created in schema A. It has already created an index with a name. And when you are trying to import for Schema B it is conflicting with the name of the index defined previously.

Can you check this?

Regards,

Krishna Tangudu

Mato70
Explorer
0 Kudos

I could solve this error by using REPLACE and RENAME option in the import script:

IMPORT SBODEMOUS."*" FROM '/hana/shared/NDB/HDB00/backup/company/SBODEMOUS/' WITH REPLACE RENAME SCHEMA SBODEMOUS TO SBODEMOUS2

Regards,

Tamas