Oracle 11g R2, Problem Loading Spatial Data
We have a geodatabase which has been implemented by oracle spatial. it has been working quite fine since 2 years ago. Recently the data center serving our geodatabase has been upgraded on both software and hardware specifications. The handler application now has difficulty retrieving spatial data. The problem is somehow strange; only some spatial objects are loaded and then application encounters exceptions.
Previous working database engine was an Oracle 11g R1 and the new one is Oracle 11g R2. The application is a java application mostly written by swing. Here is the stack trace:
java.sql.SQLRecoverableException: No more data to read from socket
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1200)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
at oracle.jdbc.driver.T4CCallableStatement.fetch(T4CCallableStatement.java:1079)
at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:369)
at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:273)
at ir.mas.aamar.service.map.MapService.getModifiedMap(MapService.java:405)
at ir.mas.aamar.map.MapPanel.redrawLayers(MapPanel.java:504)
at ir.mas.aamar.map.LayersTree.onSnapshotDisplayCheckBoxItemChanged(LayersTree.java:420)
at ir.mas.aamar.map.LayersTree.onMouseReleased(LayersTree.java:204)
at ir.mas.aamar.map.LayersTree.access$0(LayersTree.java:188)
at ir.mas.aamar.map.LayersTree$1.mouseReleased(LayersTree.java:170)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLRecoverableException: No more data to read from socket
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1200)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1469)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:389)
at ir.mas.aamar.service.map.MapService.executeJDBCQuery(MapService.java:78)
at ir.mas.aamar.service.map.MapService.getSnapshotsForThisTermPlusHoze(MapService.java:1013)
at ir.mas.aamar.dialog.edit.EditTools.refreshLayersCombo(EditTools.java:327)
at ir.mas.aamar.dialog.edit.EditTools.refresh(EditTools.java:301)
at ir.mas.aamar.dialog.edit.EditTools.<init>(EditTools.java:103)
at ir.mas.aamar.dialog.edit.EditTools.editTools(EditTools.java:62)
at ir.mas.aamar.map.MapPanel.paintComponent(MapPanel.java:7591)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLRecoverableException: Closed Resultset: next
at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:224)
at ir.mas.aamar.service.map.MapService.getSnapshotsForThisTermPlusHoze(MapService.java:1014)
at ir.mas.aamar.dialog.edit.EditTools.refreshLayersCombo(EditTools.java:327)
at ir.mas.aamar.dialog.edit.EditTools.refresh(EditTools.java:301)
at ir.mas.aamar.dialog.edit.EditTools.<init>(EditTools.java:103)
at ir.mas.aamar.dialog.edit.EditTools.editTools(EditTools.java:62)
at ir.mas.aamar.map.MapPanel.paintComponent(MapPanel.java:7591)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at ir.mas.aamar.dialog.edit.EditTools.setTypeOfEditModel(EditTools.java:452)
at ir.mas.aamar.dialog.edit.EditTools.<init>(EditTools.java:104)
at ir.mas.aamar.dialog.edit.EditTools.editTools(EditTools.java:62)
at ir.mas.aamar.map.MapPanel.paintComponent(MapPanel.java:7591)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I read in some forums that the problem could be caused by jdbc version incompatibility, so I just copied jdbc archives from the installed oracle 11g R2 jdbc folder but the problem persists. Last thing I should mention is that only spatial data is problemistic and non-spatial data is easily loaded.
Please Help, Thanks.
Hi storm,
During the installation of oracle as you said if you have given the global password, basically this specific password will reflect to users such as
-sys
-system
-dbsnmp
-sysman
As you are new to oracle the basics that you should know is that "SYS" user is the highly privileged user in Oracle and should be logged in as "sys as sysdba" with his respective password (i.e. the global password that you have entered during database installation) to obtain his privilege. Remember to manipulate your database with caution when you are logged in as the sys user. You can log into the database using the sys user in the following way:
c\> sqlplus sys as sysdba
password: ****** --It will ask you for the password and you will have to give the global password that was given during installation
Hope this helps!!!
Regards,
Similar Messages
-
Oracle 11G Direct SQL Load with Data Guard
Does SQL Loader in direct mode always bypass the writing of redo logs ?
If the database has force logging on, will SQL Loader in direct mode bypass the writing of redo logs ?
Is there a way to run SQL Loader in direct mode that will create redo logs that can be applied by Data Guard to the backup database ?846797 wrote:
Does SQL Loader in direct mode always bypass the writing of redo logs ?
If the database has force logging on, will SQL Loader in direct mode bypass the writing of redo logs ?
Is there a way to run SQL Loader in direct mode that will create redo logs that can be applied by Data Guard to the backup database ?In case of data guard setup , redo logs will always be generated. -
Loading spatial data by sql *loader
hi there
i have a load_kat_opcina.ctl file from which i should load spatial data into my 10g db table.
load_data.ctl file is as shown below:
LOAD DATA
INFILE *
REPLACE
CONTINUEIF NEXT(1:1) = '#'
INTO TABLE KAT_OPCINA
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(KO_MBR NULLIF KO_MBR=BLANKS,
KO_SIFRA NULLIF KO_SIFRA=BLANKS,
KO_NAZIV NULLIF KO_NAZIV=BLANKS,
KO_ID NULLIF KO_ID=BLANKS,
ID NULLIF ID=BLANKS,
is_null1 FILLER CHAR,
POVRSINA COLUMN OBJECT NULLIF is_null1='E'
( sdo_gtype INTEGER EXTERNAL,
sdo_srid INTEGER EXTERNAL NULLIF POVRSINA.sdo_srid=BLANKS,
SDO_POINT COLUMN OBJECT NULLIF is_null1='C'
( X INTEGER EXTERNAL,
Y INTEGER EXTERNAL,
Z INTEGER EXTERNAL NULLIF POVRSINA.SDO_POINT.Z=BLANKS),
SDO_ELEM_INFO VARRAY terminated by ';' NULLIF is_null1='P'
(SDO_ORDINATES INTEGER EXTERNAL),
SDO_ORDINATES VARRAY terminated by ':' NULLIF is_null1='P'
(SDO_ORDINATES INTEGER EXTERNAL)
BEGINDATA
0|426|MARKU[EVEC|314717|6789094|
0|3131|VURNOVEC|16605787|6789097|
#C|2003|||||1|1005|3|1|2|1|169|......|5589490440|5082192250:
0|3034|\UR\EKOVEC|16225011|6789100|
0|35|^EHI|12297784|6789190|
#C|2003|||||1|1005|2|1|2|1|239|....|5574944600|5064714553:
0|221|ODRANSKI OBRE@|12441649|6789193|
0|353|TRPUCI|14071974|6789199|
i have deleted most of data here due to space savings.
i call sql *loader from winxp command prompt as follows:
SQLLDR CONTROL=C:\temp\load_kat_opcina.ctl, USERID=username/pswrd@sid, LOG=logfile.log,BAD==baz.bad, DISCARD=DISCARD=toss.dsc
after executing command, table 'kat_opcina' is not filled with data from this .ctl file.
the following is the content of the log file:
SQL*Loader: Release 10.2.0.1.0 - Production on Sri Svi 31 14:20:28 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: C:\TEMP\load_kat_opcina.ctl
Data File: C:\TEMP\load_kat_opcina.ctl
Bad File: C:\TEMP\baz.bad
Discard File: C:\TEMP\toss.dsc
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: 1:1 = 0X23(character '#'), in next physical record
Path used: Conventional
Table KAT_OPCINA, loaded from every logical record.
Insert option in effect for this table: REPLACE
TRAILING NULLCOLS option in effect
Column Name Position Len Term Encl Datatype
KO_MBR FIRST * | O(") CHARACTER
NULL if KO_MBR = BLANKS
KO_SIFRA NEXT * | O(") CHARACTER
NULL if KO_SIFRA = BLANKS
KO_NAZIV NEXT * | O(") CHARACTER
NULL if KO_NAZIV = BLANKS
KO_ID NEXT * | O(") CHARACTER
NULL if KO_ID = BLANKS
ID NEXT * | O(") CHARACTER
NULL if ID = BLANKS
IS_NULL1 NEXT * | O(") CHARACTER
(FILLER FIELD)
POVRSINA DERIVED * COLUMN OBJECT
NULL if IS_NULL1 = 0X45(character 'E')
*** Fields in POVRSINA
SDO_GTYPE NEXT * | O(") CHARACTER
SDO_SRID NEXT * | O(") CHARACTER
NULL if POVRSINA.SDO_SRID = BLANKS
SDO_POINT DERIVED * COLUMN OBJECT
NULL if IS_NULL1 = 0X43(character 'C')
*** Fields in POVRSINA.SDO_POINT
X NEXT * | O(") CHARACTER
Y NEXT * | O(") CHARACTER
Z NEXT * | O(") CHARACTER
NULL if POVRSINA.SDO_POINT.Z = BLANKS
*** End of fields in POVRSINA.SDO_POINT
SDO_ELEM_INFO DERIVED * ; VARRAY
NULL if IS_NULL1 = 0X50(character 'P')
*** Fields in POVRSINA.SDO_ELEM_INFO
SDO_ORDINATES FIRST * | O(") CHARACTER
*** End of fields in POVRSINA.SDO_ELEM_INFO
SDO_ORDINATES DERIVED * : VARRAY
NULL if IS_NULL1 = 0X50(character 'P')
*** Fields in POVRSINA.SDO_ORDINATES
SDO_ORDINATES FIRST * | O(") CHARACTER
*** End of fields in POVRSINA.SDO_ORDINATES
*** End of fields in POVRSINA
Record 1: Rejected - Error on table KAT_OPCINA.
ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 623
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 227
Record 2: Rejected - Error on table KAT_OPCINA.
ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 623
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 227
Record 33: Rejected - Error on table KAT_OPCINA.
ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 623
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 227
SQL*Loader-510: Physical record in data file (C:\TEMP\load_kat_opcina.ctl) is longer than the maximum(65536)
SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
Specify SKIP=33 when continuing the load.
Table KAT_OPCINA:
0 Rows successfully loaded.
33 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 215168 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 33
Total logical records rejected: 33
Total logical records discarded: 0
Run began on Sri Svi 31 14:20:28 2006
Run ended on Sri Svi 31 14:20:32 2006
Elapsed time was: 00:00:04.51
CPU time was: 00:00:00.26
error messages are all the same for record numbers: 3-32.
so, i'd like to know what am i doing wrong that table cannot be filled with data using sql *loader.
also, would like to know if there's another way of loading data into table from .ctl file (using maybe some other tool)
appreciate any help
thanksHi,
You receive:
ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-13365: layer SRID does not match geometry SRID
Have you created spatial index for table PORVSINA? I guess that yes, and you have created it with non NULL SRID value? So, ORA-13365 means that you are trying to insert spatial data with SRID that is not the same as SRID defined in spatial index.
Check index SRID and your data SRID, they must be the same. Or, you can disable spatial index.
Andrejus -
Oracle 11g AQ : problem enqueue user-defined type with varchar2 attribute
Hello.
I have a problem enqueuing a user-defined type to the queue on Oracle 10g.
I'm using jdbc driver (ojdbc5.jar, version 11.1.0.6.0) as they provide oracle.jdbc.aq package.
The type is following:
CREATE OR REPLACE TYPE FIXED_T5 AS OBJECT
(id integer,
label varchar2(100),
code integer,
today date
)I have created a java class for this type with jpub utility supplied with oracle 11g client package:
jpub -user=scott/tger -url=jdbc:oracle:thin:@host:sid-sql=FIXED_T5:ru.invito.FixedType -compile=falseIt generated FixedType.java and FixedTypeRef.java files. Don't understand why i need the latter (FixedTypeRef).
Then in test app:
package ru.invito;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Properties;
import java.util.UUID;
import junit.framework.TestCase;
import oracle.jdbc.aq.AQAgent;
import oracle.jdbc.aq.AQEnqueueOptions;
import oracle.jdbc.aq.AQFactory;
import oracle.jdbc.aq.AQMessage;
import oracle.jdbc.aq.AQMessageProperties;
import oracle.jdbc.aq.AQEnqueueOptions.DeliveryMode;
import oracle.jdbc.aq.AQEnqueueOptions.VisibilityOption;
import oracle.jdbc.driver.OracleConnection;
import oracle.jdbc.driver.OracleDriver;
import oracle.sql.Datum;
import oracle.sql.STRUCT;
import oracle.sql.StructDescriptor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class AqTest extends TestCase {
protected Log logger = LogFactory.getLog(getClass());
public void testEnqueue() throws Exception {
OracleDriver dr = new OracleDriver();
Properties prop = new Properties();
prop.setProperty("user", Config.USERNAME);
prop.setProperty("password", Config.PASSWORD);
OracleConnection connection = (OracleConnection) dr.connect(Config.JDBC_URL, prop);
assertNotNull(connection);
connection.setAutoCommit(false);
enqueueMessage(connection, "INVITO.FIXED_T5Q", null);
connection.commit();
private void enqueueMessage(OracleConnection conn, String queueName, AQAgent[] recipients) throws SQLException,
IOException {
logger.debug("----------- Enqueue start ------------");
AQMessageProperties props = makeProps(queueName);
AQMessage mesg = AQFactory.createAQMessage(props);
String msqText = String.format("Hello, %s!", queueName);
FixedType data = createData(36, msqText);
Datum d = data.toDatum(conn);
STRUCT s = (STRUCT) d;
debugStruct("s", s);
String toIdStr = byteBufferToHexString(s.getDescriptor().getOracleTypeADT().getTOID(), 20);
logger.debug("s.toIdStr: " + toIdStr);
StructDescriptor sd = StructDescriptor.createDescriptor("INVITO.FIXED_T5", conn);
logger.debug("sd.toXMLString(): " + sd.toXMLString());
mesg.setPayload(s);
AQEnqueueOptions opt = makeEnqueueOptions();
logger.debug("sending............");
// execute the actual enqueue operation:
conn.enqueue(queueName, opt, mesg);
debugMessageId(mesg);
logger.debug("----------- Enqueue done ------------");
private void debugMessageId(AQMessage mesg) throws SQLException {
byte[] mesgId = mesg.getMessageId();
if (mesgId == null) {
throw new IllegalStateException("message id is NULL");
String mesgIdStr = byteBufferToHexString(mesgId, 20);
logger.debug("Message ID from enqueue call: " + mesgIdStr);
* @return
* @throws SQLException
private FixedType createData(int ID, String label) throws SQLException {
FixedType data = new FixedType();
data._struct.setNChar(1);// initializes the flag for 'label' field
data.setId(ID);
data.setLabel(label);
data.setCode(1);
Date today = new Date();
data.setToday(new Timestamp(today.getTime()));
return data;
* @param string
* @param s
* @throws SQLException
private void debugStruct(String string, STRUCT s) throws SQLException {
logger.debug(s + ".debugString(): " + s.debugString());
logger.debug(s + "s.dump(): " + s.dump());
* @return
* @throws SQLException
private AQAgent makeAgent() throws SQLException {
AQAgent ag = AQFactory.createAQAgent();
ag.setName("AQ_TEST");
String agentAddress = null;
try {
agentAddress = InetAddress.getLocalHost().getHostAddress();
catch (UnknownHostException e) {
logger.error("cannot resolve localhost ip address. will not set it as AQ Agent address");
agentAddress = "NA";
ag.setAddress(agentAddress);
return ag;
private AQMessageProperties makeProps(String queueName) throws SQLException {
final String EXCEPTION_Q_TEMPLATE = "AQ$_%sT_E";
final int DEFAULT_DELAY = 0;
final int DEFAULT_EXPIRATION = -1;
final int DEFAULT_PRIORITY = 0;
AQMessageProperties propeties = AQFactory.createAQMessageProperties();
propeties.setCorrelation(UUID.randomUUID().toString());
propeties.setDelay(DEFAULT_DELAY);
propeties.setExceptionQueue(String.format(EXCEPTION_Q_TEMPLATE, queueName));
propeties.setExpiration(DEFAULT_EXPIRATION);
propeties.setPriority(DEFAULT_PRIORITY);
// propeties.setRecipientList(null);//should not set
propeties.setSender(makeAgent());
return propeties;
* @return
* @throws SQLException
private AQEnqueueOptions makeEnqueueOptions() throws SQLException {
AQEnqueueOptions opt = new AQEnqueueOptions();
opt.setRetrieveMessageId(true);
// these are the default settings (if none specified)
opt.setDeliveryMode(DeliveryMode.PERSISTENT);
opt.setTransformation(null);
opt.setVisibility(VisibilityOption.ON_COMMIT);
return opt;
* Form the AQ reference
* @param buffer
* @param maxNbOfBytes
* @return
private static final String byteBufferToHexString(byte[] buffer, int maxNbOfBytes) {
if (buffer == null)
return null;
int offset = 0;
StringBuffer sb = new StringBuffer();
while (offset < buffer.length && offset < maxNbOfBytes) {
String hexrep = Integer.toHexString((int) buffer[offset] & 0xFF);
if (hexrep.length() == 1)
hexrep = "0" + hexrep;
sb.append(hexrep);
offset++;
String ret = sb.toString();
return ret;
}The output is following:
[main] 2008-07-03 19:09:49,863 DEBUG [ru.invito.AqTest] - ----------- Enqueue start ------------
[main] 2008-07-03 19:09:50,348 DEBUG [ru.invito.AqTest] - [email protected](): name = INVITO.FIXED_T5 length = 4 attribute[0] = 36 attribute[1] = Hell
o, INVITO.FIXED_T5Q! attribute[2] = 1 attribute[3] = 2008-07-03 19:09:49.0
[main] 2008-07-03 19:09:50,363 DEBUG [ru.invito.AqTest] - [email protected](): name = INVITO.FIXED_T5
length = 4
ID = 36
LABEL = Hello, INVITO.FIXED_T5Q!
CODE = 1
TODAY = 2008-07-03 19:09:49.0
[main] 2008-07-03 19:09:50,363 DEBUG [ru.invito.AqTest] - s.toIdStr: 507ccce5b6e9f572e040007f01007203
[main] 2008-07-03 19:09:50,363 DEBUG [ru.invito.AqTest] - sd.toXMLString(): <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StructDescriptor sqlName="INVITO.FIXED_T5" >
<OracleTypeADT sqlName="INVITO.FIXED_T5" typecode="0" tds_version="1"
is_embedded="false" is_top_level="true" is_upt="false" finalType="true" subtype="false">
<attributes>
<attribute name="ID" type="INTEGER" >
<OracleType typecode="2" />
</attribute>
<attribute name="LABEL" type="VARCHAR2" >
<OracleType typecode="12" />
</attribute>
<attribute name="CODE" type="INTEGER" >
<OracleType typecode="2" />
</attribute>
<attribute name="TODAY" type="DATE" >
<OracleType typecode="0" />
</attribute>
</attributes>
</OracleTypeADT>
</StructDescriptor>
[main] 2008-07-03 19:09:50,379 DEBUG [ru.invito.AqTest] - sending............
[main] 2008-07-03 19:09:50,395 DEBUG [ru.invito.AqTest] - Message ID from enqueue call: 511ff143bd4fa536e040007f01003192
[main] 2008-07-03 19:09:50,395 DEBUG [ru.invito.AqTest] - ----------- Enqueue done ------------But when dequeueing the 'label' attribute is lost:
DECLARE
dequeue_options DBMS_AQ.dequeue_options_t;
message_properties DBMS_AQ.message_properties_t;
message_handle RAW(16);
message fixed_t5;
BEGIN
dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE;
DBMS_AQ.DEQUEUE(
queue_name => 'fixed_t5q',
dequeue_options => dequeue_options,
message_properties => message_properties,
payload => message,
msgid => message_handle);
DBMS_OUTPUT.PUT_LINE('ID : '||message.id);
DBMS_OUTPUT.PUT_LINE('Label: '||message.label);
DBMS_OUTPUT.PUT_LINE('Code : '||message.code);
DBMS_OUTPUT.PUT_LINE('Today: '||message.today);
COMMIT;
END;
ID : 36
Label:
Code : 1
Today: 03.07.08
Could anyone tell me what is wrong with the setup/code?
Why 'label' not saved in queue, though i saw it is not empty in STRUCT?Thank you for the reply!
I have enqueued:
[main] 2008-07-04 15:30:30,639 DEBUG [ru.invito.UserDefinedTypeAqTest$1] - [email protected](): name = INVITO.FIXED_T5
length = 4
ID = 41
LABEL = Hello, INVITO.FIXED_T5Q!
CODE = 1
TODAY = 2008-07-04 15:30:30.0and in table (select * from FIXED_T5QT) the 'label' is blank:
Q_NAME FIXED_T5Q
MSGID 51310809B5EA3728E040007F01000C79
CORRID b8f38fd3-4fa6-4e0f-85d1-2440d02d655e
PRIORITY 0
STATE 0
DELAY
EXPIRATION
TIME_MANAGER_INFO
LOCAL_ORDER_NO 0
CHAIN_NO 0
CSCN 0
DSCN 0
ENQ_TIME 04.07.2008 15:28:44
ENQ_UID INVITO
ENQ_TID 4012
DEQ_TIME
DEQ_UID
DEQ_TID
RETRY_COUNT 0
EXCEPTION_QSCHEMA AQ$_INVITO
EXCEPTION_QUEUE FIXED_T5QT_E
STEP_NO 0
RECIPIENT_KEY 0
DEQUEUE_MSGID
SENDER_NAME AQ_TEST
SENDER_ADDRESS 10.1.1.137
SENDER_PROTOCOL
USER_DATA.ID 41
USER_DATA.LABEL
USER_DATA.CODE 1
USER_DATA.TODAY 04.07.2008 15:30:30I must point to a strange thing: when the FixedType instance is created (via new operator) and then the setLabel("....") called as:
FixedType data = new FixedType();
// hack: proper initialization for 'label' field
data._struct.setNChar(1);
data.setId(ID);
data.setLabel(label);
data.setCode(1);
Date today = new Date();
data.setToday(new Timestamp(today.getTime()));
Datum d = data.toDatum(connection);
STRUCT s = (STRUCT) d;
logger.debug(s + ".debugString(): " + s.debugString());
logger.debug(s + ".dump(): " + s.dump());and if i comment line (data._struct.setNChar(1);) the debug messages for created STRUCT also shows empty value for label.
But if i explicitly call data._struct.setNChar(1) then debug contains the label i defined in call to the setLabel method. -
Oracle 11g Installation problems
Hi there, Im a new Oracle's user, and I am trying to install Oracle 11g in my computer I have Windows Vista SP2 32bits, but I have a lot of problems.
The program send me various messages of Warnings and Errors so I couldnt finished the complete instalation and configuration.
Somebody can help me with some of this errors.
This are the errors: (In Spanish)
ORA-31011: Fallo en el analisis de XML
ORA-19202: Se ha producido un error en el procesamiento
ORA-06512: en "SYS.XMLTYPE", linea 272
ORA-06512: en "XDB.XDB_CONFIGURATION", linea 69
ORA-06512: en "XDB.DBMX_XDB", linea 209
ORA-06512: en "XDB.XDB_CONFIGURATION", linea 92
La configuración de Enterprise Manager ha fallado debido al
siguiente error:
Error al iniciar Database Control
Consulte el archivo log en C:\oraclecfgtoollogsdbca\orc\emConfig.log para obtener mas información
Posteriormente, puede reintentar la configuración de esta base de datos con
Enterprise Manager ejecutando manualmente el archivo de comandos C:\oracle\product\11.1.0\db_1\bin\emca
nstaller ha instalado productos en el grupo de componentes "Oracle Windows Interfaces".
Para soportar un desarrollo perfecto en Microsoft Visual Studio con la base de datos Oracle,
Oracle recomienda descargar e instalar la última versión de
"Oracle Developer Tools for Visual Studio .NET" de Oracle Technology Network.
I will aprecciatte your help.
Thank you!user12191943 wrote:
I have Windows Vista SP2 32bitsPlease specifiy WHICH edition of Vista. Oracle does have many problems with Vista Home. -
ORACLE 11G INSTALLATION PROBLEM ON WIN7 32 bit
okay i intalled the 11g edition but quite unsuccesfully . This is the view of start menu entry
start->allprograms->oracle 11g express edition->empty
Well, it shouldn't be like this !
Can't figure out why ?
Edited by: 908289 on Jan 16, 2012 3:52 AM
Edited by: 908289 on Jan 16, 2012 7:59 AMi have the folder named oracleexe and app folder inside it . so this is what i should get as installed folders i guess !!Yes, that's what you can expect after a successful installation. Take a look in the direct ".\oracle\product\11.2.0\server" below the "app" directory. Do you see some url-link files there? (Despite several other subdirectories, of course...)
Two of them should be the "Database_homepage" and "Get_Started". Try to call them.
And Oracle XE service is started . Well, that's great. Sounds like all you lack is the links in you task menu.
i couldn't quite get you here . which software/ programs are you referring to ? The start menu entry created is shown already as it is in the problem above and installation folders are there as i mentioned above . what else ,you refferring to ?I just wanted to check whether the installer has registered the database in the Windows list. This is part of a successful installation and would offer you the opporunity to uninstall (and perhaps reinstall) the whole package.
Also , i am not sure which lOG file to check there because there are a lot of them !!As your database seems to be running as noted above, it doesn't seem to be necessary to go into these details.
You should be able to access your database, either by using the links mentioned above, or, if these failed to be created, by calling the URLs by hand, e.g.
http://127.0.0.1:8080/apex/f?p=4950 for "Get_Started" and
http://127.0.0.1:8080/htmldb for the "Database_homepage".
You should also be able to use the command line tool by calling sqlplus from a command window.
If that doesn't satisfy you or you face any errors, you could try to reinstall.
-Udo -
How to load spatial data from .shp file
Could anyone suggest an easy to use, free tool to upload spatial data from .shp file (or/and other open source spatial file sources) into an Oracle Locator database?
We have licensing for ArcGIS10, but nobody (including ArcGIS) have been able to successfully create a direct connection from their software to our Oracle 10.2 database.
Client desktops here are Windows 7 64bit, which further complicates matters (tend to find neither ArcGIS nor Oracle support 64bit OS in a cogent fashion)790951,
. . . .You can also try Oracle's ShapeFile Converter (shp2sdo). It's a command line utility so there's automation potential.
. . . .Note that ESRI's tools may (depending on how they're used) store spatial content in Oracle Spatial as BLOBs containing their ST_GEOMETRY data-type (rather than Oracle's SDO_GEOMETRY type).
Regards,
Noel -
ORACLE 11g + PHP5 problem: "fetch out of sequence" on remote database link
Hi!
I have a new server with oracle 11g (11.1.0.7) database and apache/php5 (actual build) on linux.
connection type is dedicated.
when doing a connection to a remote AS/400 database I always get this error:
"Warning: oci_fetch_array() http://function.oci-fetch-array: ORA-01002: fetch out of sequence ORA-02063: preceding line from..."
when doing the same simple "select * from database link" at my old server with oracle 9i and apache/php5 no problem occurrs.
this happens at AS/400 database link only. normal oracle database links work fine.
Anyone an idea how to solve this problem or where the problem is????
further info:
when doing " select * from [ database link ] where rownum < 11 " it works, but when doing the query with more than 10 results I get the error. Any idea?
bye,
Oliver
Edited by: user501548 on 10.10.2008 02:20well a fetch out of sequence usually indicates that a cursor has been closed before the process has finished fetching or some such thing.
I'm not aware of there being a specific problem with the situation you outline, but maybe if you could provide all the connection setup and how you are trying to connect that may give a better idea.
Also, you may be better asking on the General Database Discussions forum as this isn't really a SQL or PL/SQL problem -
How to maintain Data availability in Oracle 10g RAC when LOADING the data?
Hi
we are having Oracle 10g server on Sun Solaris(64 bit) with 8 GB RAM.
We are in need of moving the database to "Oracle 10g RAC". (Real Application Clusters)
Our doubt is when loading the data into RAC server, will it affect the application?
coz' we heared that RAC server should be down when we load the data.
Is this correct?
If yes, then How to maintain High data availability when we load the data in RAC server?? Please help me.
Thanks.First, is this the same question that a colleague of yours posted in this thread?
Data Load in RAC
Second, are other sessions querying the table that you're loading data into? If so, how are you loading the data?
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
ORACLE 11g + PHP5 problem: "fetch out of sequence" on i5/OS AS/400
Hi!
I have a big problem using a database connection to i5 AS/400 with PHP5 OCI8 interface by Oracle 11g:
when doing a simple "select * from (as400_database_link)" I get this return: "fetch out of sequence... preceding line..."
I never had this problem with 9i, old transparent gateway.
BUT:
when doing for example a "select * from (as400_database_link) where rownum < 1000000" it works fine without problems.
Anyone an idea how to eliminate this stupid "where rownum < 100000" behaviour?
I would have to add this in many select statements... ;(
bye,
OliverTach,
how do you call oci_execute ?
try oci_execute($query,OCI_DEFAULT);
I had the same problem with adodb
$q = " select * from elephant@africa";
$db->GetAll($q);
Failed with the same error.
ADODB called oci_execute with OCI_COMMIT_ON_SUCCESS,which caused my error.
$q = " select * from elephant@africa";
$db->BeginTrans();
$db->GetAll($q);
$db->CommitTrans(); (or rollback);
did the job,because BeginTrans changed oci_execute to run with OCI_DEFAULT.
Hope this helps,
gw
Edited by: unficyp123 on Oct 20, 2008 2:51 PM -
Oracle 11g Fusion Middleware Control, CGICMD.DAT
Finally, I have Weblogic and Oracle 11g Forms and Reports up and running. Now, I would like to create a Mapping Key in the CGICMD.DAT file, so that all the login information will not show up in the URL when I run a report. Can someone please tell me how to do this through the Middleware Control console? I do know that i have to go through the MBeans System to find "CgicmdConfigMXBean" but it seems like trying to find a needle in a haystack. Also, is there a specific format when creating a Mapping Key? would like to include the path, userid information for connection to the reports.
thank you,
stevenYour question belongs in {forum:id=84}
John -
Problem loading Image data with French accent in file name
We have a very complex commercial application that has been working perfectly in English for over a year. We have now localized it to French and Spanish, and discovered a serious show-stopping problem. We need help fast, with the scheduled release being less than 2 weeks away...!
We iterate over a folder to find all the images in it, then display those in a user window. The code for loading the images is:
for each (var name:String in filenames){
var image:SmoothImageTransformable = new SmoothImageTransformable();
var imagePath:String = dir + "/" + name;
image.source = imagePath;
trace("Adding Item to picture carousel with url " + image.source);
image.data = {directory:dir, filename:name};
image.isDragEnabled = true;
image.setStyle("horizontalCenter", 0);
image.setStyle("verticalCenter", 0);
_images.push(image);
Our SmoothImageTransformable class is an internal class that inherits from Image. This all works fine for image names like 'myFavoritePhoto', 'test', 'photo346', etc. However, it fails to load the data if the file name is something like 'caméra' Any name with a UTF-8 character causes the data load to fail.
To be sure we weren't doing a load somewhere else in the code that I had overlooked, I added a "image.autoLoad = false' line in there. That did exactly as expected -- all image squares then show a grey blank, with no image shown. Removing that line (reverting to the original code, as shown above) causes all the images to work perfectly, except for those with French accent characters like the é.
HELP! Is this a known bug? Is there some additional setting I need to make it understand the extended character set? I can't find any mention about this at all in the documentation.@markerline:
We have a fix! Almost... I don't understand one aspect of what I am seeing though.
We have one test file named "camèra.jpg" that is an example of what I am unable to load into an Image. I decided to examine the character codes at each letter, and this is what Flex has as the string:
name = cam?ra.jpg
[0] = c; 0x99
[1] = a; 0x97
[2] = m; 0x109
[3] = ?; 0x232
[4] = r; 0x114
[5] = a; 0x97
[6] = .; 0x46
[7] = j; 0x106
[8] = p; 0x112
[9] = g; 0x103
Note that the è prints as gibberish in the trace statement, and shows a numeric encoding of 0x232. According to
http://docstore.mik.ua/orelly/web2/action/appb_01.htm
The unicode equivalent of Latin1 for è is 0xE8, which is equivalent to 0x232. That implies that the string is already Latin1, which I would think would mean that Windoze would recognize the file name and open it properly -- but it does not.
I then tried taking the "camèra.jpg" string, pasting it into NotePad++ in a UTF8 document, then telling NotePad++ to display as ASCII. The result is "camèra". I then tried just forcing the file name within Flex to this new mangled string. The result then is:
MAGIC name = camèra
[0] = c; 0x99
[1] = a; 0x97
[2] = m; 0x109
[3] = ?; 0x195
[4] = ?; 0x168
[5] = r; 0x114
[6] = a; 0x97
[7] = .; 0x46
[8] = j; 0x106
[9] = p; 0x112
[10] = g; 0x103
Note this time the trace statement looks proper. More important, the IMAGE DOES LOAD! (Our display of the name to the user now looks like crap, but that just means I need to modify our class to have a separate 'name' property, rather than extracting it from the 'image.source')
So... my remaining question -- what encoding did I just do through that NotePad++ incantation? That site I quoted above said that it was already Latin1, which is what I thought I was trying to get to. I clearly need to write a method to map from incoming (UTF8 I thought, but maybe Latin1?) to Windows file system (Latin1 I thought, but maybe ASCII).
In other words, I am not sure what charcter set to come from or go to... It turns out the code was already in the character set I had been trying to go to (which is why it wasn't working) and the set I seem to need to go to is not the one I thought... -
Oracle 11g automatic archival // maintaining historic data
Hi Group,
We are planning to get Oracle 11g.
I want to know if Oracle 11g has the capability to do automatic archival?
My requirement is,
few of the tables in our application will have lot of records (data) and after some days/ months it might slog the performance cos of the table/db size, and also the old data will not be of much interest (but data cannot be purged/deleted until some years). Hence want to archive the old data (trigger conditions specified by the user) and will be needed to bring data back programatically whenever the user queries for the data belonging to that particular period(archived data).
Is there a feature available in Oracle to just specify the data to be archive and bring it back by giving a date/time input.Hi,
First, this looks like a job for Oracle partitioning.
What is your motive for archiving? Improved performance? Cheaper media?
I want to know if Oracle 11g has the capability to do automatic archival? Sure, but you would have to script it yourself. Many shops do time-based rollover archiving with partitioned tables:
http://www.dba-oracle.com/t_partitioned_tablespace_archiving.htm
it might slog the performance cos of the table/db sizeNo, not if you are properly indexed . . . However, table partitioning can speedup queries against large tables with "partition aware" SQL:
http://www.dba-oracle.com/t_partition_sql_index_ss_hint.htm
want to archive the old data (trigger conditions specified by the user) I would not use triggers, schedule a job instead:
http://www.dba-oracle.com/t_archiving_data_in_file_structures.htm
needed to bring data back Sorry, back from where? You are archving to disk, right? -
Why could not Oracle replicates tables which includes Spatial Data to Logical Standby?
Hi all,
Nowadays, i am working on Oracle Logical Standby Databases which includes Spatial Data? But i could not achieve to transport a table with multimedia data (with spatial data types ). But Logical Standby Databases can not support this type of tables? Is this a restriction of modelling Spatial and Geometry in data blocks? And how do i achieve this because i should use this secondary for query-only?
Kind Regards,Some data types are simply not supported by logical standby replication. Depending on the version, this might or might not include Spatial.
11.2: https://docs.oracle.com/cd/E11882_01/server.112/e41134/data_support.htm#SBYDB4936
12.1: https://docs.oracle.com/database/121/SBYDB/data_support.htm#SBYDB4936
If you need to replicate Spatial data, you need to look at other mechanisms. E.g., physical standby, materialized views, or GoldenGate. -
Hi experts
I am trying to load master data 0MATERIAL ATTR, there is no error when load into PSA but when I did load into IO it shows error as below:
Too many error records - update terminated
Example:
Record 1 :0MATERIAL : Data record 1 ('000000020000000001 '): Version '000000020000000001 ' is not valiad RSDMD 194
Please kindly advice if you have any idea how to fix the problem.
Thanks in advance
AngelHi Angel,
There might be a problem in data from source system. Check the tech spec of the info object like type length etc.in BW. then check with the data in PSA.
Hope this will help.
Assign Points if helpful
Regards,
Ramesh
Maybe you are looking for
-
Hi, I pop-up a view in a window, that contains an error message. How can i change this error message using a parameter or anything else ? Thanks in advance. Edited by: dyngry on Apr 14, 2011 2:23 PM
-
How to install Mac OS 10.7.4 onto external USB HD
My Imac is showing early show of serious bernel paroblems/crashing. (For example, it has tourned it self off then on two times, the opening or new software as well as Internet seraches are dealy slow, a large black rectangle, showed up on the desk o
-
Hi all, I get only one field data(ie frm MANDT) from report to Word doc. How can i get the record of a table. REPORT ZMGC_INT. INCLUDE OLE2INCL. DATA P_FWOR LIKE RLGRAP-FILENAME. DATA I_BUFFER TYPE . PERFORM LANZA_WORD. FORM LANZA_WORD. DATA: WORDAP
-
Hi, Require Help in SQL Loader Control File : There is a field (column) called customer line number assuming we are uploading from excel sheet , if that value is null then it should use an sequence to upload in the format of 1,2,3. Kindly do help in
-
Adding the field in selection screen
Hi Guru's, how can i add the field in selection screen of t code qa33. can any one help me pls. Thanks & Best Regards, Rakhi.