ORA-01031: 尝试执行数据库操作而没有必要的权限。

huangapple go评论52阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月18日 02:45:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/75488212.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定