重庆思庄Oracle、Redhat认证学习论坛

标题: oracle 12c r1手工建库的一个坑:oRA-12801,ORA-00942 [打印本页]

作者: 郑全    时间: 2020-3-30 11:30
标题: oracle 12c r1手工建库的一个坑:oRA-12801,ORA-00942
本帖最后由 郑全 于 2020-3-30 11:46 编辑

在12.1.0.1上使用手工建库,发现一个奇怪的问题,就是通过以下步骤建立的库,然后查询部分数据字典,会报错:oRA-12801: error signaled in parallel query server P002, instance
<instance name>
ORA-00942: table or view does not exist




步骤:
1.建立参数文件:
   vim /home/oracle/initcdb1.ora


   db_name=cdb1
   db_create_file_dest=/u01/app/ora/oradata/
   enable_pluggable_database=true


2.启动数据库到nomount
  sql>startup pfile='/home/oracle/initcdb1.ora' nomount;


3.创建数据库
  sql>create database cdb1 enable pluggable database;


4.执行创建后的脚本
  sql>altersession set "_oracle_script"=true;

[size=90%]sql>alter pluggable database pdb$seed close;

[size=90%]  sql>alter pluggable database pdb$seed open;

[size=90%]  
sql>@?/rdbms/admin/catalog.sql
sql>@?/rdbms/admin/catblock.sql
sql>@?/rdbms/admin/catproc.sql
sql>@?/rdbms/admin/catoctk.sql
sql>@?/rdbms/admin/owminst.plb
sql>conn system/manager;
sql>@?/sqlplus/admin/pupbld.sql
sql>conn / as sysdba
sql>@?/rdbms/admin/utlrp.sql

5.查询
SQL>SELECT * from cdb_pdbs;
*
o
RA-12801: error signaled in parallel query server P002, instance
cdb1

ORA-00942: table or view does not exist






  
  



作者: 郑全    时间: 2020-3-30 11:49
解决办法:
    使用 catcon.pl 去解决
   
$ PERL5LIB=$ORACLE_HOME/rdbms/admin:$PERL5LIB; export PERL5LIB
$ perl /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catcon.pl -n 1 -l /u01/app/ora/admin/cdb6/scripts -b catalog /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catalog.sql;
$ perl /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catcon.pl -n 1 -l /u01/app/ora/admin/cdb6/scripts -b catblock /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catblock.sql;
$ perl /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catcon.pl -n 1 -l /u01/app/ora/admin/cdb6/scripts -b catproc /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catproc.sql;
$ perl /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catcon.pl -n 1 -l /u01/app/ora/admin/cdb6/scripts -b catoctk /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catoctk.sql;
$ perl /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catcon.pl -n 1 -l /u01/app/ora/admin/cdb6/scripts -b owminst /u01/app/ora/product/12.1.1/db_1/rdbms/admin/owminst.plb;
$ perl /u01/app/ora/product/12.1.1/db_1/rdbms/admin/catcon.pl -n 1 -l /u01/app/ora/admin/cdb6/scripts -b pupbld -u SYSTEM/&&systemPassword /u01/app/ora/product/12.1.1/db_1/sqlplus/admin/pupbld.sql;




欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2