英文:
ORA-01031 :An attempt was made to perform a database operation without the necessary privileges
问题
我尝试创建此触发器,但我权限不足。
英文:
create or replace TRIGGER pdb_startup
AFTER STARTUP ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'alter pluggable database all open';
END;
i try to made this trigger but i have insufficient privileges
答案1
得分: 1
要创建系统触发器,您必须拥有“ADMINISTER DATABASE TRIGGER”特权。
尽管我不使用PDB/CDB安排工作,但您尝试的方式似乎有点奇怪。通常,我们通过数据库外部的脚本来控制数据库状态,而不是通过触发器。您确定这是打开PDB的适当方式吗?我还想知道这是否会在库缓存上造成死锁。无论如何,任何DDL都需要在触发器声明时使用“AUTONOMOUS_TRANSACTION” pragma。
英文:
To create a system trigger you must have the "ADMINISTER DATABASE TRIGGER
" privilege.
While I don't work with PDB/CDB arrangements, what you are trying to do looks a bit strange. Normally we control database status through scripts external to the database, not in triggers. Are you sure this is the appropriate way to open your PDBs? I would also want to know whether this could deadlock on the library cache. At any rate, any DDL would require that a trigger be declared with the AUTONOMOUS_TRANSACTION
pragma.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论