Cant Grant to _SYS_REPO
I have created a schema and tables using the SYSTEM user. Now I try to grant
GRANT SELECT ON SCHEMA FUJBPPOC TO _SYS_REPO WITH GRANT OPTION;
but get an error
Could not execute 'GRANT SELECT ON SCHEMA "FUJBPPOC" TO _SYS_REPO WITH GRANT OPTION' in 2 ms 360 µs .
SAP DBTech JDBC: : insufficient privilege: Not authorized
Can someone guide me on this error?
The reason is very simple. All activated objects are owned by _SYS_REPO. So, in your case, the owner of schema "FUJBPPOC" is _SYS_REPO instead of SYSTEM.
You can find this using SELECT * FROM SCHEMAS WHERE SCHEMA_NAME = "FUJBPPOC". You can find who is the schema owner.