Our application has its data structured across two schemas, let's call them Main and Archive. This is needed as some tables from the Main schema are archived into corresponding tables in the Archive schema.
The Main schema updates are run using a Liquibase servlet which is run by the Main user when the application first starts.
At the moment all archive updates are run as a separate DBA task. This is a bit inconvenient as we must engage a DBA for simple things like creating a new table in the archive schema and granting the right permissions to the Main user which is the absolute owner of all application data.
We are considering making Main user able to create/alter objects in the archive schema and embed this in our Liquibase scripts.
The Main user has been granted an APP_ADMIN_ROLE that make it entitled to CREATE, ALTER, COMMENT ON etc ANY TABLE so it is able to create and drop tables in the Archive schema.
However, we hit the problem that despite tha fact the Main user can create an Archive table it is not able to grant CRUD operations on that table to itself.
Is there any way to achieve this.
GRANT DBA TO MAIN
is not an option.
Thanks in advance