Oracle dbms_java.runjava raise ORA-00904: "SYS"."DBMS_JAVA_MISC"."RUNJAVA": invalid identifier - oracle

I need to execute a java class outside the db but calling it from a plsql block. As a first attempt I try to do in this way:
select dbms_java.runjava(cmdline => 'java -cp /app/oracle/12.2.0/db:/app/oracle/12.2.0/db/jdbc/lib/* test') from dual
It raises this exception:
ORA-00904: "SYS"."DBMS_JAVA_MISC"."RUNJAVA": invalid identifier
Firstable I need to know if I am doing it right or I missunderstand the path (it works without loadjava?) then I would like to know if there is some privs to grant to my schema in order to use the dbms_java package

Related

How can I run functions of dbms_output as non-admin?

I have XE on my computer, using Oracle Database 18c. Earlier, I was able to execute function dbms_output.put_line(); even I logged in as sysadmin or with default role. Now, I only can run dbms_output.put_line() when I am logged in as sysadmin/sysdba. As a default user, I get the following message:
PLS-00201: identifier ‘DBMS_OUPUT.PUT_LINE’ must be declared
I tried to add privilege to execute dbms_output with command
grant execute on DBMS_OUTPUT to username;, however, I got this message when I execute a command including dbms_output.put_line():
ORA-04067: not executed, package body "PERFSTAT.DBMS_OUTPUT" does not exist
ORA-06508: PL/SQL: could not find program unit being called: "PERFSTAT.DBMS_OUTPUT"
Using sqlplus, I get the following error as default user:
PLS-00201: identifier 'DBMS_OUTPUT.ENABLE' must be declared
How can I solve this problem?
That's probably because you misnamed it:
No : DBMS_OUPUT.PUT_LINE (not "ouput" but "output")
Yes: DBMS_OUTPUT.PUT_LINE
As of the 2nd message; well, this: PERFSTAT.DBMS_OUTPUT doesn't make sense, PERFSTAT doesn't own that package. It is called just as
begin
dbms_output.put_line('Hello');
end;
/
and works for any user, no special grants required.

SQL Error: ORA-00904 "SYS"."DBMS_CRYPTO"."HASH": invalid identifier error while updating a table in Oracle12C

Below is the update statement that i am trying to run
update
IFTEST_DBF
set
M_TEST_SIG=lower(sys.dbms_crypto.hash(utl_raw.cast_to_raw(replace(M_A||M_B||M_C||M_D||M_E||M_F,' ','')),3))
where
M_TYPE='PRIMARY'
and M_NEW='Y'
Below is the error while i am updating a table in oracle12c , The same statement used to run very fine in oracle 11g but after migrating it to 12C , i am facing this issue. Am i missing something .
Error at Command Line : 6 Column : 22
Error report -
SQL Error: ORA-00904: "SYS"."DBMS_CRYPTO"."HASH": invalid identifier 00904. 00000 - "%s: invalid identifier"
*Cause:
The DBMS_CRYPTO is a package, which by default, is owned by SYS schema. So, before to use it, you have to grant the execute privilege to the user/schema you are going to use it, e.g.:
GRANT EXECUTE ON dbms_crypto TO "my_schema";

how to resolve thousand of errors in oracle import using impdp where I don't know the what parameters were used during expdp?

I am trying to import an oracle 11g dump file using impdp utility but while doing so, inter alia, I am facing two major errors:
First, It is showing the following error:
Processing object type DATABASE_EXPORT/TABLESPACE
ORA-39083: Object type TABLESPACE:"HIS_USER" failed to create with error:
ORA-01119: error in creating database file '/oracle/app/oracle/oradata/dwhrajdr1/his_user13.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
so to solve this, I have created the tablesapce with same name but now it is showing that 'HIS_USER' tablespace already exists.
Second, I am getting thousands of errors, where it is showing user or role does not exist:
Failing sql is:
GRANT EXECUTE ANY ASSEMBLY TO "DSS"
ORA-39083: Object type SYSTEM_GRANT failed to create with error:
ORA-01917: user or role 'DSS' does not exist
Please suggest how to solve these errors!
How can I import the dumpfile without making hundreds of users/roles or tablespaces?
you can generate sql statement using impdp the following way.
http://www.dba-oracle.com/t_convert_expdp_dmp_file_sql.htm
then adjust parameter accordingly.
scott

execute dbms_connection_pool.start_pool(); not able to execute

I am not able to execute this command, Even I am in system user. I tried with both that is in command prompt even in Oracle SQL developer tool.
When i am executing the below command in System user
execute dbms_connection_pool.start_pool();
I am getting error as
Error starting at line : 1 in command -
EXECUTE DBMS_CONNECTION_POOL.START_POOL()
Error report -
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_CONNECTION_POOL.START_POOL' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
For your information I am user oracle express 12c
The database resident connection pool (DRCP) reduces the resource requirements of applications that currently don't support connection pooling, either because it is not supported by the application infrastructure, or it has not been implemented. DRCP is only supported for database connections using the OCI driver. The pool is managed using the dbms_connection_pool package. And the operation is started by start_pool procedure.
You can call this procedure in these two ways :
SQL> exec dbms_connection_pool.start_pool( pool_name => 'my_connection_pool');
or
SQL> exec dbms_connection_pool.start_pool;
but not like in the below way :
SQL> exec dbms_connection_pool.start_pool();
I had the same issue
conn / as sysdba
and
exec dbms_connection_pool.start_pool;
worked for me
and
SELECT connection_pool, maxsize
FROM dba_cpool_info;
to get the info about pool

oracle DBMS error: PL/SQL: could not find program unit being called: "USER1.S"

All a sudden i get this error when i try to add a new procedure in my package or rename procedure name. it looks like something is locked not allowing me to add or modify new procedures. could anyone explain what goes wrong here?
ERROR at line 1: ORA-04063: package body "USER1.S" has errors
ORA-06508: PL/SQL: could not find program unit being called: "USER1.S"
ORA-06512: at line 1

Resources