on 2020 Sep 22 4:26 PM
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
Request clarification before answering.
Are you doing the import catalog object or import HDI container. There is a separate import option for HDI that will restore the entire state of the container. You should never do just a SQL object import into a container as that will disrupt the managed metadata of the container.
That said to use the import HDI container you should use an HDI Admin user or HDI Group Admin users as described in the online help:
There is also a video on the setup and usage of the HDI Admin user: https://youtu.be/zyHhxZWW40M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thomas.jung. Thanks for the link to the video, this was really helpful to understand the concepts and pick the right APIs to create the different HDI admin users.
I can now export HDI containers with an HDI admin group user. Is this the recommended way to backup HDI containers before deploying a new release in production (export then import if something goes wrong)? I recently deleted some data in a productive application because I didn't know about the undeploy.json concept and I'd like to better understand how to prevent such issues in the future.
Note: I just discovered your new series on hana-opensap-cloud-2020, great stuff!
I don't think that backup and recovery was the original design intention of this feature. From reading the documentation, I think you get the sense that it was built more for copy operations (like copying back to QA from Production). But I don't see why it couldn't be used as a kind of backup and recovery. That said I don't personally have experience using it as a back up and recovery mechanism within the same instance (overwriting a new state of an HDI container). I'd defintely recommend testing that in a Dev/Sandbox environment with a throwaway container before relying upon it on a real situation.
Hi Thomas,
I would like to see that video about usage of HDI Admin user, but it doesn't work for me.
"Video not available
This video is private"
Is that yours? Can you do anything?
Thanks for your help!
That video was moved to the SAP Developers YouTube channel. The new URL is: SAP HANA Deployment Infrastructure (HDI) Administration - YouTube
User | Count |
---|---|
84 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.