issue on creating package - oracle

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.

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.

datapatch fails with ISNONORACLECLOUD must be declared

When trying to apply datapatch 31312468 to oracle 12.2.0.1 get the following:
Error at line 8833: 4675/23 PLS-00302: component 'ISNONORACLECLOUD' must be declared
Any ideas?
upd:
Datapatch Build label: RDBMS_12.2.0.1.0DBAPR2019RU_LINUX.X64_190227
Datapatch output: (for different patch, but it is exactly the same)
./datapatch -verbose
SQL Patching tool version 12.2.0.1.0 Production on Thu Jul 23 11:27:05 2020
Copyright (c) 2012, 2019, Oracle. All rights reserved.
Log file for this invocation: /local/oracle/cfgtoollogs/sqlpatch/sqlpatch_541_2020_07_23_11_27_05/sqlpatch_invocation.log
Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of SQL patches:
Patch 26635944 ():
Not installed in the binary or the SQL registry
Patch 29249637 (OJVM RELEASE UPDATE: 12.2.0.1.190416 (29249637)):
Installed in the binary registry only
Bundle series DBRU:
ID 190416 in the binary registry and not installed in the SQL registry
Adding patches to installation queue and performing prereq checks...
Installation queue:
Nothing to roll back
The following patches will be applied:
29249637 (OJVM RELEASE UPDATE: 12.2.0.1.190416 (29249637))
29314339 (DATABASE APR 2019 RELEASE UPDATE 12.2.0.1.190416)
Installing patches...
Patch installation complete. Total patches installed: 2
Validating logfiles...
Patch 29249637 apply: SUCCESS
logfile: /local/oracle/cfgtoollogs/sqlpatch/29249637/22802302/29249637_apply_ORCL_2020Jul23_11_27_18.log (no errors)
Patch 29314339 apply: WITH ERRORS
logfile: /local/oracle/cfgtoollogs/sqlpatch/29314339/22821655/29314339_apply_ORCL_2020Jul23_11_27_19.log (errors)
Error at line 3715: Warning: Package Body created with compilation errors.
Error at line 32330: Warning: Package Body created with compilation errors.
Error at line 32337: 4675/4 PL/SQL: Statement ignored
Error at line 32338: 4675/23 PLS-00302: component 'ISNONORACLECLOUD' must be declared
Error at line 32360: 4675/4 PL/SQL: Statement ignored
Error at line 32361: 4675/23 PLS-00302: component 'ISNONORACLECLOUD' must be declared
Error at line 33014: Warning: Trigger created with compilation errors.
Error at line 33021: 0/0 PLS-00905: object GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN is invalid
Error at line 33038: Warning: Trigger created with compilation errors.
Error at line 33045: 0/0 PLS-00905: object GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN is invalid
Error at line 33052: Warning: Trigger created with compilation errors.
Error at line 33059: 0/0 PLS-00905: object GSMADMIN_INTERNAL.DBMS_GSM_POOLADMIN is invalid
Please refer to MOS Note 1609718.1 and/or the invocation log
/local/oracle/cfgtoollogs/sqlpatch/sqlpatch_541_2020_07_23_11_27_05/sqlpatch_invocation.log
for information on how to resolve the above errors.
SQL Patching tool complete on Thu Jul 23 11:27:47 2020
Worked around loading the following objects prior to running datapatch:
$ORACLE_HOME/rdbms/admin/dbmsgwmco.sql
$ORACLE_HOME/rdbms/admin/dbmsgwmut.sql
$ORACLE_HOME/rdbms/admin/dbmspool.sql

ORA-06550: line 0, column 0: PLS-00907: cannot load library unit `COLUMN_NAME` (referenced by)

So, I got this error message
Started: 9:00:01 AM Error: 2018-01-26 09:33:53.01 Code: 0xC002F210 Source: Run proc SP_MISSING_FILE_CASE_CLOSURE Execute SQL Task Description: Executing the query "begin SP_MISSING_FILE_CASE_CLOSURE; end;" failed with the following error: "ORA-06550: line 0, column 0: PLS-00907: cannot load library unit USAGE.SP_MISSING_FILE_CASE_CLOSURE (referenced by )". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 9:00:01 AM Finished: 9:33:53 AM Elapsed: 2031.88 seconds. Process Exit Code 1. The step failed.
sometimes, but sometimes my SSIS job runs normally. Can someone provide me with some kind of solution? I cannot see any pattern in it's failure except PROCEDURE which is always the same.
Any help is greatly appreciated.
You should try this syntax (add schema)
begin
execute <schema>.SP_MISSING_FILE_CASE_CLOSURE;
end;

ORA-39125 during schema export

Today, I was trying to do export with expdp on Linux 64, Oracle10g:
$ expdp system/manager parfile='datapump/dumps/exp_schema.par'
where exp_schema is:
directory=DPDUMP
dumpfile=prod_exp_APPROOT.dmp
schemas=APPROOT
content=ALL
and getting an error:
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA while calling DBMS_METADATA.FETCH_XML_CLOB [TABLE_DATA:"APPROOT"."SED_OUTDOC"]
ORA-31642: the following SQL statement fails:
BEGIN "SYS"."DBMS_SCHED_EXPORT_CALLOUTS".SCHEMA_CALLOUT(:1,1,1,'10.02.00.01.00'); END;
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_METADATA", line 907
ORA-31603: object "SCHEDULER$_PROGRAM_ARG" of type TABLE not found in schema "APPROOT"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.KUPW$WORKER", line 6241
----- PL/SQL Call Stack -----
object line object
handle number name
0x368fb4540 14916 package body SYS.KUPW$WORKER
0x368fb4540 6300 package body SYS.KUPW$WORKER
0x368fb4540 2340 package body SYS.KUPW$WORKER
0x368fb4540 6861 package body SYS.KUPW$WORKER
0x368fb4540 1262 package body SYS.KUPW$WORKER
0x3704b4270 2 anonymous block
Job "SYSTEM"."SYS_EXPORT_SCHEMA_04" stopped due to fatal error at 16:57:57
I don't understand what's wrong..
This looks like the behaviour referred to in Oracle Support note 1109045.1, and suggests a DDL trigger that is, perhaps, preventing objects owned by APPROOT from being dropped. Something simple like this would cause the error you're seeing, I believe, though I don't have a DB at the right patch level to test it:
create or replace trigger block_drop
before drop on schema
begin
raise_application_error(-20001, 'Nope');
end;
/
The support note suggests it affects 10.2.0.1 to 11.2.0.1, so presumbaly the behaviour has changed in later patchsets.

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