Changing Ownership of schema in SAP HANA Database


I don’t think you can change ownership of schema in database. Easiest way to change ownership of schema is by exporting a schema, drop it from the database and then recreate the schema owned by the target user and import the objects back into the database.

In recent version, you can create schema and set other users as an owner of the schema however you can’t change it later −

Create SCHEMA TEST123 owned by Demo;

In same way, you can collect the script for "Create procedure" from database and drop the procedures in the earlier user schema and then these can be recreated in new user schema. You can do in the script with the dynamic SQL which would create the object into the target schema and drop the object in source schema.

Updated on 13-Mar-2020 07:56:00