Object Body invalid - oracle

I have following error please help me out to solve this
SQL> alter package AML.DBMS_OBFUSCATION_TOOLKIT compile body;
Warning: Package Body altered with compilation errors.
SQL> show errors
Errors for PACKAGE BODY AMLOCK_ALAMTHAL.DBMS_OBFUSCATION_TOOLKIT:
LINE/COL ERROR
-------- -----------------------------------------------------------------
13/9 PL/SQL: Statement ignored
13/16 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
be declared
19/9 PL/SQL: Statement ignored
19/16 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
be declared
25/9 PL/SQL: Statement ignored
27/17 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
be declared
LINE/COL ERROR
-------- -----------------------------------------------------------------
36/9 PL/SQL: Statement ignored
38/17 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
be declared
60/9 PL/SQL: Statement ignored
60/16 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
be declared
68/9 PL/SQL: Statement ignored
68/16 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
LINE/COL ERROR
-------- -----------------------------------------------------------------
be declared
76/9 PL/SQL: Statement ignored
78/15 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
be declared
87/9 PL/SQL: Statement ignored
89/17 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.GETKEY' must
be declared
99/9 PL/SQL: Statement ignored
LINE/COL ERROR
-------- -----------------------------------------------------------------
99/27 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.DESENCRYPT'
must be declared
106/9 PL/SQL: Statement ignored
106/16 PLS-00201: identifier 'DBMS_OBFUSCATION_TOOLKIT_FFI.DESENCRYPT'
must be declared

The package body won't compile because you don't have the correct dependencies in place. In this case DBMS_OBFUSCATION_TOOLKIT_FFI. Now you could try to put that in place as well, but let's ask the big question:
DBMS_OBFUSCATION_TOOLKIT is an Oracle supplied library and belongs to SYS user. Why are you trying to install it in your own schema?
You have tagged your question [oracle12c] and I guess that's why. This package is no longer available in 12c. DBMS_OBFUSCATION_TOOLKIT has been deprecated for a long time (for security reasons). You should be using DBMS_CRYPTO instead.
This may mean you need to re-write your code to use the new package, but trying to retrofit a de-supported package is a big mistake.

Related

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";

issue on creating package

Warning: Package Body created with compilation errors. BEGIN
ERROR at line 1: ORA-04063: package body "P13279.EMP_DESIGNATION" has errors ORA-06508: PL/SQL: could not find program unit being
called: "P13279.EMP_DESIGNATION" ORA-06512: at line 2
You're referencing a program unit (procedure, function, package) which either doesn't exist, or - if it exists but is owned by someone else - you don't have privileges to access it.

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

Oracle 11g error when starting trace for other session

In Oracle 11g, I tried to trace a session, but failed. The tool is SQL Developer. I don't have permissions ? but I can query v$session.
Thanks
BEGIN
DBMS_MONITOR.SESSION_TRACE_ENABLE(session_id=>72,
serial_num=>36449,
waits=>TRUE,
binds=>TRUE);
END;
Error report:
ORA-06550: line 2, column 3:
PLS-00201: identifier 'DBMS_MONITOR' must be declared
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
You don't have the execute privilege for the dbms_monitor package.
Ask your DBA to run
GRANT execute ON dbms_monitor TO your_username;

Resources