错误信息

在安装18c时,手动创建数据库后,没有在PDB中执行相关的脚本(数据字典)。

SQL> conn test10/test@pdbcndba
ERROR:
ORA-00942: table or view does not exist


Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
ERROR:
ORA-06553: PLS-213: package STANDARD not accessible


Error accessing package DBMS_APPLICATION_INFO
Connected.

SQL> show user
USER is "TEST10"

可以看到用户虽然连上了,但是一些数据字典是无法使用的。

SQL> desc dba_data_files
ERROR:
ORA-04043: object dba_data_files does not exist

解决方法-重建一下数据字典

执行以下脚本–SYS用户

SQL> @?/rdbms/admin/catalog.sql    --数据库字典,动态视图创建等
SQL> @?/rdbms/admin/catproc.sql --PL/SQL存过过程相关代码
SQL> @?/rdbms/admin/utlrp.sql --编译

—使用SYSTEM用户执行以下脚本

SQL> @?/sqlplus/admin/pupbld.sql   #SQL*Plus相关

第二个脚本时间有点长。都执行完了就OK了。