ORA-03123: operation would block
Hi ,
while application is running, if network connection to oracle server lost. I got the following Error Message 'ORA-03123:operation would block'. If I got this error message.Next Time when i tries to Open Recordset my application gives 'Access violation' Error in SQLExecute Call inside the PrepareandExecute method of CRecordset Calss and application crashes. I have no idea of why this error coming and the application crashing?. Please help to solve this issue.
Thanks & Regards,
Kannan Arumugam.
Mail id: [email protected]
Increasing the TEMP tablespace size should have no effect on your situation. If you are indeed issuing calls after the connection has been dropped, no configuration changes on the database could possibly have an effect on the situation.
Once the ODBC driver indicates that the connection has been lost, you need to make a new connection before doing anything else. The ODBC driver uses OCI (Oracle Call Interface) to actually communicate with the database, and OCI gets very unhappy if you try to do anything after a connection has been lost. The behavior is undefined in this situation-- you may see your ORA-03123 or any other error(s) before the eventual access violation.
Justin
Similar Messages
-
Oracle Error ORA 03123 (operation would block)
I get this error when I try to access data from a oracle sql clientt software tools sqldeveloper and TOAD
The strange thing is if I use Oracle SQL*plus, it works fine. This problem will be occuring only in VIS Oracle EBS R12.1 database 11.1.0.7.
In the database side i checked the locks and ran the gather schema stats didn't help.
In the client side.. I reinstalled the Oracle client 11g and sqldevelper 3.1 on Windows XP service pack 3. didn't help
The strange thing is from the sql develope when i ran
select * from fnd_user --- it runs forever and get erro ORA-3123 and freezes.
select USER_ID,USER_NAME from fnd_user - Works fine.
Please help on this.>
Yes. i went through that .. didn't help.
>
Well it would have helped if you didn't ignore what Justin said in that link.
The message is telling you that if you do that operation it will block.
So your response is to try the operation anyway and the result is
>
select * from fnd_user --- it runs forever and get erro ORA-3123 and freezes.
>
Surprise - the operation blocked! Which is what 'it runs forever' means.
You need to determine what is holding the lock and resolve that issue. -
ORA-22290: operation would exceed the maximum number of opened files or LOB
i am getting this error in a procedure.
ORA-22290: operation would exceed the maximum number of opened files or LOBs
22290, 00000, "operation would exceed the maximum number of opened files or LOBs"
// *Cause: The number of open files or LOBs has reached the maximum limit.
// *Action: Close some of the opened files or LOBs and retry the operation.
NAME TYPE VALUE
session_max_open_files integer 10
Procuedure:
CREATE OR REPLACE PROCEDURE WMSOWN."PROC_WMS_XML_READ"
P_EVENT_KEY IN VARCHAR2,
X_STATUS_MSG OUT VARCHAR2,
X_STATUS OUT NUMBER
)AS
l_parser dbms_xmlparser.Parser;
domdoc xmldom.DOMDocument;
nodelist XMLDOM.DOMNODELIST;
node XMLDOM.DOMNODE;
n_child XMLDOM.DOMNODE;
elements XMLDOM.DOMELEMENT;
name_node_map XMLDOM.DOMNAMEDNODEMAP;
parent_seg varchar2(4000);
tag_name_bkp varchar2(4000); -- LOOK OUT BRAD IS CODING AGAIN
chile_seg VARCHAR2(4000);
p_seg VARCHAR2(4000);
p_seg1 VARCHAR2(4000);
p_seg2 VARCHAR2(30);
p_int_name VARCHAR2(50);
col_value VARCHAR2(100):=NULL;
len1 NUMBER;
cnt NUMBER;
seg_id_bkp NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
sequence_bkp NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
prev_sequence NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
prev_seq_set VARCHAR2(3); --brad coding
parent_id number; ---brad coding
valid_seg NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
data_status VARCHAR2(10);
v_main_seg VARCHAR2(50);
v_seq_no NUMBER;
V_CLOBLOCATOR CLOB;
V_FILELOCATOR BFILE;
v_amount_to_load NUMBER;
dest_offset NUMBER := 1;
src_offset NUMBER := 1;
lang_context NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
warning NUMBER;
v_event_name USR_OUB_FILE_PROCESS_DETAILS.EVENT_NAME%TYPE;
v_file_name USR_OUB_FILE_PROCESS_DETAILS.FILE_NAME%TYPE;
DIRECTORY_PATH_INVALID EXCEPTION;
PRAGMA EXCEPTION_INIT(DIRECTORY_PATH_INVALID,-22285);
NO_PRIVILEGES EXCEPTION;
PRAGMA EXCEPTION_INIT(NO_PRIVILEGES,-22286);
INVALID_DIRECTORY EXCEPTION;
PRAGMA EXCEPTION_INIT(INVALID_DIRECTORY,-22287);
FILE_NOT_FOUND EXCEPTION;
PRAGMA EXCEPTION_INIT(FILE_NOT_FOUND,-22289);
P_DIRECTORY VARCHAR2(50) :='WMS_XML_DIR_OUB';
v_whid poldat_view.wh_id%type;
BEGIN
--NAME : PROC_WMS_XML_READ.PLS
--DESCRIPTION :
-- Procedure PROC_WMS_XML_READ search XML files from remote location.
-- Open,Parse and Read XML files. Store all XML values into tables.
-- Developed by Dharmesh Patidar(jw782)
-- History: New condition is added i.e. p_seg:=parent_seg to maintain PARENT and CHILD relationship
-- by Vishwanath Dubey(jl246) on 17-June-2011
-- BRAD_XML_DEBUG table removed for CLEANING Activity by DHARMESH PATIDAR(JW782) ON 29-JUNE-2011.
/*BLOCK FOR CAPTURING EVENT NAME BASED ON EVENT ID START*/
BEGIN
SELECT event_name,file_name,WAREHOUSE_ID
INTO v_event_name, v_file_name,v_whid
FROM usr_oub_file_process_details
WHERE event_id=p_event_key
AND process_flag='U';
EXCEPTION
WHEN NO_DATA_FOUND THEN
x_status_msg:=SQLCODE||':'||' Error while selecting event name and event id in Procedure PROC_WMS_XML_READ : Record is not available in USR_OUB_FILE_PROCESS_DETAILS table for event id '|| P_EVENT_KEY;
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
WHEN TOO_MANY_ROWS THEN
x_status_msg:=SQLCODE||':'||' Error while selecting event name and event id in Procedure PROC_WMS_XML_READ : More than one Records found in USR_OUB_FILE_PROCESS_DETAILS table for event id '|| P_EVENT_KEY;
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
WHEN VALUE_ERROR THEN
x_status_msg:=SQLCODE||':'||' Error while selecting event name and event id in Procedure PROC_WMS_XML_READ : Varibale length is small or data type mismatch while selecting event id and event name in USR_OUB_FILE_PROCESS_DETAILS table for event id '|| P_EVENT_KEY;
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
WHEN OTHERS THEN
x_status_msg:=SQLCODE||':'||'Error in Procedure PROC_WMS_XML_READ while selecting event name and event id ';
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
END;
/*BLOCK FOR CAPTURING EVENT NAME BASED ON EVENT ID END*/
/*LOGIC TO READ XML FROM REMOTE LOCATION START*/
DBMS_LOB.CREATETEMPORARY(V_CLOBLOCATOR, TRUE);
V_FILELOCATOR := BFILENAME(P_DIRECTORY,V_FILE_NAME);
DBMS_LOB.OPEN(V_FILELOCATOR,DBMS_LOB.FILE_READONLY);
V_AMOUNT_TO_LOAD := DBMS_LOB.GETLENGTH(V_FILELOCATOR);
DBMS_LOB.LOADCLOBFROMFILE(V_CLOBLOCATOR,
V_FILELOCATOR ,
V_AMOUNT_TO_LOAD,
DEST_OFFSET,
SRC_OFFSET,
0,
LANG_CONTEXT,
WARNING);
dbms_lob.close(V_FILELOCATOR);
/*LOGIC TO READ XML FROM REMOTE LOCATION END*/
/*Temporary Code to help with debug Clear the table before populating it with new data*/
--delete table BRAD_XML_DEBUG;
cnt:=1;
seg_id_bkp:=0;
data_status:='N';
v_seq_no:=0;
prev_seq_set:='NO';
/*create new parser.*/
l_parser := dbms_xmlparser.newParser;
dbms_xmlparser.parseClob(l_parser, replace(V_CLOBLOCATOR,'&','1x2x3x4x5'));
/*Parse the document and create a new DOM document.*/
domdoc :=dbms_xmlparser.getDocument(l_parser);
/* get all elements in the DOM*/
nodelist := XMLDOM.getElementsByTagName(DOMDoc, '*');
len1 := XMLDOM.getLength(nodelist);
/* loop through elements of the DOM */
FOR j in 1..len1-1 LOOP --MAIN LOOP START
BEGIN
/*below sql will fetch Node from table to travel xml data*/
BEGIN
SELECT int_name,tag_name
INTO p_int_name, p_seg1
FROM usr_wms_tag_det
WHERE int_name=v_event_name
AND seq_no =cnt;
EXCEPTION
--PLEASE DO NOT HANDLE ANY EXCEPTION APART MENTIONED BELOW
WHEN OTHERS THEN
NULL;
END;
IF cnt=1 THEN
v_main_seg:=p_seg1;
END IF;
EXCEPTION
--PLEASE DO NOT HANDLE ANY EXCEPTION APART MENTIONED BELOW
WHEN no_data_found THEN
null;
WHEN OTHERS THEN
x_status_msg:=SQLCODE||':'||'Error in Procedure PROC_WMS_XML_READ while selecting interface name and tag name'||sqlerrm;
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
END;
/*LOGICS TO READ XML START*/
node:=XMLDOM.item(nodelist, j);
elements:=XMLDOM.makeElement(node);
parent_seg:=(xmldom.getTagName(elements));
tag_name_bkp:=(xmldom.getTagName(elements));
name_node_map:=xmldom.getAttributes(node);
n_child:=xmldom.getFirstChild(node);
col_value:=xmldom.getNodeValue(n_child);
/*get the sequence number from the interface hierarchy table */
SELECT count(1)
INTO valid_seg
FROM usr_wms_tag_det
WHERE int_name=v_event_name
AND tag_name = tag_name_bkp;
if valid_seg>0 then
begin
SELECT seq_no
INTO sequence_bkp
FROM usr_wms_tag_det
WHERE int_name=v_event_name
AND tag_name = tag_name_bkp;
seg_id_bkp:=seg_id_bkp+1;
p_seg:=parent_seg;--Modified by Vishwanath Dubey dated 16-jun-2011
end;
end if;
if prev_seq_set = 'NO' then
begin
prev_sequence := sequence_bkp;
prev_seq_set := 'YES';
end;
end if;
if sequence_bkp < prev_sequence then --you just moved up level(s) in the message structure
begin
select max(seg_id)
into parent_id
from usr_wms_global_xml_det
where seg_sequence = sequence_bkp-1;
prev_sequence := sequence_bkp;
end;
end if;
if sequence_bkp > prev_sequence then --you just moved down a level in the message structure
parent_id := seg_id_bkp-1;
prev_sequence := sequence_bkp;
end if;
/*end getting the hierarchy table sequence */
/*LOGICS TO READ XML END */
IF (parent_seg =p_seg1) or (parent_seg=p_seg2) THEN
if parent_seg=v_main_seg then
v_seq_no:=v_seq_no+1;
end if;
BEGIN
/* INSERTING DATA LOGICS TO READ XML END */
INSERT INTO usr_wms_global_xml_det values(p_int_name,tag_name_bkp,parent_seg,seg_id_bkp,sequence_bkp,parent_id,'','','',J,v_seq_no,data_status,cnt);
EXCEPTION
WHEN OTHERS THEN
x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ while inserting records in USR_WMS_GLOBAL_XML_DET table for interface name and parent segment '||P_INT_NAME||','||PARENT_SEG;
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
END ;
p_seg:=parent_seg;
p_seg2:=P_SEG1;
cnt:=cnt+1;
ELSE
chile_seg:=parent_seg;
BEGIN
/* INSERTING DATA LOGICS TO READ XML END */
INSERT INTO usr_wms_global_xml_det values(p_int_name,tag_name_bkp,p_seg,seg_id_bkp,sequence_bkp,parent_id,'',chile_seg,replace(TRIM(Col_Value),'1x2x3x4x5','&'),J,v_seq_no,data_status,cnt);
EXCEPTION
WHEN OTHERS THEN
x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ while inserting records in USR_WMS_GLOBAL_XML_DET table for interface name and parent segment '||P_INT_NAME||','||PARENT_SEG;
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
END;
END IF;
END LOOP; --MAIN LOOP END
dbms_xmldom.freeDocument(DOMDoc);
x_status:=0;
EXCEPTION
WHEN DIRECTORY_PATH_INVALID THEN
x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ DIRECTORY PATH IS INVALID';
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
WHEN FILE_NOT_FOUND THEN
x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ INVALID XML FILE NAME OR FILE DOES NOT EXISTS';
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
WHEN NO_PRIVILEGES THEN
x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ Insufficient privileges on file or directory NAME- '||p_directory||' to perform FILEOPEN operation.';
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
RETURN;
WHEN OTHERS THEN
x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ '|| SQLERRM;
x_status:=SQLCODE;
proc_wms_error_trace(v_whid, --warehouse id
null , --event id
v_event_name , --event name
x_status, --error code
x_status_msg ); --error message
dbms_xmlparser.freeParser(l_parser);
dbms_xmldom.freeDocument(DOMDoc);
RETURN;
END PROC_WMS_XML_READ;
Edited by: user13427480 on Feb 8, 2013 7:08 PMwhen you post sql statement use also similar threads :
ORA-22290: operation would exceed the maximum number of opened files or LOB
https://kr.forums.oracle.com/forums/thread.jspa?messageID=10842417 -
Error: Operation would Block
Does anyone know what this error is a symptom of?
>
Yes. i went through that .. didn't help.
>
Well it would have helped if you didn't ignore what Justin said in that link.
The message is telling you that if you do that operation it will block.
So your response is to try the operation anyway and the result is
>
select * from fnd_user --- it runs forever and get erro ORA-3123 and freezes.
>
Surprise - the operation blocked! Which is what 'it runs forever' means.
You need to determine what is holding the lock and resolve that issue. -
Need advice on ORA-01578: ORACLE data block corrupted
We have a development database server version- 10.2.0.3 with materialized views refresh as complete every morning. Yesterday we had a power failure and the server went down and database was shutdown unexpectedly.
When we restarted the database after the server restarted, we found some of the datablocks got corrupted . Following were the exceptions that we saw in the alert.log.
Errors in file /i01_01/app/oracle/product/10.2.0/db_1/admin/orcl9/bdump/orcl9_smon_7547.trc:
ORA-01578: ORACLE data block corrupted (file # 11, block # 257712)
ORA-01110: data file 11: '/i01_01/app/oracle/product/10.2.0/oradata/orcl9/ts_gen_data_02.dbf'
ORACLE Instance orcl9 (pid = 8) - Error 1578 encountered while recovering transaction (9, 38) on object 54463
I tried the following query to see the segment type.
select owner, segment_name, segment_type from dba_extents where file_id =11 and 257712 between block_id and block_id + blocks - 1;
OWNER
SEGMENT_NAME
SEGMENT_TYPE
VISH
INVENTORY_TXN
TABLE
where " INVENTORY_TXN " is a materialized view that was using the block that got corrupted. I can always recreate the MV by dropping and recreating it. Will it solve the problem???
If not, how can I recover/repair the block.???
Can anyone advice on this. Thanks very much in advance.To recover a corrupted block,the best way out is to use Blockrecover command of RMAN. So you would need RmAN backup to perform the operation.But first ypu you need to ensure that this is a persistent error or not? Is this error is coming repeatedly or just once it happened?
About Blockrecover command,read here,
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmrecov005.htm#BRADV157
HTH
Aman.... -
Database Block Size Smaller Than Operating System Block Size
Finding that your database block size should be in multiples of your operating system block size is easy...
But what if the reverse of the image below were the case?
What happens when you store an Oracle Data Block that is 2 KB in an 8 KB Operating System Block? Does it waste 6 KB or are there 4 Oracle Data Blocks stored in 1 Operating System Block?
Is it different if you use ASM?
I'd like to introduce a 2 KB block size into a RAC Exadata environment for a small set of highly transactional tables and indexes to reduce contention on blocks being requested in the Global Cache. I've witnessed horrendous wait times for a plethora of sessions when a block was highly active.
One index in particular has a column that indicates the "state" of the record, it is a very dense index. Records will flood in, and then multiple processes will poll, do work, and change the state of the record. The record eventually reaches a final state and is never updated again.
I know that I can fill up the block with fluff by adjusting the percent free, percent used, and initrans, but that seems like a lazy hack to me and I'd like to do it right if possible.
Any thoughts or wisdom is much appreciated.
"The database requests data in multiples of data blocks, not operating system blocks."
"In contrast, an Oracle block is a logical storage structure whose size and structure are not known to the operating system."
http://docs.oracle.com/cd/E11882_01/server.112/e25789/logical.htm#BABDCGIBBut what if the reverse of the image below were the case?
What happens when you store an Oracle Data Block that is 2 KB in an 8 KB Operating System Block? Does it waste 6 KB or are there 4 Oracle Data Blocks stored in 1 Operating System Block?
Is it different if you use ASM?
I'd like to introduce a 2 KB block size into a RAC Exadata environment for a small set of highly transactional tables and indexes to reduce contention on blocks being requested in the Global Cache. I've witnessed horrendous wait times for a plethora of sessions when a block was highly active.
One index in particular has a column that indicates the "state" of the record, it is a very dense index. Records will flood in, and then multiple processes will poll, do work, and change the state of the record. The record eventually reaches a final state and is never updated again.
I know that I can fill up the block with fluff by adjusting the percent free, percent used, and initrans, but that seems like a lazy hack to me and I'd like to do it right if possible.
Any thoughts or wisdom is much appreciated.
"The database requests data in multiples of data blocks, not operating system blocks."
"In contrast, an Oracle block is a logical storage structure whose size and structure are not known to the operating system."
http://docs.oracle.com/cd/E11882_01/server.112/e25789/logical.htm#BABDCGIB
You could have answered your own questions if you had just read the top of the page in that doc you posted the link for
>
At the finest level of granularity, Oracle Database stores data in data blocks. One logical data block corresponds to a specific number of bytes of physical disk space, for example, 2 KB. Data blocks are the smallest units of storage that Oracle Database can use or allocate.
An extent is a set of logically contiguous data blocks allocated for storing a specific type of information. In Figure 12-2, the 24 KB extent has 12 data blocks, while the 72 KB extent has 36 data blocks.
>
There isn't any 'wasted' space using 2KB Oracle blocks for 8KB OS blocks. As the doc says Oracle allocates 'extents' and an extent, depending on your space management, is going to be a substantial multiple of blocks. You might typically have extents that are multiples of 64 KB and that would be 8 OS blocks for your example. Yes - it is possible that the very first OS block and the very last block might not map exactly to the Oracle blocks but for a table of any size that is unlikely to be much of an issue.
The single-block reads used for some index accesses could affect performance since the read of a 2K Oracle block will result in an 8K OS block being read but that 8K block is also likely to be part of the same index.
The thing is though that an index entry that is 'hot' is going to be hot whether the block it is in is 2K or 8K so any 'contention' for that entry will exist regardless of the block size.
You will need to conduct tests using a 2K (or other) block and cache size for your index tablespaces and see which gives you the best results for your access patterns.
You should use the standard block size for ALL tablespaces unless you can substantiate the need for a non-standard size. Indexes and LOB storage are indeed the primary use cases for uses non-standard block sizes for one or more tablespaces. Don't forget that you need to allocate the appropriate buffer cache. -
ORA-15196: invalid ASM block header
asm alert shows:
WARNNING: cache read a corrupted block group=1(CRSDG) dsk=0 blk=2 from disk 0(CRSVOL)
Errors in file /u01/app/11.2.0/grid/log/diag/asm/+asm/+ASM1/trace/+ASM1_rbal_16585.trc:
ORA-15196: invalid ASM block header [kfc.c:25578] [endian_kfbh] [2147483648] [2] [0 != 1]
ORA-15196: invalid ASM block header [kfc.c:25427] [endian_kfbh] [2147483648] [2] [0 != 1]
Here are my challenges to the answer providers and I am going to number my questions. You are welcome to answer any question listed below, just please quota my question number first. Thanks.
1) "cache read a corrupted block group" , what exactly is the "cache" here?
2) "group=1(CRSDG) dsk=0 blk=2 from disk 0(CRSVOL)" we know that ASM is stored in AUs, here only gives dsk=0, blk=2, but without knowing the AU number, how can I use kfed to read the proper block?
3) "kfc.c:25578" what is kfc.c? I can find explanation about kfbh.<>, kfdhdb.<>, but have no clue about what kfc.c is.
4) "[endian_kfbh] [2147483648] [2] [0 != 1]" I know endian_kfbh is about the platform's Endian, but what is 2147483648 referring to here?
5) "[endian_kfbh] [2147483648] [2] [0 != 1]" I am guessing [2] refers to block number 2, is this correct?
6) overall, is all it is trying to tell me is "the plaform should be in small endian (1), but now it is marked as big endian(2) at some header place"?
7) of course, I would appreciate your solutions very much. you solution is ...?
8) Is there any good article reference about these stuff?
lisingt every single questions of mine is my favorite seeking help style. Doing this help learn better. I am expecting your contributions.
Thanks in advance!1) "cache read a corrupted block group" , what exactly is the "cache" here?
I think I need not ask this question. Cache here simply means reading the block from disk to the cache.
However, questions 2 ~ 7 are still valid. -
ORA-03123 while using UTL_FILE package in oracle forms 10g
hi all,
i have created a directory 'REPORTS' as 'E:\EXCEL_TESTING_FORM\' and give grant read,write this directory to scott.
and also given grant execute on UTL_FILE to scott;
i have written this code in a button-pressed trigger and my file name is somename.xls file
After printing the first line like 7369SMITH3000 in a single cell when it is going to print the second employee record it is showing
ORA-03123 inside the loop.
CURSOR EMP_DATA IS
SELECT * FROM SCOTT.EMP;
C_REF EMP_DATA%ROWTYPE;
L_FILE UTL_FILE.FILE_TYPE;
V_PATH VARCHAR2(200) := '';
BEGIN
V_PATH := 'REPORTS';
L_FILE := UTL_FILE.FOPEN (V_PATH,P_FILE_NAME, 'W');
OPEN EMP_DATA;
LOOP
FETCH EMP_DATA INTO C_REF;
EXIT WHEN EMP_DATA%NOTFOUND;
UTL_FILE.PUT_LINE(L_FILE, TO_CHAR(C_REF.EMPNO));
UTL_FILE.PUT_LINE(L_FILE, C_REF.ENAME);
UTL_FILE.PUT_LINE(L_FILE, TO_CHAR(C_REF.SAL));
END LOOP;
CLOSE EMP_DATA;
UTL_FILE.FFLUSH(L_FILE);
UTL_FILE.FCLOSE(L_FILE);
please guide me how to avoid that error and also how to print cell wise why because it is print in a single cell.
please reply...hi Andreas Weiden,
No it is not a network-drive. i have total 0f 3 drives
one is of c drive for wind sp2 and in d i have loaded oracle database and i have created a directory on e drive i.e 'E:\EXCEL_TESTING_FORM\'
in that i have created a excel file i.e called taru.xls.
so i want to know where is the problem.
please reply... -
ORA-00349: failure obtaining block size for '+Z' in Oracle XE
Hello,
I am attempting to move the online redo log files to a new flash recovery area location created on network drive "Z" ( Oracle Database 10g Express Edition Release 10.2.0.1.0).
When I run @?/sqlplus/admin/movelogs; in SQL*Plus as a local sysdba, I get the following errors:
ERROR at line 1:
ORA-00349: failure obtaining block size for '+Z'
ORA-06512: at line 14
Please let me know how to go about resolving this issue.
Thank you.
See below for detail:
Connected.
SQL> @?/sqlplus/admin/movelogs;
SQL> Rem
SQL> Rem $Header: movelogs.sql 19-jan-2006.00:23:11 banand Exp $
SQL> Rem
SQL> Rem movelogs.sql
SQL> Rem
SQL> Rem Copyright (c) 2006, Oracle. All rights reserved.
SQL> Rem
SQL> Rem NAME
SQL> Rem movelogs.sql - move online logs to new Flash Recovery Area
SQL> Rem
SQL> Rem DESCRIPTION
SQL> Rem This script can be used to move online logs from old online
log
SQL> Rem location to Flash Recovery Area. It assumes that the database
SQL> Rem instance is started with new Flash Recovery Area location.
SQL> Rem
SQL> Rem NOTES
SQL> Rem For use to rename online logs after moving Flash Recovery
Area.
SQL> Rem The script can be executed using following command
SQL> Rem sqlplus '/ as sysdba' @movelogs.sql
SQL> Rem
SQL> Rem MODIFIED (MM/DD/YY)
SQL> Rem banand 01/19/06 - Created
SQL> Rem
SQL>
SQL> SET ECHO ON
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL> declare
2 cursor rlc is
3 select group# grp, thread# thr, bytes/1024 bytes_k
4 from v$log
5 order by 1;
6 stmt varchar2(2048);
7 swtstmt varchar2(1024) := 'alter system switch logfile';
8 ckpstmt varchar2(1024) := 'alter system checkpoint global';
9 begin
10 for rlcRec in rlc loop
11 stmt := 'alter database add logfile thread ' ||
12 rlcRec.thr || ' size ' ||
13 rlcRec.bytes_k || 'K';
14 execute immediate stmt;
15 begin
16 stmt := 'alter database drop logfile group ' || rlcRec.grp;
17 execute immediate stmt;
18 exception
19 when others then
20 execute immediate swtstmt;
21 execute immediate ckpstmt;
22 execute immediate stmt;
23 end;
24 execute immediate swtstmt;
25 end loop;
26 end;
27 /
declare
ERROR at line 1:
ORA-00349: failure obtaining block size for '+Z'
ORA-06512: at line 14
Can someone point me in the right direction as to what I may be doing wrong here - Thank you!888442 wrote:
I am trying to drop and recreate ONLINE redo logs on my STANDB DATABASE (11.1.0.7)., but i am getting the below error.
On primary, we have done the changes., ie we added new logfile with bigger size and 3 members. When trying to do the same on Standby we are getting this error.
Our database is in Active DG Read only mode and the oracle version is 11.1.0.7.
I have deffered the log apply and cancelled the managed recovery, and dg is in manual mode.
SQL> alter database Add LOGFILE GROUP 4 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M;
alter database Add LOGFILE GROUP 4 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M
ERROR at line 1:
ORA-00349: failure obtaining block size for '+DT_DG1'First why you are dropping & recreating online redo log files on standby.
On standby only standby redo log files will be used. Not sure what you are trying to do.
here is example how to create online redo log files, Check that diskgroup is mounted and have sufficient space to create.
sys@ORCL> select member from v$logfile;
MEMBER
C:\ORACLE\ORADATA\ORCL\REDO03.LOG
C:\ORACLE\ORADATA\ORCL\REDO02.LOG
C:\ORACLE\ORADATA\ORCL\REDO01.LOG
sys@ORCL> alter database add logfile group 4 (
2 'C:\ORACLE\ORADATA\ORCL\redo_g01a.log',
3 'C:\ORACLE\ORADATA\ORCL\redo_g01b.log',
4 'C:\ORACLE\ORADATA\ORCL\redo_g01c.log') size 10m;
Database altered.
sys@ORCL> select member from v$logfile;
MEMBER
C:\ORACLE\ORADATA\ORCL\REDO03.LOG
C:\ORACLE\ORADATA\ORCL\REDO02.LOG
C:\ORACLE\ORADATA\ORCL\REDO01.LOG
C:\ORACLE\ORADATA\ORCL\REDO_G01A.LOG
C:\ORACLE\ORADATA\ORCL\REDO_G01B.LOG
C:\ORACLE\ORADATA\ORCL\REDO_G01C.LOG
6 rows selected.
sys@ORCL>
Your profile:-
888442
Newbie
Handle: 888442
Status Level: Newbie
Registered: Sep 29, 2011
Total Posts: 12
Total Questions: 8 (7 unresolved)
Close the threads if answered, Keep the forum clean. -
ORA-00349: failure obtaining block size
I am trying to drop and recreate ONLINE redo logs on my STANDB DATABASE (11.1.0.7)., but i am getting the below error.
On primary, we have done the changes., ie we added new logfile with bigger size and 3 members. When trying to do the same on Standby we are getting this error.
Our database is in Active DG Read only mode and the oracle version is 11.1.0.7.
I have deffered the log apply and cancelled the managed recovery, and dg is in manual mode.
SQL> alter database Add LOGFILE GROUP 1 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M;
alter database Add LOGFILE GROUP 1 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M
ERROR at line 1:
ORA-00349: failure obtaining block size for '+DT_DG1'888442 wrote:
I am trying to drop and recreate ONLINE redo logs on my STANDB DATABASE (11.1.0.7)., but i am getting the below error.
On primary, we have done the changes., ie we added new logfile with bigger size and 3 members. When trying to do the same on Standby we are getting this error.
Our database is in Active DG Read only mode and the oracle version is 11.1.0.7.
I have deffered the log apply and cancelled the managed recovery, and dg is in manual mode.
SQL> alter database Add LOGFILE GROUP 4 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M;
alter database Add LOGFILE GROUP 4 ('+DT_DG1','+DT_DG2','+DT_DG3') SIZE 1024M
ERROR at line 1:
ORA-00349: failure obtaining block size for '+DT_DG1'First why you are dropping & recreating online redo log files on standby.
On standby only standby redo log files will be used. Not sure what you are trying to do.
here is example how to create online redo log files, Check that diskgroup is mounted and have sufficient space to create.
sys@ORCL> select member from v$logfile;
MEMBER
C:\ORACLE\ORADATA\ORCL\REDO03.LOG
C:\ORACLE\ORADATA\ORCL\REDO02.LOG
C:\ORACLE\ORADATA\ORCL\REDO01.LOG
sys@ORCL> alter database add logfile group 4 (
2 'C:\ORACLE\ORADATA\ORCL\redo_g01a.log',
3 'C:\ORACLE\ORADATA\ORCL\redo_g01b.log',
4 'C:\ORACLE\ORADATA\ORCL\redo_g01c.log') size 10m;
Database altered.
sys@ORCL> select member from v$logfile;
MEMBER
C:\ORACLE\ORADATA\ORCL\REDO03.LOG
C:\ORACLE\ORADATA\ORCL\REDO02.LOG
C:\ORACLE\ORADATA\ORCL\REDO01.LOG
C:\ORACLE\ORADATA\ORCL\REDO_G01A.LOG
C:\ORACLE\ORADATA\ORCL\REDO_G01B.LOG
C:\ORACLE\ORADATA\ORCL\REDO_G01C.LOG
6 rows selected.
sys@ORCL>
Your profile:-
888442
Newbie
Handle: 888442
Status Level: Newbie
Registered: Sep 29, 2011
Total Posts: 12
Total Questions: 8 (7 unresolved)
Close the threads if answered, Keep the forum clean. -
Hi,
I am running into a data corruption issue.
My database is:
SQL> select banner from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
The following information is written to the alert.log File
alert.log File
Mon Nov 07 17:24:12 2011
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
IMODE=BR
ILAT =27
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production.
ORACLE_HOME = /home/oracle/dbhome
System name: Linux
Node name: dbl-ora
Release: 2.6.18-274.3.1.el5 (This is rhel5.7 or CentOs5.7)
Version: #1 SMP Tue Sep 6 20:14:03 EDT 2011
Machine: i686 / vm
Mon Nov 07 19:42:14 2011
Corrupt Block Found
TSN = 0, TSNAME = SYSTEM
RFN = 1, BLK = 52346, RDBA = 4246650
OBJN = 225, OBJD = 225, OBJECT = IDL_UB1$, SUBOBJECT =
SEGMENT OWNER = SYS, SEGMENT TYPE = Table Segment
Errors in file /home/oracle/diag/rdbms/ora11/K/trace/K_ora_5425.trc (incident=11053):
ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
Incident details in: /home/oracle/diag/rdbms/ora11/K/incident/incdir_11053/K_ora_5425_i11053.trc
I was even able to detect the row that is generating the issue.
In my case the obj# 33573 until 33577 are causing the issue,
though I have no idea what sort of objects are affected.
SQL> select * from idl_ub1$ where obj#=33572;
OBJ# PART VERSION PIECE# LENGTH P
33572 1 0 0 9032 F
SQL> select * from idl_ub1$ where obj#=33573;
ERROR:
ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
no rows selected
SQL> select * from idl_ub1$ where obj#=33577;
ERROR:
ORA-01578: ORACLE data block corrupted (file # 1, block # 52358)
ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
no rows selected
SQL> select * from idl_ub1$ where obj#=33578;
OBJ# PART VERSION PIECE# LENGTH P
33578 1 0 0 9032 F
Any idea, how to fix this problem without recreating the whole database?
Thanks in advance.
wmager
Edited by: magerxr on Nov 7, 2011 8:27 AMmagerxr wrote:
Thanks again for your quick advise.
Here comes the result of dbv against my system tablespace.
[oracle@dbl-ora ~]$ dbv FILE=/home/oracle/oradata/ora11/system01.dbf
DBVERIFY: Release 11.2.0.3.0 - Production on Mon Nov 7 22:39:11 2011
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /home/oracle/oradata/ora11/system01.dbf
Page 52346 is influx - most likely media corrupt
Corrupt block relative dba: 0x0040cc7a (file 1, block 52346)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x0040cc7a
last change scn: 0x0000.0010acfa seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x00000000
check value in block header: 0x8fda
computed block checksum: 0xaafbselect owner, segment_type, segment_name from dba_extents
where file_id = 1 and 52346 between block_id and block_id+blocks-1;
>
Page 52347 is marked corrupt
Corrupt block relative dba: 0x0040cc7b (file 1, block 52347)
Bad header found during dbv:
Data in bad block:
type: 1 format: 6 rdba: 0x0000a206
last change scn: 0xacfa.0040cc7b seq: 0x10 flg: 0x00
spare1: 0xfa spare2: 0xac spare3: 0x401
consistency value in tail: 0x00000000
check value in block header: 0x0
block checksum disabled
select owner, segment_type, segment_name from dba_extents
where file_id = 1 and 52347 between block_id and block_id+blocks-1;
Page 52361 is marked corrupt
Corrupt block relative dba: 0x0040cc89 (file 1, block 52361)
Bad header found during dbv:
Data in bad block:
type: 1 format: 6 rdba: 0x0000a206
last change scn: 0xacfb.0040cc89 seq: 0x10 flg: 0x00
spare1: 0xfb spare2: 0xac spare3: 0x401
consistency value in tail: 0x32298500
check value in block header: 0x0
block checksum disabled
select owner, segment_type, segment_name from dba_extents
where file_id = 1 and 52361 between block_id and block_id+blocks-1;
>
>
DBVERIFY - Verification complete
Total Pages Examined : 122880
Total Pages Processed (Data) : 81298
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 22307
Total Pages Failing (Index): 0
Total Pages Processed (Other): 3349
Total Pages Processed (Seg) : 1
Total Pages Failing (Seg) : 0
Total Pages Empty : 15910
Total Pages Marked Corrupt : 16
Total Pages Influx : 1
Total Pages Encrypted : 0
Highest block SCN : 4064615 (0.4064615)post results from 3 SQL above -
ORA-01578: ORACLE data block corrupted (file # 1, block # 53713)
When i tried to export data from db (Oracle 11g, 64bit on Linux)
Im getting following error
About to export specified users ...
. exporting pre-schema procedural objects and actions
EXP-00008: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-01578: ORACLE data block corrupted (file # 1, block # 53713)
ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEX P.schema_info_exp
EXP-00008: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-01578: ORACLE data block corrupted (file # 1, block # 55497)
ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_i nfo_exp
. exporting foreign function library names for user WB_APP_MANAGER
. exporting PUBLIC type synonyms
EXP-00008: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-01578: ORACLE data block corrupted (file # 1, block # 44638)
ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
EXP-00000: Export terminated unsuccessfully
I donot understand how to solve this issue Please help me to solve this issue..
Thanks891620 wrote:
When i tried to export data from db (Oracle 11g, 64bit on Linux)
Im getting following error
About to export specified users ...
. exporting pre-schema procedural objects and actions
EXP-00008: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-01578: ORACLE data block corrupted (file # 1, block # 53713)
ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEX P.schema_info_exp
EXP-00008: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-01578: ORACLE data block corrupted (file # 1, block # 55497)
ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_i nfo_exp
. exporting foreign function library names for user WB_APP_MANAGER
. exporting PUBLIC type synonyms
EXP-00008: ORACLE error 604 encountered
ORA-00604: error occurred at recursive SQL level 1
ORA-01578: ORACLE data block corrupted (file # 1, block # 44638)
ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
EXP-00000: Export terminated unsuccessfully
I donot understand how to solve this issue Please help me to solve this issue..
Thanksrun dbv against '/u02/oradata/RSDB1/system01.dbf'
& post results back here
dbv
DBVERIFY: Release 11.2.0.1.0 - Production on Fri Oct 14 20:39:11 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Keyword Description (Default)
FILE File to Verify (NONE)
START Start Block (First Block of File)
END End Block (Last Block of File)
BLOCKSIZE Logical Block Size (8192)
LOGFILE Output Log (NONE)
FEEDBACK Display Progress (0)
PARFILE Parameter File (NONE)
USERID Username/Password (NONE)
SEGMENT_ID Segment ID (tsn.relfile.block) (NONE)
HIGH_SCN Highest Block SCN To Verify (NONE)
(scn_wrap.scn_base OR scn) -
ORA-00230: operation disallowed: snapshot control file enqueue unavailable
Hi,
on 10g R2, on Win 2003
my rman backup failed (just at the end) with :
release channel 000
ORA-00230: operation disallowed: snapshot control file enqueue unavailable1-should I rerun the back up task ?
2-how to verify if this backup is correct/good ?
PS : I use nocatalog (controlfile for repository)
Thank you.1-should I rerun the back up task ?appear its failed during controlfile backup if database backup log fine than just take controlfile backup.
2-how to verify if this backup is correct/good ?in 10g ,we can see status in v$rman_status view,it also show any other running job as well.
select * from (select SID ,recid ,STATUS,operation,MBYTES_PROCESSED/1024 "GB",START_TIME,END_TIME from v$rman_status order by start_time desc) where rownum <11 -
ORA-16831: operation disallowed on this standby database type
Om my primary database, i am getting this error when i give ADD database command. How i can resolve. The difference between primary & secondary is that primary is 64bit OS and secondary is 32bit OS. Both have 12gr2 and linux.
DGMGRL> ADD DATABASE tbdb AS CONNECT IDENTIFIER IS tbdb MAINTAINED AS PHYSICAL;
Error: ORA-16831: operation disallowed on this standby database typeIt's supported till 10g. But data guard broker is not supported if you use different binaries. See support note 414043.1
Also http://emrebaransel.blogspot.com/2010/12/dataguard-on-different-operating.html -
ORA-12721: operation cannot execute when other sessions are active
Hi,
I started my DB like following :
1) Change INIT.ORA file; unset parallel_server parameter.
2) Execute these commands:
STARTUP MOUNT ;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
SHUTDOWN IMMEDIATE;
SQL> STARTUP RESTRICT pfile='C:\oracle\product\10.2.0\db_1\database\initORCL.ora';
ORACLE instance started.
SQL> alter database national character set INTERNAL_CONVERT UTF8;
alter database national character set INTERNAL_CONVERT UTF8
ERROR at line 1:
ORA-12721: operation cannot execute when other sessions are activeWhy this error when DB is opened in strict and I'm the only user ?
SQL> select count (*) from v$session;
COUNT(*)
20Any solution ?
Thank you.Hi
This operation is dangerous, please ensure that you have a full backup before doing that operation.
Please use that order :
SHUTDOWN IMMEDIATE;
-- make sure there is a database backup you can rely on, or create one
STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET <new_character_set>;
-- a alter database takes typically only a few minutes or less,
-- it depends on the number of columns in the database, not the
-- amount of data.
SHUTDOWN;
Please note that :
The command requires the database to be
open but only one session, the one executing the command, is allowed.
For the above error conditions Oracle9i will report one of the errors:
ORA-12719: operation requires database is in RESTRICTED mode
ORA-12720: operation requires database is in EXCLUSIVE mode
ORA-12721: operation cannot execute when other sessions are active
Oracle9i can also report:
ORA-12718: operation requires connection as SYS
if you are not connect as SYS (INTERNAL, "/ AS SYSDBA").
Let us know if this helps.
regards,
Hub
Edited by: Hub on Dec 10, 2008 1:22 PM
Maybe you are looking for
-
Remote 2.0 on iPad: Artists w/ over 1,000 songs don't load
I have a number of artists of whom I have 1,000+ songs. Some examples include Miles Davis, The Grateful Dead, John Coltrane, Phish, Umphrey's McGee, Led Zeppelin, etc. When pulling these artists up on the iPad app, the album titles appear but no song
-
i just got a brand new mac mini a few days ago. it works great, but i noticed a faint "chirping" sound from time to time coming from it. it's not coming out of the speaker, it still happens when the sound is muted. i can't make it happen...just happe
-
Why rmiregistry & Server must start in the same directory.
I have 2 servers & one rmiregisty for both. I want to start this servers separetely from different directories. But if I try to start server from the directory other than where I've already started rmiregistry the server doesn't bind. Please, can any
-
Internal error when downloading web service proxy jars
Hi, I have a web service created from a stateless Java class in OC4J 10.1.2. I access the web page of the service and can download the WSDL and test the services, but if I try to download the compiled or source JAR files of the client proxy I get thi
-
To open "this Java application" you need to install the legacy Java SE 6 runtime. keeps popping up every 5 seconds won't update