To handle eroor ORA-22160
Hi,
I have written following procedure and getting following error, Please can anyone guide me how to overcome this issue?
* how can i post my script in a formatted shape, which tags do i have to use
* getting following error
6 rows inserted.
14 rows inserted.
6 rows inserted.
ORA-22160: element at index [16] does not exist
create or replace procedure pr_bulk1 is
type t_idx is table of emp.idx%type
index by pls_integer;
type t_source is table of emp.source%type
index by pls_integer;
type t_score is table of emp.score%type
index by pls_integer;
TYPE guide_aat IS TABLE OF pls_integer
INDEX BY pls_integer;
v_idx t_idx;
v_source t_source;
v_score t_score;
v_score_updated guide_aat;
v_score_n_updated guide_aat;
cursor c is
select idx,
source, score
from rel08_nz_poi
where instr(source,'ABC)>0;
begin
open c;
loop
fetch c bulk collect into
v_idx, v_source,
v_score limit 20;
for i in 1..v_idx.count
loop
if v_score(i) is not null and v_score(i) >90 then
v_score(i):=v_score(i)*2;
v_score_updated(i):=i;
else
v_score_n_updated(i):=i;
end if;
end loop;
forall indx in 1..v_score_updated.count
insert into t_update (
idx, source,
score
) values
(v_idx(indx),
v_source(indx),
v_score(indx)
DBMS_OUTPUT.PUT_LINE(
TO_CHAR(SQL%ROWCOUNT) || ' rows inserted.'
forall indx in 1..v_score_n_updated.count
insert into t_n_update (
idx, source,
score
) values
(v_idx(indx),
v_source(indx),
v_score(indx)
DBMS_OUTPUT.PUT_LINE(
TO_CHAR(SQL%ROWCOUNT) || ' rows inserted.'
exit when c%notfound;
end loop;
--dbms_output.put_line('total records fetched='||c%rowcount);
exception when no_data_found then
dbms_output.put_line('no data found');
when others then
dbms_output.put_line(sqlerrm);
end;
/
901887 wrote:
I have written following procedure and getting following error, Please can anyone guide me how to overcome this issue?Why are you using associative arrays and not normal arrays/collections? Do you understand what the differences are between the two?
Just because an associative array contains 2 values/cells, it does not mean you can use array(1) and array(2) to refer to these values. It could very well be array(1234) for the 1st cell and array(2034) for the 2nd.
So unless you actually have name-value pairs and the name is not a sequential number, then using associative arrays do not make much sense.
As for the approach used. A single SQL insert select statement is a much better candidate for the problem - and will provide far better performance and significantly better scalability.
* how can i post my script in a formatted shape, which tags do i have to useYou need to use the \ tag at the start of your code block and then use an exact copy of that tag again to close the code block.
Similar Messages
-
ORA-22160: element at index name does not exist
hi
i have a procedure which insert values from a VARRAY type in a table. My question is how can i verify the existence of nth element before inserting to avoid ORA-22160: element at index name does not exist
Here is my code:
CREATE OR REPLACE PACKAGE BODY CANDIDE.PE_CL IS
PROCEDURE p_proc(Id_clt IN P_CLIENT.id_client%TYPE,
nameClt IN P_CLIENT.nameclient%TYPE,
--VARRAY type
priceItem IN price_array,
--VARRAY type
nameItem IN item_array) IS
BEGIN
INSERT INTO P_CLIENT VALUES (Id_clt, nameClt);
FORALL i IN nameItem.FIRST .. nameItem.LAST
INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
END;
end PE_CL;
Product version: Oracle9i Enterprise Edition Release 9.2.0.1.0
PeterI see the problem now. If there are more values in one varray or the other, how do you want to handle it? Below I have demonstrated, first the solution that I previous offered, that would only insert the rows where there are values from both varrays. In the second example below, I have inserted a null value in place of the missing value from the varray that has fewer values.
scott@ORA92> CREATE TABLE p_client
2 (id_client NUMBER,
3 nameclient VARCHAR2(15))
4 /
Table created.
scott@ORA92> CREATE TABLE p_items
2 (id_client NUMBER,
3 name_item VARCHAR2(10),
4 price_item NUMBER)
5 /
Table created.
scott@ORA92> CREATE OR REPLACE PACKAGE PE_CL
2 IS
3 TYPE item_array IS ARRAY(10) OF VARCHAR2(10);
4 TYPE price_array IS ARRAY(10) OF number;
5 PROCEDURE p_proc
6 (Id_clt IN P_CLIENT.id_client%TYPE,
7 nameClt IN P_CLIENT.nameclient%TYPE,
8 priceItem IN price_array,
9 nameItem IN item_array);
10 end PE_CL;
11 /
Package created.
scott@ORA92> show errors
No errors.
-- first method:
scott@ORA92> CREATE OR REPLACE PACKAGE BODY PE_CL
2 IS
3 PROCEDURE p_proc
4 (Id_clt IN P_CLIENT.id_client%TYPE,
5 nameClt IN P_CLIENT.nameclient%TYPE,
6 priceItem IN price_array,
7 nameItem IN item_array)
8 IS
9 BEGIN
10 INSERT INTO P_CLIENT VALUES (Id_clt, nameClt);
11 -- FORALL i IN nameItem.FIRST .. nameItem.LAST
12 -- INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
13 FOR i IN nameItem.FIRST .. nameItem.LAST LOOP
14 IF nameItem.EXISTS(i) AND priceItem.EXISTS(i) THEN
15 INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
16 END IF;
17 END LOOP;
18 END;
19 end PE_CL;
20 /
Package body created.
scott@ORA92> show errors
No errors.
scott@ORA92> declare
2 priceitem pe_cl.price_array := pe_cl.price_array(2, 5);
3 nameitem pe_cl.item_array := pe_cl.item_array('item a', 'item b', 'item c');
4 begin
5 pe_cl.p_proc
6 (id_clt => 900,
7 nameclt => 'MIKE',
8 priceitem => priceitem,
9 nameitem => nameitem);
10 COMMIT;
11 end;
12 /
PL/SQL procedure successfully completed.
scott@ORA92> SELECT * FROM p_client
2 /
ID_CLIENT NAMECLIENT
900 MIKE
scott@ORA92> SELECT * FROM p_items
2 /
ID_CLIENT NAME_ITEM PRICE_ITEM
900 item a 2
900 item b 5
scott@ORA92> TRUNCATE TABLE p_client
2 /
Table truncated.
scott@ORA92> TRUNCATE TABLE p_items
2 /
Table truncated.
-- second method:
scott@ORA92> CREATE OR REPLACE PACKAGE BODY PE_CL
2 IS
3 PROCEDURE p_proc
4 (Id_clt IN P_CLIENT.id_client%TYPE,
5 nameClt IN P_CLIENT.nameclient%TYPE,
6 priceItem IN price_array,
7 nameItem IN item_array)
8 IS
9 BEGIN
10 INSERT INTO P_CLIENT VALUES (Id_clt, nameClt);
11 -- FORALL i IN nameItem.FIRST .. nameItem.LAST
12 -- INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
13 FOR i IN nameItem.FIRST .. nameItem.LAST LOOP
14 IF nameItem.EXISTS(i) AND priceItem.EXISTS(i) THEN
15 INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), priceItem(i));
16 ELSIF nameItem.EXISTS(i) THEN
17 INSERT INTO P_ITEMS VALUES (Id_clt, nameItem(i), null);
18 ELSIF priceItem.EXISTS(i) THEN
19 INSERT INTO P_ITEMS VALUES (Id_clt, null, priceItem(i));
20 END IF;
21 END LOOP;
22 END;
23 end PE_CL;
24 /
Package body created.
scott@ORA92> show errors
No errors.
scott@ORA92> declare
2 priceitem pe_cl.price_array := pe_cl.price_array(2, 5);
3 nameitem pe_cl.item_array := pe_cl.item_array('item a', 'item b', 'item c');
4 begin
5 pe_cl.p_proc
6 (id_clt => 900,
7 nameclt => 'MIKE',
8 priceitem => priceitem,
9 nameitem => nameitem);
10 COMMIT;
11 end;
12 /
PL/SQL procedure successfully completed.
scott@ORA92> SELECT * FROM p_client
2 /
ID_CLIENT NAMECLIENT
900 MIKE
scott@ORA92> SELECT * FROM p_items
2 /
ID_CLIENT NAME_ITEM PRICE_ITEM
900 item a 2
900 item b 5
900 item c -
Handling the ORA-12170: TNS:Connect timeout in a procedure
Post moved to:
Handling the ORA-12170: TNS:Connect timeout in a procedure
Edited by: John_75 on Jun 28, 2010 9:33 AMhttp://download.oracle.com/docs/cd/B19306_01/network.102/b14212/troublestng.htm#i440403
will give you
http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/troublestng.htm#CEGEDBIE -
ORA-22160 - element at index does not exist
A script that I am running to load data into a table using bulk
binding (using nested table variables and FORALL) produces an
error
"ORA-22160: element at index [77] does not exist".
Just prior to the forall...insert... I report the size of each
nested table variable using COUNT and get a number that is much
larger than 77. I run a query on the data to see if the data
got loaded despite the error message and it did get loaded. Is
this a bug in Oracle 8.1.6 or is something else going on?
sample code:
dbms_output.put_line(i_sec_cn.count);
dbms_output.put_line(i_twn_cn.count);
dbms_output.put_line(i_sec_no.count);
forall i in i_sec_cn.first..i_sec_cn.last
insert into sections (cn,township_cn,section_no)
values(i_sec_cn(i),i_twn_cn(i),i_sec_no(i));
output excerpt:
2687
2687
2687
ORA-22160: element at index [77] does not existA script that I am running to load data into a table using bulk
binding (using nested table variables and FORALL) produces an
error
"ORA-22160: element at index [77] does not exist".
Just prior to the forall...insert... I report the size of each
nested table variable using COUNT and get a number that is much
larger than 77. I run a query on the data to see if the data
got loaded despite the error message and it did get loaded. Is
this a bug in Oracle 8.1.6 or is something else going on?
sample code:
dbms_output.put_line(i_sec_cn.count);
dbms_output.put_line(i_twn_cn.count);
dbms_output.put_line(i_sec_no.count);
forall i in i_sec_cn.first..i_sec_cn.last
insert into sections (cn,township_cn,section_no)
values(i_sec_cn(i),i_twn_cn(i),i_sec_no(i));
output excerpt:
2687
2687
2687
ORA-22160: element at index [77] does not exist -
Why APEX 4.1 Error handling function does not trap the error of missing table?
Say, I create simple application with single IR report page and I also assign standard simple error handling function.
Function works perfectly, except but this case:
If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
and error handling function is not invoked at all.
Is this a feature or a bug?Hi,
Check the corrections given in the note 990764:
Reason and Prerequisites
Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
ORA-00942: table or view does not exist
Fehler in CL_SQL_RESULT_SET Include NEXT_PACKAGE
RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
Solution
SAP NetWeaver 2004s BI
Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
In urgent cases you can implement the correction instructions.
The correction instructions contain the tightened inspection for characteristics.
Regards,
Anil Kumar Sharma .P -
Dear all,
please help me, what exception name i must use
(like "NO_DATA_FOUND" or "DUP_VAL_ON_INDEX") for error handling
(exception) for ORA-02291 : integrity constraint(....) violated -
parent key not found.
Thank you.
Regards
Teguh SantosoFind out the error no. Oracle returns for this error & in the
front-end (Ex:Forms) create a Pragma Exception error handler &
give ur user defined error message when the user encounters
it....
Hope this suffices.
Santhosh -
Error handler for ORA-29283 - not working
I am running Oracle 9.2.0.4 on HP-UX.
I have a stored procedure which reads a text file. I have set up an execption for error code ORA-29283 (invalid file operation). When I test my procedure (by not having the file to read) my exception handler is bypassed for a general exception error and my procedure terminates.
here's parts of my code:
Declare
file_not_found EXCEPTION;
PRAGMA EXCEPTION_INIT (file_not_found, -29283);
BEGIN
nochourly_file := UTIL_FILE.fopen('/mydirectory','myfile.txt','R');
Loop
begin
UTL_FILE.get_line(nochourly_file, sbuffer);
EXCEPTION
WHEN NO_DATA_FOUND
THEN
GOTO end_of_file;
WHEN file_not_found
THEN
DBMS_OUTPUT.put_line ('Invalid File Operation - file not found');
skip_last_hour_processed;
GOTO end_of_file;
WHEN OTHERS
THEN
err_num := SQLCODE;
err_msg := SUBSTR (SQLERRM, 1, 100);
DBMS_OUTPUT.put_line ('Error ' || TO_CHAR (err_num));
DBMS_OUTPUT.put_line (err_msg);
DBMS_OUTPUT.put_line (sbuffer);
RAISE;
EXIT;
END;
===============
When this fails I expect to see the message
"Invalid file operation - file not found"
which indicates my exception handler was processed.
Instead I see:
SQL> @$HOME/newhourly_dly
Begin processing at 20060627154321
nlasthourprocessed:20060627100000
Last Hour Processed is 20060627100000
BEGIN noc_hourly_daily_load; END;
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 449
ORA-29283: invalid file operation
ORA-06512: at "HNS.NOC_HOURLY_DAILY_LOAD", line 374
ORA-06512: at line 1
Elapsed: 00:00:00.05
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Can you explain:
1) what generated the error message since
a. it wasn't my exception handler and
b. it wasn't the "WHEN OTHERS"
2) Why isn't my error handler working?
Please advise.
Thank youHello
Not sure why your exception is being ignored but usually, to be able to handle the UTL_FILE exceptions, you need to explicitly code for each exception declared in the UTL_FILE package i.e.
EXCEPTION
WHEN utl_file.invalid_path THEN
--Do something
WHEN utl_file.invalid_mode THEN
--Do something
WHEN utl_file.invalid_filehandle THEN
--Do something
WHEN utl_file.invalid_operation THEN
--Do something
WHEN utl_file.read_error THEN
--Do something
WHEN utl_file.write_error THEN
--Do something
WHEN utl_file.internal_error THEN
--Do something
END;HTH
David -
NEED HELP IN CONFLICT HANDLER ERROR ORA-01403: no data found
Hi All,
I am using Oracle Streams to replicate the data...
I need to update the records on the destination with some particular condition like if USER_COUNTRY = 'XXX' then the data need to be updated in the destination side else skip ...
I wrote the procedure ..below .. the data is not replicating and found the below error from dba_apply_error..
ORA-01403: no data found
ORA-06512: at "SYS.LCR$_ROW_RECORD", line 419
Table called history_row_lcrs is created in the strmadmin to store the lcr values...
CREATE OR REPLACE PROCEDURE proc_test(in_any sys.anydata)IS
lcr sys.lcr$_row_record;
rc pls_integer;
v_type varchar2(20);
col_1 sys.anydata;
lcr_usercountry varchar2(20);
TRANS varchar2(20);
skip_routine Exception;
BEGIN
rc:=in_any.GetObject(lcr);
v_type:=lcr.get_command_type();
col_1:=lcr.get_value('NEW','USER_COUNTRY');
rc:=col_1.GetVarchar2(lcr_usercountry);
for x in ( select user_country from TEST.TESTREP1
where USER_COUNTRY=lcr_usercountry)
Loop
IF (x.USER_COUNTRY = 'XXX')
THEN
insert into strmadmin.history_row_lcrs VALUES (SYSDATE, lcr.GET_SOURCE_DATABASE_NAME(), lcr.GET_COMMAND_TYPE(),
lcr.GET_OBJECT_OWNER(), lcr.GET_OBJECT_NAME(), lcr.GET_TAG(), lcr.GET_TRANSACTION_ID(), lcr.GET_SCN(),
lcr.GET_COMMIT_SCN,lcr.GET_VALUES('old'), lcr.GET_VALUES('new', 'n'));
lcr.EXECUTE(true);
ELSE
Raise Skip_routine;
END IF;
END Loop;
Exception
when skip_routine Then
null;
END;
BEGIN
DBMS_APPLY_ADM.SET_DML_HANDLER(
object_name => 'TEST.TESTREP1',
object_type => 'TABLE',
operation_name => 'UPDATE',
error_handler => false,
user_procedure => 'STRMADMIN.PROC_TEST',
apply_database_link => NULL,
apply_name => NULL);
END;
Please try to help me if am doing something wrong...because I need to update only one colums am using DML_HANDLER instead of SET_UPDATE_CONFLICT_HANDLER...
Any other inputs are also appreciated...
Thanks In Advance and appreciate for the quick reply...I fired the query, am not getting any output from dbms_output.put_line('..|USER_COUNTRY..');
Is that no data is reading or may be any reason else..
in this table store_id is the primary key ..
SQL> set serveroutput on
SQL> CREATE OR REPLACE PROCEDURE test(in_any sys.anydata) IS
2 lcr sys.lcr$_row_record;
3 rc pls_integer;
4 v_type varchar2(20);
5 col_1 sys.anydata;
6 col_2 sys.anydata;
7 lcr_usercountry varchar2(20);
8 lcr_storeid number;
9 TRANS varchar2(20);
10 store_id number;
11 USER_COUNTRY varchar2(20);
12
13 BEGIN
14 rc:=in_any.GetObject(lcr);
15 v_type:=lcr.get_command_type();
16 col_1:=lcr.get_value('NEW','USER_COUNTRY');
17 rc:=col_1.GetVarchar2(lcr_usercountry);
18 col_2:=lcr.get_value('NEW','STORE_ID');
19 rc:=col_2.getnumber(lcr_storeid);
20 select user_country into user_country from dev03.testrep1 where user_country=lcr_usercountry and store_id=lcr_storeid;
21 dbms_output.put_line('---------||USER_COUNTRY ||-----------');
22 END;
23 /
Procedure created.
Thanks for your help .... -
Exception handling in ORA REPORT
hi,
can any one tell about exception handling in oracle reports 10g if I wanna raise a message where data is no not present for example I select one value from LOV when I press mouse button and if data is not present then
report show numeric or value error but I want here raise a message box I use this [ in before_report_trigger exception no_data_found then srw.message(10,'data not found') ] after use this value or numeric error is vanished but my message box is not raise I also use dbms_output.put_line('data not found') or srw.message(10,'data not found') srw.message(10,'data not found') but message box not show any please tell me about this.thanks
Regards,
shaz khandbms_output.put_lineYou can only use this in sqlplus.
srw.messageThis writes a message to the log file (see traceopts in the online help).
report show numeric or value errorThat means there is something wrong in one of your procedures. You should never get an error like that.
When exactly do you get this error? -
FRM-40735: Do_Proc trigger raised un-handled exception ORA-06502
Hi Guys
i'm trying to upload a csv file and i'm getting this error.I have checked the Do_Proc1 trigger and i couldn't find the source of the problem
pls help!It must be because of the following reasons:
1, Expecting a numeric value but got string
2. Value coming into the field is too large than the datatype can accomodate.
Modify the do_proc procedure and catch the exception and find the value which causes the error. Then it would be easier to handle. -
hi every body,
How can i handle exception ora-01858 without
using when others then null;
I want something
like
when user_definded =ora-01858 then null;
when others then
v_ErrorNumber := SQLCODE;
v_ErrorText := SUBSTR(SQLERRM, 1, 2000);in fact ,
I use a procadure that insert values into a table.
I want that when it reaches an ORA-01858 , then the error is ignored and continue
to insert others values,
but now , when I reach error it stops, how to deal with it ?
CREATE OR REPLACE PROCEDURE INSERT_SWAP_FIXINGS (l_num number)
as
v_date varchar2(20);
v_swap varchar2(1000);
conn utl_tcp.connection;
p pls_integer;
line varchar2(4000);
v_ErrorNumber NUMBER; -- Variable to hold the error number
v_ErrorText VARCHAR2(200); -- Variable to hold the error message text
e_Non_Numeric EXCEPTION;
PRAGMA EXCEPTION_INIT(e_Non_Numeric , -1858);
begin
select trunc(sysdate) -l_num into v_date from dual;
select regexp_replace (stringAgg(ticker),',','|') ||';' into v_swap from SWAP_DESC ;
conn := utl_tcp.open_connection(remote_host=>'MY_H0ST',remote_port=>123156);
p := utl_tcp.write_line(conn, v_swap);
p := utl_tcp.write_line(conn, 'PX_Last;');
p := utl_tcp.write_line(conn, v_date );
p := utl_tcp.write_line(conn,';');
p := utl_tcp.write_line(conn, v_date);
p := utl_tcp.write_line(conn, '>');
begin
loop
line := utl_tcp.get_line(conn, TRUE);
if get_token(line,2) like '%N/A%' then
dbms_output.put_line(get_token(line,1)||','||get_token(line,2));
dbms_output.put_line(line);
insert into TMP_SWAP_FIXINGS
values (get_token(line,1),to_date(get_token(line,2),'DD/MM/YYYY'));
else
insert into swap_fixings values (get_token(line,1),to_date(get_token(line,2),'DD/MM/YYYY'),get_token(line,3));
end if;
end loop;
EXCEPTION
WHEN utl_tcp.end_of_input THEN
NULL;
end;
utl_tcp.close_connection(conn);
commit;
declare
ligne varchar2(2000);
corps varchar2(7000);
begin
ligne :=' DATA SWAP INSERTION : '
|| UTL_TCP.crlf || UTL_TCP.crlf
|| RPAD ('TICKER',30,' ')
|| RPAD ('INFO_DATE',40,' ')
|| RPAD ('LAST_PRICE',10,' ');
corps := ligne || UTL_TCP.crlf;
for x in (select ticker,to_char(info_date,'DD/MM/YYYY') "INFO_DATE",LAST_PRICE from SWAP_FIXINGS where trunc(info_date) = v_date)
loop
ligne :=
RPAD (x.TICKER, 30, ' ')
||RPAD (x.info_date,40 ,' ')
||RPAD (x.LAST_PRICE,10,' ');
corps := corps || ligne || UTL_TCP.crlf;
end loop;
corps := '<pre>' || corps || '</pre>';
debug(corps);
end;
EXCEPTION
WHEN e_Non_Numeric then
null;
when OTHERS THEN
v_ErrorNumber := SQLCODE;
v_ErrorText := SUBSTR(SQLERRM, 1, 200);
declare
ligne varchar2(2000);
corps varchar2(7000);
begin
ligne := RPAD (v_ErrorText, 200, ' ');
corps := corps || ligne || UTL_TCP.crlf;
corps := '<pre>' || corps || '</pre>';
debug(corps);
end;
end;
/ -
ORA-02068: following severe error from - How to handle the overgiven Except
Hello again ^^,
hope its okay to write the follwnig question into a new Thread...
I sometimes get errors from remote dbs.
ORA-02068: following severe error from DBLINK
ORA-01089: immediate shutdown in progress - no operations are permitted
ORA-02068: following severe error from DBLINK
ORA-03113: end-of-file on communication channelThese are in one sqlerm. Is it possible to handle the second errors without string operations?
Thanks and regards
Edited by: user10283133 on 28.10.2008 08:33
Try to force the headlineThe remote db is accessible from 6 am to 6 pm. When querring longer than given time span I get the Error ORA-02068. In the sqlerm for this Error is a second Errormessage from an second different Error concatenated.
Now I will tell what I think is happening:
I think the remote db say: >>I will go sleep now<< an throws Error A (ORA-01089 (or ORA-03113, or what else)). This Error A goes to the local db. The local db get the Error A and throw a new Error (Error B = ORA-02068). This Error B is independet from Error A. And I see a String which is "Error B + Error A"
I recieve also three possible Errormessages:
ORA-02068: following severe error from DBLINK
ORA-03113: end-of-file on communication channel
ORA-02068: following severe error from DBLINK_ODS_STBY
ORA-01089: immediate shutdown in progress - no operations are permitted
ORA-02068: following severe error from DBLINK_ODS_STBY
ORA-whatelse: what elseI can handle the ORA-02068. But my questions is, can I handle the second Error (thus Error A) without string operations?
The Relase is 10g2. Please tell me which information you still need ...
Thank you very much.
regrads -
one server using 11.2.0.1.0 under Suse Linux
configured catalog db, main db & jobs & ... almost everything with enterprise manager
keep backups 14 days
To make 14 full online dumps I had to aktive the archive mode and try to get rid of thoose unwanted additional files.
Additional I make every night (less til no db activity) a dump and compress it myself.
After some days the backupjob complain that it can not delete old files.
EM / manage all backups / crosscheck all(
CROSSCHECK BACKUPSET;
CROSSCHECK COPY;
sucessful
EM / manage all backups / delete old backups
DELETE NOPROMPT OBSOLETE;
failed.
script result
Recovery Manager: Release 11.2.0.1.0 - Production on Tue Sep 7 17:20:55 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN>
connected to target database: <SID> (DBID=773091283)
RMAN>
connected to recovery catalog database
RMAN>
echo set on
RMAN> DELETE NOPROMPT OBSOLETE;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 14 days
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=196 device type=DISK
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
Control File Copy 3831 03-AUG-10 /opt/oracle/base/product/11gR1/db/dbs/snapcf_<SID>.f
Backup Set 18750 23-AUG-10
Backup Piece 18754 23-AUG-10 /srv/ora/data/flash_recovery_area/<SID>/backupset/2010_08_23/o1_mf_nnndf_BACKUP_<SID>CH0_673c0hbp_.bkp
Backup Set 18751 23-AUG-10
Backup Piece 18755 23-AUG-10 /srv/ora/data/flash_recovery_area/<SID>/backupset/2010_08_23/o1_mf_nnndf_BACKUP_<SID>CH0_673c0hbo_.bkp
Backup Set 19479 24-AUG-10
Backup Piece 19482 24-AUG-10 /tmp/o0lm3qh9_1_1
Backup Set 19490 24-AUG-10
Backup Set 20087 24-AUG-10
Backup Piece 20089 24-AUG-10 /srv/ora/data/flash_recovery_area/<SID>/autobackup/2010_08_24/o1_mf_s_727891232_677n40r3_.bkp
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 09/07/2010 17:20:57
ORA-19606: Cannot copy or restore to snapshot control file
exit;
Recovery Manager complete.
google found some questions, but not fittung answers.
So far:
- I checked the folder & users rights.
- I found some /tmp/ files - yes I "backup" the backuped archivelogs to-delete files in /tmp - I only active archivelogmode so I can onlinebackup
- I managed to login via rman and execute DELETE OBSOLETE manual - result above.
- Actual I delete the set one by one to find the problem set. (delete backupset 12345 ) from the list manually.
Some a good idea what went wrong?
additional: Is there a way to let oracle delete the empy archvielog-directories after deleting the logs within?
18:00- the command "RMAN> BACKUP CURRENT CONTROLFILE" also fails.
Edited by: 793286 on 07.09.2010 09:00Meanwhile I managed to delete all backupsets one by one.
The problem with $ORACLE_HOME/dbs/snapcf_<SID>.f persists.
cd $ORACLE_HOME/dbs
mv snapcf_<SID>.f snapcf_<SID>.f.bak
# replaced actual dbsidname with <SID>
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 14 days
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
Control File Copy 3831 03-AUG-10 /opt/oracle/base/product/11gR1/db/dbs/snapcf_TARMED1P.f
Do you really want to delete the above objects (enter YES or NO)? y
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 09/08/2010 09:44:07
ORA-19606: Cannot copy or restore to snapshot control file
mv snapcf_<SID>.f.bak snapcf_<SID>.fRMAN> backup current controlfile;
Starting backup at 08-SEP-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 08-SEP-10
channel ORA_DISK_1: finished piece 1 at 08-SEP-10
piece handle=/srv/ora/data/flash_recovery_area/TARMED1P/backupset/2010_09_08/o1_mf_ncnnf_TAG20100908T095000_68gj1b2m_.bkp tag=TAG20100908T095000 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-SEP-10
Starting Control File and SPFILE Autobackup at 08-SEP-10
piece handle=/srv/ora/data/flash_recovery_area/TARMED1P/autobackup/2010_09_08/o1_mf_s_729165003_68gj1d1b_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 08-SEP-10
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 14 days
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
Control File Copy 3831 03-AUG-10 /opt/oracle/base/product/11gR1/db/dbs/snapcf_<SID>.f
Do you really want to delete the above objects (enter YES or NO)? y
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 09/08/2010 09:52:37
ORA-19606: Cannot copy or restore to snapshot control file
No different effect, if I changed the filename via 2nd terminal to .bak or not.
RMAN> delete controlfilecopy 3831;
will fail, if the file exists or not.
Any chance to reset/kill that file?
Is there a need to restart the dbms after rename the file? -
Forms application returns "ORA-01403 no data found" exception on Windows 7
Hi everyone,
I am currently involved in an application compatibility project for an O/S migration from Windows XP to Windows 7.
We have a legacy Oracle Dev6i P18 Forms application that has been working perfectly on Windows XP for the last decade or so. When we installed the same application on Windows 7, it returned a pop-up error message with the text: "ORA-01403 no data found" when performing a certain operation (clicking on a Submit button in a specific form). The same operation works successfully on Windows XP displaying the message "Submit has been successful".
This error is well documented and the solution involves adding an exception handler to the faulting SQL statement(s) in order to handle the ORA-01403 exception. Unfortunately, the application is composed of compiled forms (.FMX) and we no longer have the source code so I can't implement this solution.
I ran a file comparison utility (WinDiff from the Windows SDK) and confirmed that all the files in the application folder and the Oracle Dev6i P18 folder are identical on both the Windows XP and Windows 7 systems.
I enabled tracing in SQLNet.ORA by configuring TRACE_LEVEL_CLIENT=SUPPORT (I know, too verbose) and other related settings on both systems and have uploaded the traces to my SkyDrive for public viewing:
http://sdrv.ms/10BNYtI
The traces show that the "ORA-01403" exception occurs many times on both Windows XP and Windows 7 systems as a result of various SQL statements being executed, for instance:
SELECT TASK_ID,TASK_DETAIL_STATUS,ASSIGNED_DATE FROM TASK_DETAILS WHERE TASK_ID = :b1 AND TASK_DETAIL_STATUS = (SELECT ID FROM V_TASK_STATUS WHERE ABBREVIATION = 'PLANNED' ) FOR UPDATE OF TASK_DETAIL_STATUS,ASSIGNED_DATE
UPDATE TASK_DETAILS SET ASSIGNED_DATE=NTMS_UTIL.GET_SERVER_DATE,TASK_DETAIL_STATUS=(SELECT ID FROM V_TASK_STATUS WHERE ABBREVIATION = 'ASSIGNED' ) WHERE ROWID = :b1
ORA-01403: no data found.
So the same error happens on both Windows XP and Windows 7.
On Windows XP, the error is somehow handled, and does not cause the "Submit" operation to fail.
On Windows 7, however, the error bubbles to the surface and is displayed to the user, thus halting the "Submit" operation.Thank you. I'm well aware that adding an exception handler is the classic solution to the ORA-01403 error. However, like I mentioned in my original post, I don't have the source code. All I have are the compiled .FMX forms so I can't implement such a solution:
From my original post:
This error is well documented and the solution involves adding an exception handler to the faulting SQL statement(s) in order to handle the ORA-01403 exception. Unfortunately, the application is composed of compiled forms (.FMX) and we no longer have the source code so I can't implement this solution. -
How to handle the bad record while using bulk collect with limit.
Hi
How to handle the Bad record as part of the insertion/updation to avoid the transaction.
Example:
I am inserting into table with LIMIT of 1000 records and i've got error at 588th record.
i want to commit the transaction with 588 inserted record in table and log the error into
error logging table then i've to continue with transaction with 560th record.
Can anyone suggest me in this case.
Regards,
yuva>
How to handle the Bad record as part of the insertion/updation to avoid the transaction.
>
Use the SAVE EXCEPTIONS clause of the FORALL if you are doing bulk inserts.
See SAVE EXCEPTIONS in the PL/SQL Language doc
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/tuning.htm
And then see Example 12-9 Bulk Operation that continues despite exceptions
>
Example 12-9 Bulk Operation that Continues Despite Exceptions
-- Temporary table for this example:
CREATE TABLE emp_temp AS SELECT * FROM employees;
DECLARE
TYPE empid_tab IS TABLE OF employees.employee_id%TYPE;
emp_sr empid_tab;
-- Exception handler for ORA-24381:
errors NUMBER;
dml_errors EXCEPTION;
PRAGMA EXCEPTION_INIT(dml_errors, -24381);
BEGIN
SELECT employee_id
BULK COLLECT INTO emp_sr FROM emp_temp
WHERE hire_date < '30-DEC-94';
-- Add '_SR' to job_id of most senior employees:
FORALL i IN emp_sr.FIRST..emp_sr.LAST SAVE EXCEPTIONS
UPDATE emp_temp SET job_id = job_id || '_SR'
WHERE emp_sr(i) = emp_temp.employee_id;
-- If errors occurred during FORALL SAVE EXCEPTIONS,
-- a single exception is raised when the statement completes.
EXCEPTION
-- Figure out what failed and why
WHEN dml_errors THEN
errors := SQL%BULK_EXCEPTIONS.COUNT;
DBMS_OUTPUT.PUT_LINE
('Number of statements that failed: ' || errors);
FOR i IN 1..errors LOOP
DBMS_OUTPUT.PUT_LINE('Error #' || i || ' occurred during '||
'iteration #' || SQL%BULK_EXCEPTIONS(i).ERROR_INDEX);
DBMS_OUTPUT.PUT_LINE('Error message is ' ||
SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE));
END LOOP;
END;
DROP TABLE emp_temp;
Maybe you are looking for
-
FIPP object, getting error while posting document in background step
Hi Experts, Once approval is done we are posting document in background, but getting following error No batch input data for screen SAPMF05A 0607 We have delegeted object FIPP to ZFIPP and added method zpost with same code as post with some initial v
-
I bought this used I Pad 2. It still has the lady's password connected to everything- can't even upgrade her Netflix account- cause it's Her password! Ugh! Has 500 photos of her kids' crap and a bunch of Apps I don't want. And videos. What do I do
-
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] var xmlProduc
-
I'm trying to find out how to read a .txt file and simply assign its contents to a variable. Is this possible? [Edit] Right after posting I found this page which seems like it might be in the direction I want to go but I haven't checked it out comple
-
Mini Disc stuck and won't eject!
My friend just stuck one of those mini-disc things into my DVD/CD slot. (You know, those mini versions of a cd)..anyway, I've tried doing what Disc Utility said to but its not working...PLEASE HELP!!