正德厚生,臻于至善

pdb及pdb service自动启动

alter session set container=BZUAT;
exec dbms_service.start_service('ebs_BZUAT');

alter session set container=CDB$ROOT;
alter pluggable database all open;
alter pluggable database all save state;

sqlplus / as sysdba
CREATE OR REPLACE TRIGGER open_all_pdbs
   AFTER STARTUP
   ON DATABASE
BEGIN
   EXECUTE IMMEDIATE 'alter pluggable database all open';
END open_all_pdbs;
/

sqlplus / as sysdba
alter session set container=BZUAT;
CREATE OR REPLACE TRIGGER pdb_after_startup_trg
AFTER STARTUP ON PLUGGABLE DATABASE
BEGIN
  dbms_service.start_service('ebs_BZUAT');
  NULL;
END;
/
然后每次重启的时候,可以自动启动service
赞(0) 打赏
未经允许不得转载:徐万新之路 » pdb及pdb service自动启动

评论 抢沙发

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫

微信扫一扫

登录

找回密码

注册