Skip to Content
1
Sep 22, 2020 at 03:26 PM

HANA Database Explorer: import catalog objects in HDI container

670 Views Last edit Sep 22, 2020 at 03:28 PM 2 rev

Hi,

I'm trying to import catalog objects (exported from a different container) in an HDI container on SAP HANA Cloud via the Database Explorer but I always get the following error:

An error occurred while performing a catalog import
(dberror) [651]: cannot use duplicate object name: object XXXX already exists

And when I check the Replace existing objects option, I get the following error:

An error occurred while performing a catalog import
(dberror) [258]: insufficient privilege: Detailed info for this error can be found with guid '00C706790CD6624E8143F016A83916B3'

Apparently my user doesn't have the required DROP privilege so I tried to grant it but this also gives me an error:

set schema "MY_SCHEMA#DI";
create local temporary column table "#PRIVILEGES" like "_SYS_DI"."TT_SCHEMA_PRIVILEGES"; 
insert into "#PRIVILEGES" ("PRIVILEGE_NAME", "PRINCIPAL_SCHEMA_NAME", "PRINCIPAL_NAME") values ('DROP', '', 'MY_ADMIN_USER');
call "MY_SCHEMA#DI"."GRANT_CONTAINER_SCHEMA_PRIVILEGES"("#PRIVILEGES", "_SYS_DI"."T_NO_PARAMETERS", ?, ?, ?);
drop table "#PRIVILEGES";
"DROP": cannot grant privilege; accepted values are "CREATE ANY", "CREATE TEMPORARY TABLE", "EXECUTE", "SELECT", "SELECT METADATA", "INSERT", "UPDATE", "DELETE", "DEBUG", "DEBUG MODIFY", "UNMASKED", "SQLSCRIPT LOGGING", "TRIGGER", "INDEX", and "REFERENCES"

The documentation says that the user must have the INSERT/UPDATE, DROP, or CREATE object privileges for the destination catalog objects and must have the IMPORT system privilege but it doesn't say how to do it so it's not really helpful.

Cheers,

Pierre