I was doing the deployment of data in one database when I got the following error message:
Command output: dbms_java.grant_permission('TECH_DEP', 'SYS:java.io.FilePermission', '/u01/oracle/techrepo/scripts/*', 'read, write'); * ERROR at line 4: ORA-06550: line 4, column 4: PLS-00201: identifier 'DBMS_JAVA.GRANT_PERMISSION' must be declared ORA-06550: line 4, column 4:
After some researches, I found that the Oracle Database Java Packages component was invalid in the database as below:
SQL> SET PAGES 2000 SQL> SET LINES 2000 SQL> select comp_name, version, status from dba_registry; COMP_NAME VERSION STATUS --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------ --------------------------------- Oracle Database Catalog Views 19.0.0.0.0 VALID Oracle Database Packages and Types 19.0.0.0.0 VALID Oracle Real Application Clusters 19.0.0.0.0 VALID Oracle XDK 19.0.0.0.0 VALID Oracle Database Java Packages INVALID Oracle XML Database 19.0.0.0.0 VALID Oracle Workspace Manager 19.0.0.0.0 VALID 7 rows selected.
And the documentation that helped to find out it was (Doc ID 397770.1) and (Doc ID 2314363.1). This documentation helps you identify invalid components in the registry of your database and recreate this component in case one of them is with the INVALID status. After the procedure of creating any invalid features again, the output is as below:
set pages 2000 set lines 2000 select comp_name, version, status from dba_registry; COMP_NAME VERSION STATUS --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------ --------------------------------- Oracle Database Catalog Views 19.0.0.0.0 VALID Oracle Database Packages and Types 19.0.0.0.0 VALID Oracle Real Application Clusters 19.0.0.0.0 VALID Oracle XDK 19.0.0.0.0 VALID Oracle Database Java Packages 19.0.0.0.0 VALID JServer JAVA Virtual Machine 19.0.0.0.0 VALID Oracle XML Database 19.0.0.0.0 VALID Oracle Workspace Manager 19.0.0.0.0 VALID 8 rows selected. SQL> dbms_java.grant_permission('TECH_DEP', 'SYS:java.io.FilePermission', '/u01/oracle/techrepo/scripts/*', 'read, write'); PL/SQL procedure successfully completed.
Hi! I am Bruno, a Brazilian born and bred, and I am also a naturalized Swedish citizen. I am a former Oracle ACE and, to keep up with academic research, I am a Computer Scientist with an MSc in Data Science and another MSc in Software Engineering. I have over ten years of experience working with companies such as IBM, Epico Tech, and Playtech across three different countries (Brazil, Hungary, and Sweden), and I have joined projects remotely in many others. I am super excited to share my interests in Databases, Cybersecurity, Cloud, Data Science, Data Engineering, Big Data, AI, Programming, Software Engineering, and data in general.
(Continue reading)