目录
一、手动创建一套oracle 12.1.0.2的pdb库
startup nomount pfile='/home/oracle/1.ora'
create database character set al32utf8 extent management local;
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
alter user system identified by xxx;
conn system/xxx
@?/sqlplus/admin/pupbld.sql
二、开始创建pdb
create pluggable database pdb01 admin user pdbadmin identified by pdbadmin;
error at line 1:
ORA-00604:error occurred at recursive SQL level 1
ORA-01917:user or role 'PDB_DBA' does not exist
三、查询官方文档
APPLIES TO:
-----------
Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
--------
Oracle 12.1.0.2:
Trying to create pluggable database from seed database, but getting the error:
ORA-01917: user or role 'PDB\_DBA' does not exist
Next, tried creating the pluggable database without the ROLES clause for the admin user and it still gives the same error.
The role PDB\_DBA already exists in the container database, <container name>. Still getting the error "ORA-01917: user or role 'PDB\_DBA' does not exist"
on pluggable database creation.
CAUSE
-----
Customer did not have perl binaries in his path when he ran catcdb.sql.
The "ORA-01917: user or role 'PDB\_DBA' does not exist" error from manually creating the container/pluggable databases is related to the catalog script
catcdb.sql. Before running this script, you need to update the path variable with the location of perl binaries:
export PATH=$ORACLE\_HOME/bin:$ORACLE\_HOME/perl/bin/:$PATH
After doing this, customer was able to run catcdb.sql and create the pluggable databases successfully.
SOLUTION
--------
export PATH=$ORACLE\_HOME/bin:$ORACLE\_HOME/perl/bin/:$PATH
四、解决方案
修改.base_profile 文件下的
export PATH=ORACLE_HOME/perl/bin/:$PATH
source .base_profile
然后执行如下脚本
@?/rdbms/admin/catcdb.sql
脚本执行完成后,再创建pluggable database就没问题了
参考文档
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=447067504798304&id=1964089.1&_afrWindowMode=0&_adf.ctrl-state=zcairg9vl_4
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/admin/creating-and-configuring-an-oracle-database.html#GUID-18B03451-5C74-4B53-A892-656C3E8A2556
最后修改时间:2023-09-01 17:09:07
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




