Error ORA-00604/ORA-01422/ORA-06512 on trigger
HelloI have a database of version 10.2.0.3.0 on Enterprise Edition.
I want to prevent a user from use of a scheme. That's why I wrote a trigger, but I met with an other errors:
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-01422: exact fetch returns more than number of lines
ORA-06512: at line 5
Trigger is:
--------------------
SQL > create or replace trigger session_access
2 after logon on database
3. declare
4 v_username varchar2 (30);
VARCHAR2 (30) v_osuser 5.
6 start
7 select username, osuser in v_username, v v_osuser $ session;
8 if v_username = "SUSANJO" v_osuser = 'ORACLE' and then
9 raise_application_error (-20001, 'Restricted access for this USER');
10 end if;
11 end;
12.
Trigger created.
SQL > show errors;
No errors.
SQL > connect susanjo
Enter the password:
ERROR:
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-01422: exact fetch returns more than number of lines
ORA-06512: at line 5
WARNING: You are more connected to ORACLE.
I have run out of ideas of what to do now on the trigger.
Kind regards.
Susan John
"First: have you checked note of Solomon on ' ADMINISTER DATABASE TRIGGER ' privilege?
"Second: OSUsers (Unix-) are likely written in lowercase: So" sys_context ('userenv', 'os_user') = "ORACLE'"should perhaps be"sys_context ('userenv', 'os_user') = 'oracle'". "
Tags: Database
Similar Questions
-
Trigger the error ORA-06512: in SYS. Line SECURE_DML 5
Hi all
I am trying to create a procedure that is called by a trigger like this:
CREATE or REPLACE PROCEDURE SECURE_DML is
BEGIN
If (TO_CHAR(SYSDATE, 'DY') IN ('SAB', 'DOM')) OR (TO_CHAR (SYSDATE, 'HH24')
NOT FROM 08:00 ' 17:00 ') THEN
RAISE_APPLICATION_ERROR (-20500, ' Insercoes funcionarios only no comercial Monday ');
end if;
end;
/
CREATE OR REPLACE TRIGGER secure_dml2
INSERT BEFORE ON SCOTT. EMP2
BEGIN
exec SECURE_DML procedure;
end;
/
ALTER SESSION set nls_date_format = 'HH24 DY';
insert into SCOTT.emp2 (sal, empno, ename, deptno) values (7935, 'SANDRA', 1203, 10);
The error that is:
ORA-06512: In SYS. Line SECURE_DML 5
ORA-06512: In SYS. SECURE_DML2 line 2
What should I do to remove these erros?
Thank youSQL * Plus still displays the full error stack. You raise an error in the stored procedure that is propagated to trigger that is propagated to SQL * more.
SY.
-
Help me solve pls error ORA-06512
I create a full dump of database with the following command:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
expdp %DB_USERNAME%/%DB_PASSWORD%@%TNS_ALIAS% full = Y CONTENT = all THE directory = % ORADMPDIRNAME % % DMP_BKP_FILENAME % logfile LOGFILE = % = dumpfile
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
But when I try to created import dump file, with the command:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Impdp %DB_USERNAME%/%DB_PASSWORD%@%TNS_ALIAS% full = Y CONTENT = all THE TABLE_EXISTS_ACTION = REPLACE directory = % ORADMPDIRNAME % % DMP_BKP_FILENAME % logfile LOGFILE = % = dumpfile
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
I get the following in my console error:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
...
Treatment of type of object DATABASE_EXPORT, SYSTEM_PROCOBJACT, PRE_SYSTEM_ACTIONS, PROCACT_SYSTEM
ORA-39083: Type as procact_system cannot be created with the object error:
ORA-01843: not one month valid
Because sql is:
BEGIN
If (system.wm$ _check_install) then
return;
end if;
start to run immediately ' insert into wmsys.wm$ workspaces_table
values ("LIVE",
'''',
''0'',
'''',
''-1'',
'''',
"' SYS
Treatment of type of object DATABASE_EXPORT, SYSTEM_PROCOBJACT, POST_SYSTEM_ACTIONS, PROCACT_SYSTEM
ORA-39083: Type as procact_system cannot be created with the object error:
ORA-06550: line 2, column 93:
PLS-00302: component 'OPERATOR_NONE' must be declared.
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
Because sql is:
BEGIN
dbms_server_alert.set_threshold (2104, dbms_server_alert.operator_GT, '1200', dbms_server_alert.operator_NONE, ", 1,3, 'ias', dbms_server_alert.object_type_SYSTEM,"); COMMIT; END;
DATABASE_EXPORT/SCHEMA/PROCACT_SCHEMA processing object type
DATABASE_EXPORT/SCHEMA/TABLE/TABLE processing object type
ORA-39126: worker unexpected fatal worker error of $ MAIN. PROCESS_TABLE_EXISTS_ACTION [TABLE: 'IX'.] ["" AQ$ _STREAMS_QUEUE_TABLE_T ']
ORA-24019: QUEUE_TABLE identifier too long, should not exceed 24 characters
ORA-00955: name is already used by an existing object
ORA-06512: at "SYS." DBMS_SYS_ERROR', line 95
ORA-06512: at "SYS." "MAIN$ WORKER", line 6266
-PL/SQL call stack-
the line object
serial number of handle
14916 package body SYS 3069F2A0. MAIN$ WORKER
3069F2A0 6293 SYS package body. MAIN$ WORKER
3069F2A0 11663 SYS package body. MAIN$ WORKER
3069F2A0 SYS 12429 package body. MAIN$ WORKER
3069F2A0 11969 SYS package body. MAIN$ WORKER
3069F2A0 3278 SYS package body. MAIN$ WORKER
3069F2A0 6882 SYS package body. MAIN$ WORKER
3069F2A0 1259 SYS package body. MAIN$ WORKER
2D7B6B4C anonymous block 2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
short failure message:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
...
ORA-31684: SEQUENCE object type: 'GMT_META '. "' MD_ERRORSEQ ' already exists
ORA-39083: Type LIBRARY THAT could not create object error:
ORA-39083: Type as procact_system cannot be created with the object error:
ORA-39083: Type as procact_system cannot be created with the object error:
ORA-39126: worker unexpected fatal worker error of $ MAIN. PROCESS_TABLE_EXISTS_ACTION [TABLE: 'IX'.] ["" AQ$ _STREAMS_QUEUE_TABLE_T ']
ORA-06512: at "SYS." DBMS_SYS_ERROR', line 95
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
in my D:\oracle\product\10.2.0\admin\ias\bdump\alert_ias.log:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
...
WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_T AQ$ does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_T
WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_H AQ$ does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_H
WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_G AQ$ does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_G
WARNING: drop table queue: SYSMAN. Dictionary _MGMT_NOTIFY_QTABLE_I AQ$ does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: SYSMAN. AQ$ _MGMT_NOTIFY_QTABLE_I
WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_T dictionary does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_T
WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_H dictionary does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_H
WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_G dictionary does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_G
WARNING: drop table queue: IX. AQ$ _ORDERS_QUEUETABLE_I dictionary does not exist
WARNING: drop table queue: will try to move the table to the queue and other paintings, IOT, rules, rulesets associated queue table by force
WARNING: drop_queue_table: no evaluation for the queue table: IX. AQ$ _ORDERS_QUEUETABLE_I
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
My settings:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL > select * from v version $;
BANNER
----------------------------------------------------------------
Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - production
PL/SQL version 10.2.0.3.0 - Production
CORE Production 10.2.0.3.0
AMT for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL > show parameter recov.
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string D:\oracle\product\10.2.0\flash_recovery_area
whole large db_recovery_file_dest_size 20G
recovery_parallelism integer 0
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL > archive logs list;
Database log mode Archive Mode
Active AutoArchive
Destination of archive USE_DB_RECOVERY_FILE_DEST
More old sequence of journal online 57
Log sequence archive 59
Current log sequence 59
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
D:\oracle\product\10.2.0\flash_recovery_area\IAS\ARCHIVELOG\2009_05_26 > dir
...
26.05.2009 18:12 < DIR >.
26.05.2009 18:12 < DIR >...
26.05.2009 16:19 2 898 944 O1_MF_1_57_51QV2KC7_. ARC
26.05.2009 17:15 48 465 408 O1_MF_1_58_51QYD4PG_. ARC
26.05.2009 18:12 47 736 O1_MF_1_59_51R1QR5C_ 832. ARC
3 file (s) on 99 101 184 bytes
2 dir 473 158 713 344 bytes free
D:\oracle\product\10.2.0\flash_recovery_area\IAS\ARCHIVELOG\2009_05_26 >
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
How can I solve this problem? Any suggestions would be very apprecialble.
Thanks in advance!Please mark the rewards points for responses that answered your question.
-
Get the error ORA-06512:
Hello
When I was running below error code, please suggest solution.
[code]
create or replace
function get_dept_emps (p_deptno in number) of return is sys_refcursor
v_rc sys_refcursor;
Start
Open v_rc for ' select EMPLOYEE_ID, department_id name, SALARY from employee where department_id =: deptno' using p_deptno;
Return v_rc;
end;
declare
v_ref sys_refcursor;
-type typ is ref cursor;
-typ v_ref;
number of v_eid;
v_fname varchar2 (50);
number of v_sal;
number of v_did;
Start
v_ref: = GET_DEPT_EMPS (100);
-Open v_ref;
extract the v_ref in v_eid, v_fname, v_ref, v_sal;
-dbms_output.put_line (v_eid | v_fname | v_sal | v_did);
close v_ref;
end;
[code]
Thank you
Brij
Hold on... WHAT?
extract the v_ref in v_eid, v_fname,v_ref, v_sal;
How does make any sense?
(I guess that's your mistake)
-
Hello
I have a l_body variable in my pl/sql code with varchar2 (32767).
It displays maximum 44 lines, more than 44 lines he gives buffer size error.
If I use the clob data type then it gives value or digital erro on 44 lines.
code is below
concerning
l_clob CLOB.
l_body varchar2 (32767);
BEGIN
Dbms_lob. CreateTemporary (l_clob,TRUE);
l_body: = null;
l_body: = "< Html >";
l_body: = l_body | "< Body >" ;
-l_body: = l_body | "< do Face ="Verdana, Arial, Helvetica"Color ="#000000"> ';
-l_body: = l_body | "< BR > < BR > < BR > ' | l_str | "< Br >".
l_body: = l_body | "< BR >" || "Please note that receipt number < B > ' " || Trans_Id | ' with amount: ' | Trim (to_char (total_amount,'999G999G999G999D99')): ' < /B > has been sent for approval. Detail is given below:' | ' < Br BR > > < ' ;
--------------------------
l_body: = l_body | ' < / table > < Br > < Br > ' ;
l_body: = l_body | '< table Border = 1 ">' ;
-l_body: = l_body | "< Tr Bgcolor = rgb (0,154,61) > ';
l_body: = l_body | "< Tr Bgcolor = rgb (162,202,230) >" ;
l_body: = l_body | '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > Date' ;
l_body: = l_body | ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > name of the seller ' ;
l_body: = l_body | '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > number of PO' ;
l_body: = l_body | ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > number ' ;
l_body: = l_body | '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > line' ;
l_body: = l_body | '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > Description of the object' ;
l_body: = l_body | ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > quantity ' ;
l_body: = l_body | ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > unit ' ;
l_body: = l_body | ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > unit price PO' ;
l_body: = l_body | ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > currency " " ;
l_body: = l_body | ' < e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > amount ' ;
l_body: = l_body | '< e > < P > < Font Size = 2 Face = "Verdana, Arial, Helvetica" > < div align = left > Code combination' ;
l_body: = l_body | "< /Tr >" ;
FOR x in C LOOP
l_body: = l_body | "< Tr >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.transaction_date | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.VENDOR_NAME | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.po_number | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.release_num | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.line_num | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.item_description | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = right >' | x.Quantity | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.unit_of_measure | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = right >' | x.po_unit_price | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' | x.currency_code | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = right >' | x.amount | "< Table >" ;
l_body: = l_body | '< td > < P > < Font Size = 2 > < div align = left >' || x.cc|| "< Table >" ;
l_body: = l_body | "< /Tr >" ;
END LOOP;
l_body: = l_body | ' < / table > < Br > < Br > ' ;
l_body: = l_body | "< / body >" || CHR(10);
l_body: = l_body | ' < / html > ' || CHR(10);
DBMS_LOB. WriteAppend (l_clob, length (l_body), l_body);
RETURN L_Clob;
END Format_Notification_Msg;The maximum size allowed for l_body is 32767 who as varchar2 (32767)
Even if the CLOB has no size limit, you store the actual data in "l_body", it throws the error when the "l_body" increases of 32,767 characters.
Call the dbms_lob.writeappend () API in the for loop and cancel l_body after the API call, so that the 'l_body' will not go beyond the specified limit.
-
Hi all
DECLARE
TYPE (t1) IS RENDERING
v_ename emp.ename%TYPE,
v_sal emp.sal%TYPE
);
TNom TYPE IS an ARRAY OF t1
INDEX OF DIRECTORY;
v_tname tNom;
BEGIN
BECAUSE me IN v_tname. FIRST... v_tname. LAST
LOOP
Dbms_output.put_line (v_tname (i) .v_ename |) '' || .v_sal v_tname (i));
END LOOP;
END;
You want to ask why I used the SLIDER? -We can use in BULK COLLECT with LIMIT clause with the cursor
We also directly in bulk collect into collections as below:
DECLARE
TYPE (t1) IS RENDERING
v_ename emp.ename%TYPE,
v_sal emp.sal%TYPE
);
TNom TYPE IS an ARRAY OF t1
INDEX OF DIRECTORY;
v_tname tNom;
BEGIN
SELECT ename, sal BULK COLLECT INTO v_tname FROM emp;
BECAUSE me IN v_tname. FIRST... v_tname. LAST
LOOP
Dbms_output.put_line (v_tname (i) .v_ename |) ' ' || .v_sal v_tname (i));
END LOOP;
END;
/
-
ORA-06512, ora-04088 pls help
version database - Oracle Database 10 g Enterprise Edition Release 10.2.0.3.0
Hi I create a trigger.
create or replace TRIGGER INSERT_STOCK_RECORDS
AFTER INSERTION
ON MAKESS. MST_ITEM
FOR EACH LINE
DECLARE
fin_start_date DATE;
fin_end_date DATE;
BEGIN
BEGIN
SELECT dt_current_start_date, dt_current_end_date
IN fin_start_date, fin_end_date
OF finance.fin_account_year
WHERE vc_comp_code =:NEW.vc_comp_code
AND ch_year_closing_flag = 'o';
EXCEPTION
WHEN NO_DATA_FOUND THEN
SELECT dt_current_start_date, dt_current_end_date
IN fin_start_date, fin_end_date
OF finance.fin_account_year
WHERE vc_comp_code =:NEW.vc_comp_code
AND ch_year_closing_flag = 'C ';
WHILE OTHERS THEN
RAISE_APPLICATION_ERROR (-20101, 'Error encountered with your exercise');
END;
(- 1).
INSERT INTO invent.stock_summary
(vc_comp_code, vc_item_code, NU_BALANCE_QTY, NU_QTY_REJECTED,
NU_QTY_REWORKABLE, NU_QTY_DEFECTIVE, NU_QTY_ORDERED, NU_QTY_REQUESTED
NU_QTY_TO_ORD, NU_QTY_AVAILABLE, NU_QTY_REQUIRED, vc_default_comp)
VALUES (: NEW.vc_comp_code,: NEW.vc_item_code, NVL(:NEW.nu_opening_qty,0), 0,)
0, 0, 0, 0.
0, NVL(:NEW.nu_opening_qty,0), 0,: NEW.vc_default_comp);
(- 2).
INSERT INTO production.prod_stock
(vc_comp_code, NU_AREA_CODE, vc_item_code, NU_BALANCE_QTY, NU_QTY_REJECTED,
NU_QTY_REWORKABLE, NU_QTY_DEFECTIVE, NU_QTY_ORDERED, NU_QTY_REQUESTED
NU_QTY_TO_ORD, NU_QTY_AVAILABLE, nu_qty_required, vc_default_comp)
VALUES (: NEW.vc_comp_code, 1: NEW.vc_item_code, 0, 0)
0, 0, 0, 0.
0, 0, 0,:NEW.vc_default_comp);
(- 3).
INSERT INTO invent.stk_lot_summary
(vc_comp_code, vc_item_code, NU_BALANCE_QTY, NU_QTY_REJECTED,
NU_QTY_REWORKABLE, NU_QTY_DEFECTIVE, VC_LOT_NO, VC_BIN_NO, NU_COST, vc_default_comp)
VALUES (: NEW.vc_comp_code,: NEW.vc_item_code, NVL(:NEW.nu_opening_qty,0), 0,)
0, 0,: NEW.vc_lot_no,: NEW.vc_bin_no, NVL (: NEW .nu_eval_rate, 0),: NEW .vc_default_comp);
(- 4).
INSERT INTO invent.mst_month_summary
(vc_comp_code, dt_fin_start_date, dt_fin_end_date, vc_item_code,
nu_year_open_balance, nu_tot_received, vc_default_comp)
VALUES (: NEW.vc_comp_code, fin_start_date, fin_end_date,: NEW.vc_item_code,)
NVL(:New.nu_opening_qty,0), NVL(:NEW.nu_opening_qty,0),
(: NEW.vc_default_comp);
EXCEPTION
WHILE OTHERS THEN
RAISE_APPLICATION_ERROR (-20101, 'Error');
END;
but when I insert in this table, it is in error-
INSERT INTO MST_ITEM (VC_DEFAULT_COMP, VC_COMP_CODE, VC_ITEM_CODE, VC_ITEM_DESC, VC_TECH_DESC, NU_BASIC_PRICE,
NU_EVAL_RATE, NU_SCRAP_RATE, NU_WASTE_PER, VC_UNIT, VC_CLASSIFICATION, NU_OPENING_QTY, VC_ITEM_GROUP,
VC_UNIT_CODE, VC_LOT_NO, VC_BIN_NO, DT_MOD_DATE, VC_AUTH_CODE, VC_ABC_CLASS, VC_VED_CLASS)
VALUES ('01 ', ' 01', 'RMPR000025', 'NEW ITEM', 'NEW', 1, 1, 0, 0, "KGS, 'NEWT', 0, '23', '1', '1', '1', SYSDATE,' 01', 'A', 'V')
/
INSERT INTO MST_ITEM (VC_DEFAULT_COMP, VC_COMP_CODE, VC_ITEM_CODE, VC_ITEM_DESC, VC_TECH_DESC, NU_BASI
*
ERROR on line 1:
ORA-20101: encountered error
ORA-06512: at "MAKESS. INSERT_STOCK_RECORDS', line 58
ORA-04088: error during execution of trigger ' MAKESS. ' INSERT_STOCK_RECORDS
pls help me why this problem occurs.Hello
ERROR on line 1:
ORA-20101: encountered errorWhat meaningful message...
Please remove each WHEN of OTHER blocks in the exception handlers and let the real error.
-
ORA-39083: Object type TRIGGER could not create with error: ORA-04072:
OS: windows Server 2003 STD 64 Bit
DB version: 11g Enterprise Edition Release 11.2.0.1.0 - 64 bit
I use impdp to a certain pattern and you get the following error:
ORA-39083: Type WHAT TRIGGER could not create object error:
ORA-04072: invalid trigger type
Because sql is:
DBMS_DDL BEGIN. SET_TRIGGER_FIRING_PROPERTY ('"AGILETEST" "," "SWAPOPTIMIZER" ', ALF)
SE); END;
Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX
Object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMA of treatment
P/INDEX_STATISTICS
Object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS treatment
Processing object type SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX
----------
I check in Metalink and found it to be a bug with no construction nearby.
Bug 9858539 : DATA PUMP IMPORT FAILED TO TRIGGER LOGON ORA-04072: INVALID TYPE of TRIGGER
---------
Any ideas?Well Yes, the patch is available for this bug 9858539 for 11.2.0.1 and 11.2.0.3.
Salman
-
Error ORA-01422 apex: exact fetch returns more than the required number of line
Hi people,
Apex 4.1
I have a page that works like a charm.
Based on my application I need I have to perform the same operation for the different regions. As a quick and better method, I copied the page and branched, it inspires tab for this region.
The problem is that the original page works fine.
I haven't changed anything except the parent set to this copied page tab and works that I find with the above error.
It allows me to make the first entry on this page, but when I try to access the page again it gives me this error.
The error in detail is as below:
is_internal_error: false
ora_sqlcode:-1422
ora_sqlerrm: ORA-01422: exact fetch returns more than number of lines
Component.type: APEX_APPLICATION_PAGE_PROCESS
Component.ID: 214936714355373108
Component.Name: EMP_LEAVE_INFO line
error_backtrace:
ORA-06512: at line 1
ORA-06512: at "SYS." DBMS_SYS_SQL", line 1926
ORA-06512: at "SYS." WWV_DBMS_SQL', line 973
ORA-06512: at "SYS." WWV_DBMS_SQL', line 999
ORA-06512: at "APEX_040200.WWV_FLOW_DYNAMIC_EXEC", line 806
ORA-06512: at "APEX_040200.WWV_FLOW_DML", line 336
ORA-06512: at "APEX_040200.WWV_FLOW_PROCESS", line 332>
As a quick and better method, I copied the page and branched, it inspires tab for this region.
>Copy paste is never advisable. It can be fast in some cases, there is an anti-pattern.
Be aware that the automatic extraction of the APEX line is based on a component of demand.
It is possible that your automatic rowfetch is based on the element of your previous page. If you for example to change the name of the table, but do not change the reference is the primary key value, then you can pass a value to your table that was not unique. This would result in ORA-01422.
Find the value of the session element and run your query.
Concerning
Nico
-
Error - ORA-01422: exact fetch returns more than number of lines
Hello
I get the error when running script below. Please help me.
/****************** ERROR ******************/
Error report:
ORA-01422: exact fetch returns more than number of lines
ORA-06512: at line 71
01422 00000 - "exact fetch returns more than number of lines."
* Cause: Exact extraction specified number is less than the returned rows.
* Action: Rewrite the query or change the number of rows requested
/****************** SCRIPT ******************/
DECLARE
l_xml XMLTYPE: = XMLTYPE ("< LoggingInformation >
< commandeEmplacement >
< name > ServiceCall1 < / name >
< StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
< EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
< ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
< status > completed < / status >
< ExceptionMessage > error here... < / ExceptionMessage >
< ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
< ServiceLoggingEntries >
< item >
< foo > 1 < / foo >
< / ServiceInformation >
< item >
< foo > 2 < / foo >
< / ServiceInformation >
< / ServiceLoggingEntries >
< InformationLoggingEntries >
< ProcessInformation >
< bar > 1 < / >
< / ProcessInformation >
< ProcessInformation >
< bar > 2 < / >
< / ProcessInformation >
< / InformationLoggingEntries >
< / commandeEmplacement >
< commandeEmplacement >
< name > ServiceCall2 < / name >
< StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
< EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
< ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
< status > completed < / status >
< ExceptionMessage > error here... < / ExceptionMessage >
< ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
< ServiceLoggingEntries >
< item >
< foo > 3 < / foo >
< / ServiceInformation >
< item >
< foo > 4 < / foo >
< / ServiceInformation >
< / ServiceLoggingEntries >
< InformationLoggingEntries >
< ProcessInformation >
< bar > 3 < / >
< / ProcessInformation >
< ProcessInformation >
< bar > < / > 4
< / ProcessInformation >
< / InformationLoggingEntries >
< / commandeEmplacement >
< commandeEmplacement >
< name > ServiceCall3 < / name >
< StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
< EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
< ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
status of <>failed < / status >
< ExceptionMessage > error here... < / ExceptionMessage >
< ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
< / commandeEmplacement >
(< / LoggingInformation > ');
v_txt VARCHAR2 (2000);
BEGIN
SELECT XMLTYPE. Extract (value (TT),'/ CommandInformation/Name/Text () '). GETSTRINGVAL()
IN v_txt
TABLE (XMLSEQUENCE (l_xml. Extract('/LoggingInformation/CommandInformation'))) tt;
DBMS_OUTPUT. Put_line (v_txt);
END;Select...
means only 1 row can be returned.
Your select returns more than one line.
Change v_txt in a collection, define a cursor and the extraction of it or change the statement, i.e. it returns a single line.---------
Sybrand Bakker
Senior Oracle DBA -
Hi all.
Sorry to ask this error again, I read a lot of topic in this forum on this subject, but I can't fix it.
So I create this topic.
My computer is running oracle database 11 g 2 express edition on ubuntu LTS 14.04.
I'm trying to import the database of dmp file. That's what I do:
> sqplus
opening session with sys as sysdba, then run:
Hoangnv CREATE USER IDENTIFIED BY hoangnv;
GRANT CONNECT TO hoangnv;
GRANT RESOURCE, s/n hoangnv;
CREATE OR REPLACE DIRECTORY dmpdir AS ' / home/hoangnv/downloads/db ";
GRANT read, write the DIRECTORY ON dmpdir TO hoangnv;
my_project.dmp file is stored on /home/hoangnv/Downloads/db folder.
Finally, I ran the command below in terminal:
impdp hoangnv/hoangnv@xe directory = dmpdir dumpfile = my_project.dmp logfile = my_project.log
That's what see the Terminal:
ORA-39002: invalid operation
ORA-39070: unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS." UTL_FILE", line 536
ORA-29283: invalid file operation
Any ideas? I run these commands on window and import the database successfully.
Hello
Please try the suggestions below:
1. make sure that the roles granted to the user are 'default' for him.
SQL > change the user hoangnv the role by default all;
then try to re-import.
Note: the DBA role contains the IMP_FULL_DATABASE with it.
2. try import with the use of the 'System' this time, which is the result then? don't forget to give the system read, write on directory dmpdir.
3. is the permission to/home/hoangnv/Downloads/db fine OS?
-
ERROR "ora-01422" during insertion in the table?
Hello
I have created the dynamic action of PL/SQL to insert data but founded by page_item
declare x_found_pages number; x_auth_id number; x_user_id number; begin x_user_id := :P41_USR_ID; -- this is my page_item _____ successful run When change it to number value .. ! select count(V_APP_PAGES.PAGE_ID) into x_found_pages from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID and V_AUTH_DTL.USR_ID = x_user_id; select T_AUTH.ID into x_auth_id from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH where T_AUTH_DTL.AUTH_ID=T_AUTH.ID and T_AUTH.USR_ID = x_user_id; -- Checking...? if x_found_pages > 0 then for i in (select V_APP_PAGES.PAGE_ID from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID and V_AUTH_DTL.USR_ID = x_user_id) loop insert into T_AUTH_DTL (AUTH_ID,PAGE_ID) values (x_auth_id,i.PAGE_ID); end loop; end if; end;
Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...
Thank you...
AMR Abdeen wrote:
I have created the dynamic action of PL/SQL to insert data but founded by page_item
- declare
- number of x_found_pages;
- number of x_auth_id;
- number of x_user_id;
- Start
- x_user_id: =: P41_USR_ID; -It is my page_item _ successfully performed when change to value the number...!
- SELECT count (V_APP_PAGES. Page_id) in x_found_pages
- of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
- where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
- and V_AUTH_DTL. USR_ID = x_user_id;
- Select T_AUTH.ID from x_auth_id
- of T_AUTH_DTL T_AUTH_DTL, T_AUTH T_AUTH
- where T_AUTH_DTL. AUTH_ID = T_AUTH.ID
- and T_AUTH. USR_ID = x_user_id;
- -Checking...?
- If x_found_pages > 0 then
- I'm in (select V_APP_PAGES. PAGE_ID
- of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
- where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
- and V_AUTH_DTL. USR_ID = x_user_id)
- loop
- insert into T_AUTH_DTL (AUTH_ID, PAGE_ID) values (x_auth_id, i.PAGE_ID);
- end loop;
- end if;
- end;
Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...
The error is explicit:
ORA-01422: exact fetch returns more than number of lines
Cause: The exact extraction specified number is less than the rows returned.
Action: Rewrite the query or change the number of rows requested
This would imply the query in line 16 as County dissociated in the previous one will always return only one row.
Run
select T_AUTH.ID into x_auth_id from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH where T_AUTH_DTL.AUTH_ID=T_AUTH.ID and T_AUTH.USR_ID = :x_user_id
in the workshop of SQL by using the P41_USR_ID value in the variable link to find out how many rows it returns.
It is likely that the entire block can be replaced by a single INSERT statement. If you provide instructions CREATE TABLE, INSERT statements to create sample data and a clear definition of the requirements that we try to do.
What is the point of the inclusion of tables aliases that are exactly the same as the names of the tables?
-
Hello
I get below error frequently in the log database alerts.
ORA-12012: error on auto work 754461
ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, command parameters ' RCPT TO: ' unrecognized or missing
ORA-06512: at "SYS." UTL_SMTP", line 20
ORA-06512: at "SYS." UTL_SMTP", line 98
ORA-06512: at "SYS." UTL_SMTP", line 240
ORA-06512: at the 'APPS '. EIS_UTIL_PKG', line 94
ORA-06512: at the 'APPS '. HKD_PO_ADDON_PKG', line 110
ORA-06512: at line 1
The syntax error comes from the SMTP server, not to the job itself, so I disagree with your solution.
-
I have tried the code
DECLARE
lv_url VARCHAR2 (1000): = ' http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf';
lc_return BLOB;
lhttp_url httpuritype.
Varriables - declared to have written the LOB to pdf file-
l_file UTL_FILE. TYPE_DE_FICHIER;
l_buffer RAW (32767).
l_amount directory: = 32767;
l_pos INTEGER: = 1;
l_blob BLOB;
l_blob_len INTEGER.
BEGIN
-create URIs
lhttp_url: = httpuritype.createuri (lv_url);
-get the PDF document
lc_return: = lhttp_url.getblob ();
-Open the destination file.
l_file: = UTL_FILE. FOPEN ('MBO_INPUT_DIR', 'MBD.zip', 'wb');
-Get the total length of the BLOB
l_blob_len: = DBMS_LOB.getlength (lc_return);
-Pieces of the BLOB to read and write to the file
-full up.
While l_pos < l_blob_len LOOP
DBMS_LOB. READ (lc_return, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw (l_file, l_buffer, FALSE);
l_pos: = l_pos + l_amount;
END LOOP;
-Closes the file.
UTL_FILE. FCLOSE (l_file);
EXCEPTION
WHILE OTHERS THEN
-Close the file if something goes wrong.
IF UTL_FILE.IS_OPEN (l_file) THEN
UTL_FILE. FCLOSE (l_file);
END IF;
LIFT;
END;
But make a mistake like:
Error report-
ORA-29273: HTTP request failed
ORA-06512: at "SYS." UTL_HTTP", line 1130
ORA-12535: TNS:operation expired
ORA-06512: at line 37 level
29273 00000 - "the HTTP request failed.
* Cause: The UTL_HTTP package cannot run the HTTP request.
* Action: Use get_detailed_sqlerrm to check the detailed error message.
Correct the error and restart the HTTP request.
Please suggest a solution. Is it possible to download a zip file with the same code?
[oracle@localhost ~]$ sqlplus scott/tiger SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 6 13:59:09 2015 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> --My Database version SQL> ---------------------- SQL> SELECT * FROM v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production CORE 11.2.0.1.0 Production TNS for Linux: Version 11.2.0.1.0 - Production NLSRTL Version 11.2.0.1.0 - Production SQL> ed Wrote file afiedt.buf 1 DECLARE 2 lv_url VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf'; 3 lc_return BLOB; 4 lhttp_url httpuritype; 5 ---Varriables declared for writing the LOB to pdf file -- 6 l_file UTL_FILE.FILE_TYPE; 7 l_buffer RAW(32767); 8 l_amount BINARY_INTEGER := 32767; 9 l_pos INTEGER := 1; 10 l_blob BLOB; 11 l_blob_len INTEGER; 12 BEGIN 13 --create uri 14 lhttp_url := httpuritype.createuri(lv_url); 15 --get the PDF document 16 lc_return := lhttp_url.getblob(); 17 -- Open the destination file. 18 l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb'); 19 --Get the total length of the BLOB 20 l_blob_len := DBMS_LOB.getlength(lc_return); 21 -- Read chunks of the BLOB and write them to the file 22 -- until complete. 23 WHILE l_pos < l_blob_len LOOP 24 DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer); 25 UTL_FILE.put_raw(l_file, l_buffer, FALSE); 26 l_pos := l_pos + l_amount; 27 END LOOP; 28 -- Close the file. 29 UTL_FILE.FCLOSE(l_file); 30 EXCEPTION 31 WHEN OTHERS THEN 32 -- Close the file if something goes wrong. 33 IF UTL_FILE.IS_OPEN(l_file) THEN 34 UTL_FILE.FCLOSE(l_file); 35 END IF; 36 RAISE; 37* END; 38 / DECLARE * ERROR at line 1: ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-24247: network access denied by access control list (ACL) ORA-06512: at line 36 SQL> conn sys as sysdba Enter password: Connected. SQL> ed Wrote file afiedt.buf 1 BEGIN 2 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'love.xml', 3 description => 'Love ACL', 4 principal => 'SCOTT', 5 is_grant => true, 6 privilege => 'connect'); 7 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'love.xml', 8 principal => 'SCOTT', 9 is_grant => true, 10 privilege => 'resolve'); 11 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'love.xml', 12 host => 'shenzhoufellowship.org'); 13 commit; 14* END; 15 / PL/SQL procedure successfully completed. SQL> conn scott/tiger Connected. SQL> ed Wrote file afiedt.buf 1 DECLARE 2 lv_url VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf'; 3 lc_return BLOB; 4 lhttp_url httpuritype; 5 ---Varriables declared for writing the LOB to pdf file -- 6 l_file UTL_FILE.FILE_TYPE; 7 l_buffer RAW(32767); 8 l_amount BINARY_INTEGER := 32767; 9 l_pos INTEGER := 1; 10 l_blob BLOB; 11 l_blob_len INTEGER; 12 BEGIN 13 --create uri 14 lhttp_url := httpuritype.createuri(lv_url); 15 --get the PDF document 16 lc_return := lhttp_url.getblob(); 17 -- Open the destination file. 18 l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb'); 19 --Get the total length of the BLOB 20 l_blob_len := DBMS_LOB.getlength(lc_return); 21 -- Read chunks of the BLOB and write them to the file 22 -- until complete. 23 WHILE l_pos < l_blob_len LOOP 24 DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer); 25 UTL_FILE.put_raw(l_file, l_buffer, FALSE); 26 l_pos := l_pos + l_amount; 27 END LOOP; 28 -- Close the file. 29 UTL_FILE.FCLOSE(l_file); 30 EXCEPTION 31 WHEN OTHERS THEN 32 -- Close the file if something goes wrong. 33 IF UTL_FILE.IS_OPEN(l_file) THEN 34 UTL_FILE.FCLOSE(l_file); 35 END IF; 36 RAISE; 37* END; 38 / PL/SQL procedure successfully completed. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@localhost ~]$ cd saubhik/ [oracle@localhost saubhik]$ pwd /home/oracle/saubhik [oracle@localhost saubhik]$ ls -l *.pdf -rw-r--r-- 1 oracle oinstall 60055 Apr 6 14:03 TheLoveDare.pdf [oracle@localhost saubhik]$
I love this pdf file. I would like to read this and mean while if you get an error then please post in its entirety and also think that it is an Oracle error or network.
-
Error ORA - 00604 DB creation with DBCA
Hello
I want to create an instance of database with MS Windows 8.1 64bits.
So I installed the Standard Edition 12.1.0.1.16 database (12.1.0.1.0 and Patch16). Now, when I create an instance I get the error ORA-00604 in the script cloneDBCreation.sql to the command ' modify AL32UTF8 database character set INTERNAL_CONVERT '.»
Has anyone an idea what is the problem?
Thanks in advance.
Kind regards
Martin
12.1.0.2 is only available under EA right now - see MOS Doc 1905806.1
Maybe you are looking for
-
Satellite P850-132 - Bluetooth can not be installed
Dear *,. I have this machine:model name: SATELLITE P850-132Part No. PSPKAE-00E001N5 OS: Win 7 64-bit, SP1, the latest version of the Bios I had to reinstall the machine from zero (changing OS language), I could install all the drivers that I found in
-
Merging 2 iTunes - an old pc and the other on a new iMac libraries
HHello everyone, hope led someone can help with this one. I'm trying to transfer iTunes library to an old windows to a new iMac pc. It's difficult because the pc has been and is still the host for an iPad, while the new iMac has already been connecte
-
OfficeJet 4630: password wireless
I'm trying to set up the connection of my printer wireless to my router again. The new router password includes a + sign, but I can't see how to enter a sign using the keypad of the printer.
-
Can I add photos to my iPhone disabled on my Mac using iCloud?
My iPhone has been disabled, and I want to add pictures to this topic on my Mac before I have to reset it. I just added my apple ID on my Mac, and it said that I didn't save anything. Is it too late to save the pictures in my photo library iCloud?
-
can we do complex arithmetic in xml and access in labview?
Hello I'm using LabVIEW 8.5. I did 1 project how far I used Excel to perform complex arithmetic and then read results Thanks to labview. I'm just curious about Xml. It can be used for what purpose? What is a good alternative for excel? because I read