I try to alter DB structure via DBMS_METADATA package, but get an error.
This is function inside a package I use:
FUNCTION putxml(
alterxml IN CLOB,
sub_res OUT NOCOPY sys.ku$_SubmitResults
)
RETURN BOOLEAN
IS
ret_val BOOLEAN := true;
openw_handle NUMBER;
transform_handle NUMBER;
BEGIN
openw_handle := DBMS_METADATA.openw ('TABLE');
transform_handle := DBMS_METADATA.add_transform (openw_handle, 'ALTERXML');
dbms_output.put_line(alterxml);
ret_val := DBMS_METADATA.put(openw_handle, alterxml, 0, sub_res);
DBMS_METADATA.close (openw_handle);
return ret_val;
END;
This is an XML:
<ALTER_XML xmlns="http://xmlns.oracle.com/ku" version="1.0">
<OBJECT_TYPE>TABLE</OBJECT_TYPE>
<OBJECT1>
<SCHEMA>GLOBALREF</SCHEMA>
<NAME>EDO_DOC_OUT</NAME>
</OBJECT1>
<OBJECT2>
<SCHEMA>GLOBALREF</SCHEMA>
<NAME>EDO_DOC_OUT</NAME>
</OBJECT2>
<ALTER_LIST>
<ALTER_LIST_ITEM>
<PARSE_LIST>
<PARSE_LIST_ITEM>
<ITEM>NAME</ITEM>
<VALUE>AUTHOR</VALUE>
</PARSE_LIST_ITEM>
<PARSE_LIST_ITEM>
<ITEM>CLAUSE_TYPE</ITEM>
<VALUE>ADD_COLUMN</VALUE>
</PARSE_LIST_ITEM>
</PARSE_LIST>
<SQL_LIST>
<SQL_LIST_ITEM>
<TEXT>ALTER TABLE "GLOBALREF"."EDO_DOC_OUT" ADD ("AUTHOR" VARCHAR2(50))</TEXT>
</SQL_LIST_ITEM>
</SQL_LIST>
</ALTER_LIST_ITEM>
</ALTER_LIST>
</ALTER_XML>
This is version info:
BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Release 12.1.0.1.0 - 64bit Production 0
PL/SQL Release 12.1.0.1.0 - Production 0
CORE 12.1.0.1.0 Production 0
TNS for 64-bit Windows: Version 12.1.0.1.0 - Production 0
NLSRTL Version 12.1.0.1.0 - Production 0
This is an error:
ORA-31607: function PUT (CLOB) is inconsistent with transform.
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_METADATA", line 5189
ORA-06512: at "SYS.DBMS_METADATA", line 5315
ORA-06512: at "SYS.DBMS_METADATA", line 10870
ORA-06512: at "ADMIN.PKG_SYNC", line 90
ORA-06512: at "ADMIN.PKG_SYNC", line 143
ORA-06512: at "ADMIN.PKG_SYNC", line 184
ORA-06512: at line 7
31607. 00000 - "function %s is inconsistent with transform."
*Cause: Either (1) FETCH_XML was called when the "DDL" transform
was specified, or (2) FETCH_DDL was called when the
"DDL" transform was omitted.
*Action: Correct the program.
I tried both with DBMS_METADATA.add_transform (openw_handle, 'ALTERXML') and without...
CREATE OR REPLACE PROCEDURE Insert_Job AS
v_job_id VARCHAR2(10) := 'HR_Assistant';
v_job_title VARCHAR2(35) := 'HRessourcesAssistant';
v_Min_Salary NUMBER(22):= 400;
v_max_salary NUMBER (22):= 5000;
BEGIN
INSERT INTO OEHR_JOBS (JOB_ID, JOB_TITLE,MIN_SALARY,MAX_SALARY)
VALUES (v_job_id, v_job_title, v_Min_Salary, v_max_salary);
dbms_output.put_line('Insertion OK');
End;
Write a PL/SQL procedure with no parameters Insert_Job that inserts a new record in the table JOBS: - Job Id: Assistant - Job title: HRessources Assistant - Min Salary: 400 - Max Salary: 5000 The procedure should print a message to the user to inform him about the insertion status (success/ Error). Call the procedure and take a screenshot of the output in both cases.
This is what I try and it doesn't work any help please? It created the procedure but no data into the table, an also when I call it it shows me an error. I'm usnig APEX ORACLE HERE IS THE ERROR MESSAGE BELOW
ORA-06550: line 2, column 1:
PLS-00905: object WKSP_ELIASHOME.INSERT_JOB is invalid
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_200200", line 626
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1658
ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_200200", line 612
ORA-06512: at "APEX_200200.WWV_FLOW_DYNAMIC_EXEC", line 1749
When I read your error message: numeric or value error: character string buffer too small
This mean your length is too small.
In your code:
v_job_id VARCHAR2(10) := 'HR_Assistant';
It was because length 'HR_Assistant' is longer then 10
Try to change lenght v_job_id into:
v_job_id VARCHAR2(12) := 'HR_Assistant';
Or you can remove some character, into:
v_job_id VARCHAR2(10) := 'Assistant';
Or, maybe you must check first length from column JOB_ID in table OEHR_JOBS
Sorry if my english bad and I don't really familiar with PLSQL.
While attempting to manually execute the command below with user APPS (owner of WF_BPEL_QTAB queue) the error informed is occurring.
We did all the necessary research and the queue has no indexes (as some solutions suggest).
Command:
declare
l_purge_options dbms_aqadm.aq$_purge_options_t;
begin
l_purge_options.Block := False;
DBMS_AQADM.PURGE_QUEUE_TABLE(queue_table => 'APPS.WF_BPEL_QTAB'
,purge_condition => 'ENQ_TIME < trunc(sysdate) - 3
,purge_options => l_purge_options);
end;
Error:
ORA-00604: error occurred at recursive SQL level 1
ORA-01001: invalid cursor
ORA-06512: at "SYS.DBMS_AQ_INV", line 208
ORA-00918: column ambiguously defined
ORA-06512: at "SYS.DBMS_AQADM", line 1668
ORA-06512: at line 5
When using criteria from the queue table, you need to use the alias 'qtview'. Hence
declare
l_purge_options dbms_aqadm.aq$_purge_options_t;
begin
l_purge_options.Block := False;
DBMS_AQADM.PURGE_QUEUE_TABLE(queue_table => 'APPS.WF_BPEL_QTAB'
,purge_condition => 'qtview.ENQ_TIME < trunc(sysdate) - 3
,purge_options => l_purge_options);
end;
Recently installed Oracle 12cR2 on my Windows 10 laptop. I'm trying to open the sample ORCLPDB for use and get the error shown in the SQL*Plus screenshot. In my research, looks like others have encountered this issue but there hasn't been any conclusive solution. I've tried researching through videos, Oracle documentation and forums with no luck.
Here are the steps that I've taken.
Here are my tnsnames entries:
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb)
)
)
Here are my Listener file entries:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\OracleHomeUser1\product\12.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\OracleHomeUser1\product\12.2.0\dbhome_1\bin\oraclr12.dll")
)
(SID_DESC =
(SID_NAME = ORCLPDB)
(ORACLE_HOME = D:\app\OracleHomeUser1\product\12.2.0\dbhome_1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
Note The Oracle 12R2 is installed on Windows 10 Home edition version 1903. OS build is 18362.418.
Please help as I've been struggling for couple of weeks! Many thanks for your help!! :)
Here's the content of the alert_orcl file for the past 2 days:
rs in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_8292.trc:
2019-11-10T17:48:30.952951-05:00
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_347"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T17:58:28.042968-05:00
Resize operation completed for file# 3, old size 655360K, new size 665600K
2019-11-10T17:58:30.685688-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_4476.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_349"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T18:00:00.562652-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_13736.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-10T18:08:33.989588-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_19036.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_351"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T18:18:31.552426-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_18668.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_353"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T18:28:33.035473-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_11084.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_355"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T18:30:00.624114-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_5216.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-10T18:38:34.705198-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_12012.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_357"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T18:48:35.891078-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_2552.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_359"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T21:51:18.519574-05:00
Warning: VKTM detected a forward time drift.
Time drifts can result in unexpected behavior such as time-outs.
Please see the VKTM trace file for more details:
D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_vktm_10132.trc
2019-11-10T21:51:24.604745-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_16664.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-10T21:51:37.564979-05:00
Thread 1 cannot allocate new log, sequence 12
Private strand flush not complete
Current log# 2 seq# 11 mem# 0: D:\APP\ORACLEHOMEUSER1\ORADATA\ORCL\REDO02.LOG
2019-11-10T21:51:37.647758-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j001_16608.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_361"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T21:51:40.643657-05:00
Thread 1 advanced to log sequence 12 (LGWR switch)
Current log# 3 seq# 12 mem# 0: D:\APP\ORACLEHOMEUSER1\ORADATA\ORCL\REDO03.LOG
2019-11-10T22:00:00.764705-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_19288.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-10T22:01:24.387425-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_12440.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_363"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T23:24:02.204591-05:00
Warning: VKTM detected a forward time drift.
Please see the VKTM trace file for more details:
D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_vktm_10132.trc
2019-11-10T23:24:03.743617-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j001_19172.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-10T23:24:07.893235-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_14616.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_365"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T23:30:00.352162-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_15996.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-10T23:34:07.321600-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_17628.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_367"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T23:44:05.942664-05:00
Resize operation completed for file# 3, old size 665600K, new size 675840K
2019-11-10T23:44:07.250777-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_18984.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_369"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-10T23:54:08.116856-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_17168.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_371"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-11T00:00:00.491208-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_13364.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-11T00:04:08.269812-05:00
TABLE SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY: ADDED INTERVAL PARTITION SYS_P457 (43779) VALUES LESS THAN (TO_DATE(' 2019-11-12 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
TABLE SYS.WRI$_OPTSTAT_HISTGRM_HISTORY: ADDED INTERVAL PARTITION SYS_P460 (43779) VALUES LESS THAN (TO_DATE(' 2019-11-12 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
2019-11-11T00:04:10.242413-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_12576.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_373"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-11T00:14:11.060275-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_17152.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_375"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-11T00:24:11.498403-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_7156.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_377"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-11T00:25:10.116868-05:00
TABLE SYS.WRP$_REPORTS_TIME_BANDS: ADDED INTERVAL PARTITION SYS_P461 (3601) VALUES LESS THAN (TO_DATE(' 2019-11-11 01:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
2019-11-11T00:30:00.608764-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_10260.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-11T00:34:13.016562-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_11772.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_379"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 47207
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 882
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 20059
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 22201
ORA-06512: at "SYS.DBMS_STATS", line 47197
2019-11-11T11:13:12.219241-05:00
Warning: VKTM detected a forward time drift.
Please see the VKTM trace file for more details:
D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_vktm_10132.trc
2019-11-11T11:13:12.937564-05:00
Closing scheduler window
Closing Resource Manager plan via scheduler window
Clearing Resource Manager CDB plan via parameter
2019-11-11T11:13:16.063522-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j002_8140.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
2019-11-11T11:13:59.803724-05:00
TABLE SYS.WRP$_REPORTS: ADDED INTERVAL PARTITION SYS_P462 (3602) VALUES LESS THAN (TO_DATE(' 2019-11-12 01:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
TABLE SYS.WRP$_REPORTS_DETAILS: ADDED INTERVAL PARTITION SYS_P463 (3602) VALUES LESS THAN (TO_DATE(' 2019-11-12 01:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
2019-11-11T11:30:00.266486-05:00
Errors in file D:\APP\ORACLEHOMEUSER1\diag\rdbms\orcl\orcl\trace\orcl_j000_15252.trc:
ORA-12012: error on auto execute of job "APEX_050000"."ORACLE_APEX_WS_NOTIFICATIONS"
ORA-04063: package body "APEX_050000.WWV_FLOW_WORKSHEET" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APEX_050000.WWV_FLOW_WORKSHEET"
ORA-06512: at "APEX_050000.WWV_FLOW_WORKSHEET_API", line 4898
The Oracle 12R2 is installed on Windows 10 Home edition
Uh oh. The Installation Guide says Oracle database server is only certified for Pro, Enterprise and Education editions. At the least there's a lot less information available about troubleshooting installations on Home edition.
Does that mean I need to upgrade to Windows Pro or Education
Oracle database is an enterprise grade product and probably depends upon OS capabilities beyond those of Home edition. But I can't guarantee upgrading your OS will solve this problem. I use a Mac :)
So, what to do? Docker is a platform for deploying containers, which are cut-down virtual machines. Docker allows us to run say Oracle 12c EE on Linux without having to have a dual-boot PC. That's how I run an Oracle database on my Mac. But Docker's not that straightforward on Win10 Home either.
Therefore I think your quickest route to success would be to install Oracle VirtualBox. Make sure you also install the Extensions pack. Then you can download and run a vbox image. Oracle hosts a large number of them on this page: choose the one most fitted to what you want to learn. This was the approach I used the last time I need to run an Oracle database on Windows.
I connected to 'user1' and executed following, utplsql is installed in 'utp'. I installed utplsql framework from http://utplsql.sourceforge.net/.
BEGIN
utp.utAssert.eq('test',1,1);
END;
/
Error Output
ORA-02291: integrity constraint (UTP.UTR_ERROR_OUTCOME_FK) violated - parent key not found
ORA-06512: at "UTP.UTRERROR", line 149
ORA-06512: at "UTP.UTRERROR", line 324
ORA-06512: at "UTP.UTROUTCOME", line 146
ORA-01400: cannot insert NULL into ("UTP"."UTR_OUTCOME"."RUN_ID")
ORA-06512: at "UTP.UTRESULT2", line 72
ORA-06512: at "UTP.UTASSERT2", line 137
ORA-06512: at "UTP.UTASSERT2", line 541
ORA-06512: at "UTP.UTASSERT", line 118
ORA-06512: at line 2
But the
Instead of running utAssert.eq directly, you put it inside a test package, then run that with either utPLSQL.test or utPLSQL.run. (I recommend working through the Getting Started section of the utPLSQL documentation).
Define the test package
CREATE OR REPLACE PACKAGE ut_simple IS
PROCEDURE ut_setup;
PROCEDURE ut_teardown;
PROCEDURE ut_simple_test;
END;
CREATE OR REPLACE PACKAGE BODY ut_simple IS
PROCEDURE ut_setup IS
BEGIN
NULL;
END;
PROCEDURE ut_teardown IS
BEGIN
NULL;
END;
PROCEDURE ut_simple_test IS
BEGIN
utp.utAssert.eq('test',1,1);
END;
END;
Run the test
exec utp.utplsql.run ('ut_simple');