cancel
Showing results for 
Search instead for 
Did you mean: 

Delete schema owned by _SYS_REPO

Former Member
0 Kudos

Hi all,

I have created a schema using .hdbschema in the editor which I now want to remove. As noted in the documentation, deleting the .hdbschema doesn't remove the schema like removing .hdbtable files do, however unfortunately the documentation didn't say what to do in this case. When I try to drop the schema in the Catalog it tells me I don't have sufficient authorizations to do this. Could someone please tell me what the procedure is to remove schemas created this way?

Regards,

Mike

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You need to have drop privilege on the schema as you had select privilege. In order to grant the user, you can call the procedure GRANT_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT as

call "PUBLIC"."GRANT_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT" ('DROP','<SCHEMANAME>','<USERNAME>');

Thank you.

Best Regards,

Anjali.

Former Member
0 Kudos

Hi Anjali,

That is what I was thinking as well and had tried it before, however I keep getting the following error (with my schema and user replaced, of course):


‎9‎:‎28‎:‎24‎ ‎AM (SQL Editor) Could not execute 'call "PUBLIC"."GRANT_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT" ('DROP','<SCHEMA>',<USER>')'
Error: (dberror) 302 - invalid CHAR or VARCHAR value: Invalid parameter value for this procedure

If it helps any, I used the Catalog from the HANA Web Development Workbench to execute this.

Thanks,

Mike

Former Member
0 Kudos

Hi,

You had to remove "<" and ">" from the schema and user input.

Did you also include them for execution?

Thank you.

Best Regards,

Anjali.

Former Member
0 Kudos

call "PUBLIC"."GRANT_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT" ('DROP','SCHEMA_01','USER_00');

after this you can issue drop command or delete it via right mouse click

works fine for me.

BR

Kairat

Former Member
0 Kudos

No, I just put those back in when I replaced the actual schema and user in this post...

Former Member
0 Kudos

Thanks Kairat - that's the same statement Anjali gave me above, except I get the error mentioned above.

Mike

Former Member
0 Kudos

Hi Mike,

Can I request you to execute from SAP HANA Studio and then let me know if the error persists?

Thank you.

Best Regards,

Anjali.

Former Member
0 Kudos

I'll have to install it to do so - I have been using the Web Dev Workbench to date. Will let you know if I have success there...

Mike

Answers (1)

Answers (1)

chandan_praharaj
Contributor
0 Kudos

You cant delete the _SYS_REPO schema, it is system schema. What ever repository object you create, it will by default owned by _SYS_REPO schema.

Kindly Deleting the .hdbschema files from the project folder and activate. will delete the table from the catalogue. Transporting the corresponding delivery unit to the QA will delete objects from there as well.

-Chandan

Former Member
0 Kudos

Hi Chandran,

Thanks for the reply, however as I mentioned in my post I have already tried removing the .hdbschema file. I'm not worried about removing individual tables, I am asking how to remove the schema that was created as it is owned by _SYS_REPO (I'm not trying to delete the _SYS_REPO schema).

Any other ideas?

Mike

chandan_praharaj
Contributor
0 Kudos

Can you try removing  the .hdbrole file for the schema from your role, then only you will not be able to see this. I cant try this in my system as I dont have authorisation to do so, But theoritically I can show you pointer to achieve this.

You can also try going to Catalog in Web IDE and then Right click on schema and delete it. If you have a authorisation you can delete the schema you have created.

you can also check the generic video by Thomas,

https://www.youtube.com/watch?v=8jbuef7I70s