ORA-30951 Problems
I am somewhat new to oracle and I am having a very hard time registering a large XML schema (approx 1MB). I tried the following code but I do not understand where or what the problem is. Is it with the XML schema? If so how do I find the line that it is on.
SQL>
SQL> DECLARE
2
3 -- OS file whose content needs to be read.
4 fileName VARCHAR2(50) := 'test.xsd';
5
6
7 -- Directory Object specifying the file location.
8 directoryName VARCHAR2(50) := 'SOURCE_DIR';
9
10 -- CLOB Object to hold the content of the file from the user specified di
rectory.
11 fileContent CLOB;
12
13
14 BEGIN
15 fileContent := xdb_utilities.getFileContent(fileName, directoryName);
16 dbms_xmlschema.registerSchema('test12', fileContent);
17 END;
18 /
DECLARE
ERROR at line 1:
ORA-30951: Element or attribute at Xpath /schema/simpleType[149]/annotation/appi
nfo[2][@] exceeds maximum length
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
ORA-06512: at line 16
Thanks,
Crim
Suggest you post your question in the XDB forum...
XML DB
as you will get good help from mdrake in there as he knows what he's talking about regarding XML stuff.
;)
Similar Messages
-
ORA-30951: ...exceeds maximum length
Oracle Database 10g Release 10.2.0.1.0 - Production
I am new to XML and having a problem importing data using the XML Repository. I have annotated the schema and validated it using XML Spy. I am able to register the schema w/o errors. I am now working through the issues as they occur during the insertion of xml documents. Thes section below is giving me an error (bottom) that the data exceeds the maximum length. The "DATA" in the xml doc is a pdf file that has been converted to characters by some method. The size element has a data value of 5008. Seems to be too long for a varchar2. I tried RAW, CLOB, BLOB. I was pretty sure they wouldn't work and they didn't. I get an error that the xml/xdb types are incompatible.
How can I modify the schema to get this element to load?
Is it possible to tell oracle to ignore an element so I can eliminate those that are not critical? This would be very helpful.
Thanks!
Schema -
<xs:element name="NpdbReportList" minOccurs="0">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="NpdbReport" minOccurs="0">
<xs:complexType>
<xs:all minOccurs="0">
<xs:element name="DCN" minOccurs="0"/>
<xs:element name="DateReport" type="Date" minOccurs="0"/>
<xs:element name="ReportType" type="IdRef" minOccurs="0"/>
<xs:element ref="LOB" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="LOB" xdb:SQLType="LOB_T"xdb:maintainDOM="false">
<xs:all>
<xs:element name="Type" type="IdRef"/>
<xs:element name="Size"/>
<xs:element name="Data" xdb:maintainDOM="false" xdb:SQLName="LOB_DATA" xdb:SQLType="VARCHAR2"/>
</xs:all>
</xs:complexType>
ftp> mput *
mput Smyth_Steven_1386367.XML? y
227 Entering Passive Mode (127,0,0,1,83,221)
150 ASCII Data Connection
550- Error Response
ORA-30951: Element or attribute at Xpath /Provider/NpdbReportList/NpdbReport[1]/LOB/Data exceeds maximum length
550 End Error Response
28706 bytes sent in 0.014 seconds (1.9e+03 Kbytes/s)
ftp>Thanks for your time Marco.
Here is the header:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2010 rel. 2 (http://www.altova.com) by Joe (DSI) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true" xdb:mapStringToNCHAR="true" xdb:mapUnboundedStringToLob="true">
I made the following change -
<xs:element name="Data" xdb:maintainDOM="false" xdb:SQLName="LOB_DATA" xdb:SQLType="CLOB"/>
I received this error -
ORA-31094: incompatible SQL type "CLOB" for attribute or element "Data"
ORA-06512: at "XML_TEST.XML_TEST_SCHEMA_REGISTER", line 48
I did a little more testing after the first post. I used the same type as an element that is defining image data.
<xs:element name="Data" type="xs:base64Binary" xdb:maintainDOM="false" xdb:SQLName="LOB_DATA" xdb:SQLType="BLOB"/>
While this did register and I was able to load a record, I am guessing that this will render the data for this element usless but at least the record loads. I'll still need to resolve this issue as the .pdf data is important.
Thanks
Joe -
Hi All,
I am trying to load the XML Files into a Table using the SQL Loader and i am getting the Error
Record 1: Rejected - Error on table COMMONASSETCATALOG.
ORA-30951: Element or attribute at Xpath /AC/T[1]/T[1]/T[1]/T[1]/T[1]/Doc[@] exceeds maximum length
The <Doc> Element which is child of the <T> contains an XML Schema inside it..
The Doc Element is declared in Schema as
<xs:complexType name="AsDocType">
<xs:annotation>
<xs:documentation>A (Doc)ument, a container for any type of file</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="##any" processContents="lax"/>
</xs:sequence>
<xs:attributeGroup ref="AsDocAtts"/>
</xs:complexType>
The Size of the XML Content that <Doc> Node has is around 34Kb.
Could you pls let me know how to resolve this..
Thanks
SateeshHi All,
I am trying to load the XML Files into a Table using the SQL Loader and i am getting the Error
Record 1: Rejected - Error on table COMMONASSETCATALOG.
ORA-30951: Element or attribute at Xpath /AC/T[1]/T[1]/T[1]/T[1]/T[1]/Doc[@] exceeds maximum length
The <Doc> Element which is child of the <T> contains an XML Schema inside it..
The Doc Element is declared in Schema as
<xs:complexType name="AsDocType">
<xs:annotation>
<xs:documentation>A (Doc)ument, a container for any type of file</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:any namespace="##any" processContents="lax"/>
</xs:sequence>
<xs:attributeGroup ref="AsDocAtts"/>
</xs:complexType>
The Size of the XML Content that <Doc> Node has is around 34Kb.
Could you pls let me know how to resolve this..
Thanks
Sateesh -
XML data value exceeds maximum length - ORA-30951
Hello,
I am receiving ORA-30951: Element or attribute at Xpath /dataroot/Respondent[1]/Response[3]/Value exceeds maximum length error during the XML load.
I have registered the schema and it works fine when the Value is less than 64k but fails if its greater. I tried changing the type of Value to type="xsd:base64Binary" xdb:maintainDOM="false" xdb:SQLName="LOB_DATA" xdb:SQLType="BLOB" but then I get ORA-00932: inconsistent datatypes error.
Can someone please let me know what I am doing wrong or is there a way I can load more than 64k length elements on 10g?
Thanks
Here is my schema.
var SCHEMAURL varchar2(256)
var XMLSCHEMA CLOB
set define off
begin
:SCHEMAURL := 'http://xmlns.example.com/Svy_Resp.xsd';
:XMLSCHEMA := '<?xml version="1.0"; encoding="utf-16"?>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0"; xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
<xsd:element name="dataroot" xdb:defaultTable="SVY_RESP_XML_SCHEMA" type="datarootType" />
<xsd:complexType name="datarootType" xdb:maintainDOM="false"
xdb:SQLType="Dataroot_T">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="Respondent" type="RespondentType" />
</xsd:sequence>
<xsd:attribute name="generated" type="xsd:dateTime" />
</xsd:complexType>
<xsd:complexType name="RespondentType" xdb:maintainDOM="false" xdb:SQLType="Respondent_Type">
<xsd:sequence>
<xsd:element name="RespondentID" type="xsd:int" />
<xsd:element name="KsID" type="xsd:int" />
<xsd:element name="email" type="xsd:string" />
<xsd:element name="SyID" type="xsd:int" />
<xsd:element name="KSuID" type="xsd:int" />
<xsd:element name="Completed" type="xsd:int" />
<xsd:element name="SubmitDateTime" type="xsd:dateTime" />
<xsd:element maxOccurs="unbounded" name="Response" type="ResponseType" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ResponseType" xdb:maintainDOM="false" xdb:SQLType="Response_Type">
<xsd:sequence>
<xsd:element name="ResponseID" type="xsd:int" />
<xsd:element name="RespondentID" type="xsd:int" />
<xsd:element name="CID" type="xsd:int" />
<xsd:element name="AID" type="xsd:int" />
<xsd:element name="Value" type="xsd:string"/>
<xsd:element name="QID" type="xsd:int" />
<xsd:element name="SID" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>';
end;
/Thanks for the quick response. I am not able to modify the source file, but will it be possible to set the value to NULL if it exceeds the max length instead of failure?
Thanks -
Ora-00600 problem with the kodpunp1 and kope2upic954 arguments
hi everybody,
i have a problem with ora-00600 error on a oracle 8.1.7.0.0 database on winxp.
i've read about many ora-00600 problems but only few were with kodpunp1 and kope2upic954 arguments.
In my trc files i found something like this:
*** SESSION ID:(29.2808) 2006-02-08 11:05:33.177
*** 2006-02-08 11:05:33.177
ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [kope2upic954], [], [], [], [], [], [], []
Current SQL statement for this session:
call p$insert_rules_details(:1 , :2 , :3, :4)
*** 2006-02-08 11:06:48.400
ksedmp: internal or fatal error
ORA-00600: internal error code, arguments: [kodpunp1], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kope2upic954], [], [], [], [], [], [], []
Current SQL statement for this session:
call p$insert_rules_details(:1 , :2 , :3, :4)
" so this is happenning when calling this procedure (p$insert_rules_details ...this is my procedure, not some procedure owned by sys).
if anyone can help me, pls reply. i've heard replies like: call oracle support, put a tar on metalink ..... i don't have metalink support so i appreciate real help ;)
what to do for avoiding/fixing this error?
txin addtion, this procedure p$insert_rules_details does some inserts into 3 tables from my schema. The problem might be from the usage of an num_array in this procedure declared as table of number. When number of elements from this num_array excels 4096, then the procedure generates errors.....i believe, not very sure about that. Can that be true?
by -
Ora-01000 problem not resolve with other posts
I've the ora-01000 problem which has been argued in other posts but it persist on me.
I'm using JDK 1.3 and Oracle 8i with classes12_01.zip file.
I've been looking at v$open_cursor to see how many cursors where open and even if I put
rs.close(); rs=null;
stmt.close(); stmt=null;
it still doesn't work.
Any ideas?
Thanks.Sorry. It do work. It was my fault.
null -
ORA-30951 when registering TPoX schemas
Hello,
I am trying to register the schemas for TPoX benchmark of XMLType Object Relational storage.
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://www.fixprotocol.org/FIXML-4-4 fixml-fields-base-4-4.xsd',
SCHEMADOC => bfilename('XML_FILES_DIR','fixml-fields-base-4-4.xsd'),
LOCAL => TRUE,
CSID => nls_charset_id('AL32UTF8'));
END;
I get the following error:
ORA-30951: Element or attribute at Xpath /schema/simpleType[131]/annotation/appinfo[2][@] exceeds maximum length
The element it refers to, indeed is quite large:
<xs:appinfo xmlns:x="http://www.fixprotocol.org/fixml/metadata.xsd">
<x:EnumDoc value="EUSUPRA" desc="EuroSupranationalCoupons"/>
<x:EnumDoc value="FAC" desc="FederalAgencyCoupon"/>
<x:EnumDoc value="FADN" desc="FederalAgencyDiscountNote"/>
<x:EnumDoc value="PEF" desc="PrivateExportFunding"/>
<x:EnumDoc value="SUPRA" desc="USDSupranationalCoupons"/>
<x:EnumDoc value="FUT" desc="Future"/>
<x:EnumDoc value="OPT" desc="Option"/>
<x:EnumDoc value="CORP" desc="CorporateBond"/>
<x:EnumDoc value="CPP" desc="CorporatePrivatePlacement"/>
<x:EnumDoc value="CB" desc="ConvertibleBond"/>
<x:EnumDoc value="DUAL" desc="DualCurrency"/>
<x:EnumDoc value="EUCORP" desc="EuroCorporateBond"/>
<x:EnumDoc value="XLINKD" desc="IndexedLinked"/>
<x:EnumDoc value="STRUCT" desc="StructuredNotes"/>
<x:EnumDoc value="YANK" desc="YankeeCorporateBond"/>
<x:EnumDoc value="FOR" desc="ForeignExchangeContract"/>
<x:EnumDoc value="CS" desc="CommonStock"/>
<x:EnumDoc value="PS" desc="PreferredStock"/>
<x:EnumDoc value="BRADY" desc="BradyBond"/>
<x:EnumDoc value="EUSOV" desc="EuroSovereigns"/>
<x:EnumDoc value="TBOND" desc="USTreasuryBond"/>
<x:EnumDoc value="TINT" desc="InterestStripFromAnyBondOrNote"/>
<x:EnumDoc value="TIPS" desc="TreasuryInflationProtectedSecurities"/>
<x:EnumDoc value="TCAL" desc="PrincipalStripOfACallableBondOrNote"/>
<x:EnumDoc value="TPRN" desc="PrincipalStripFromANoncallableBondOrNote"/>
<x:EnumDoc value="UST" desc="USTreasuryNoteDeprecatedValueUseTNOTE"/>
<x:EnumDoc value="USTB" desc="USTreasuryBillDeprecatedValueUseTBILL"/>
<x:EnumDoc value="TNOTE" desc="USTreasuryNote"/>
<x:EnumDoc value="TBILL" desc="USTreasuryBill"/>
<x:EnumDoc value="REPO" desc="Repurchase"/>
<x:EnumDoc value="FORWARD" desc="Forward"/>
<x:EnumDoc value="BUYSELL" desc="BuySellback"/>
<x:EnumDoc value="SECLOAN" desc="SecuritiesLoan"/>
<x:EnumDoc value="SECPLEDGE" desc="SecuritiesPledge"/>
<x:EnumDoc value="TERM" desc="TermLoan"/>
<x:EnumDoc value="RVLV" desc="RevolverLoan"/>
<x:EnumDoc value="RVLVTRM" desc="RevolverTermLoan"/>
<x:EnumDoc value="BRIDGE" desc="BridgeLoan"/>
<x:EnumDoc value="LOFC" desc="LetterOfCredit"/>
<x:EnumDoc value="SWING" desc="SwingLineFacility"/>
<x:EnumDoc value="DINP" desc="DebtorInPossession"/>
<x:EnumDoc value="DEFLTED" desc="Defaulted"/>
<x:EnumDoc value="WITHDRN" desc="Withdrawn"/>
<x:EnumDoc value="REPLACD" desc="Replaced"/>
<x:EnumDoc value="MATURED" desc="Matured"/>
<x:EnumDoc value="AMENDED" desc="AmendedRestated"/>
<x:EnumDoc value="RETIRED" desc="Retired"/>
<x:EnumDoc value="BA" desc="BankersAcceptance"/>
<x:EnumDoc value="BN" desc="BankNotes"/>
<x:EnumDoc value="BOX" desc="BillOfExchanges"/>
<x:EnumDoc value="CD" desc="CertificateOfDeposit"/>
<x:EnumDoc value="CL" desc="CallLoans"/>
<x:EnumDoc value="CP" desc="CommercialPaper"/>
<x:EnumDoc value="DN" desc="DepositNotes"/>
<x:EnumDoc value="EUCD" desc="EuroCertificateOfDeposit"/>
<x:EnumDoc value="EUCP" desc="EuroCommercialPaper"/>
<x:EnumDoc value="LQN" desc="LiquidityNote"/>
<x:EnumDoc value="MTN" desc="MediumTermNotes"/>
<x:EnumDoc value="ONITE" desc="Overnight"/>
<x:EnumDoc value="PN" desc="PromissoryNote"/>
<x:EnumDoc value="PZFJ" desc="PlazosFijos"/>
<x:EnumDoc value="STN" desc="ShortTermLoanNote"/>
<x:EnumDoc value="TD" desc="TimeDeposit"/>
<x:EnumDoc value="XCN" desc="ExtendedCommNote"/>
<x:EnumDoc value="YCD" desc="YankeeCertificateOfDeposit"/>
<x:EnumDoc value="ABS" desc="AssetbackedSecurities"/>
<x:EnumDoc value="CMBS" desc="CorpMortgagebackedSecurities"/>
<x:EnumDoc value="CMO" desc="CollateralizedMortgageObligation"/>
<x:EnumDoc value="IET" desc="IOETTEMortgage"/>
<x:EnumDoc value="MBS" desc="MortgagebackedSecurities"/>
<x:EnumDoc value="MIO" desc="MortgageInterestOnly"/>
<x:EnumDoc value="MPO" desc="MortgagePrincipalOnly"/>
<x:EnumDoc value="MPP" desc="MortgagePrivatePlacement"/>
<x:EnumDoc value="MPT" desc="MiscellaneousPassthrough"/>
<x:EnumDoc value="PFAND" desc="Pfandbriefe"/>
<x:EnumDoc value="TBA" desc="ToBeAnnounced"/>
<x:EnumDoc value="AN" desc="OtherAnticipationNotesBANGANEtc"/>
<x:EnumDoc value="COFO" desc="CertificateOfObligation"/>
<x:EnumDoc value="COFP" desc="CertificateOfParticipation"/>
<x:EnumDoc value="GO" desc="GeneralObligationBonds"/>
<x:EnumDoc value="MT" desc="MandatoryTender"/>
<x:EnumDoc value="RAN" desc="RevenueAnticipationNote"/>
<x:EnumDoc value="REV" desc="RevenueBonds"/>
<x:EnumDoc value="SPCLA" desc="SpecialAssessment"/>
<x:EnumDoc value="SPCLO" desc="SpecialObligation"/>
<x:EnumDoc value="SPCLT" desc="SpecialTax"/>
<x:EnumDoc value="TAN" desc="TaxAnticipationNote"/>
<x:EnumDoc value="TAXA" desc="TaxAllocation"/>
<x:EnumDoc value="TECP" desc="TaxExemptCommercialPaper"/>
<x:EnumDoc value="TRAN" desc="TaxRevenueAnticipationNote"/>
<x:EnumDoc value="VRDN" desc="VariableRateDemandNote"/>
<x:EnumDoc value="WAR" desc="Warrant"/>
<x:EnumDoc value="MF" desc="MutualFund"/>
<x:EnumDoc value="MLEG" desc="MultilegInstrument"/>
<x:EnumDoc value="NONE" desc="NoSecurityType"/>
<x:EnumDoc value="WLD" desc="WildcardEntry"/>
</xs:appinfo>
Which parameter should I change in order to register the schema?
Any help much appreciated!For example (code snippet)...
declare
V_FILENAME VARCHAR2(700) := 'CMFXML.SWIFT.MT543.xsd';
V_XMLSCHEMA XMLTYPE := xmltype(bfilename('XMLDIR',V_FILENAME),nls_charset_id('AL32UTF8'));
-- res boolean;
begin
dbms_xmlschema_annotate.addXDBNamespace(V_XMLSCHEMA);
dbms_xmlschema_annotate.setDefaultTable(V_XMLSCHEMA,'CMFXML','CMFXML_MT543_TABLE');
dbms_xmlschema_annotate.DISABLEDEFAULTTABLECREATION(V_XMLSCHEMA);
-- DEBUG generated xdb annotations via resource
-- if (dbms_xdb.existsResource('/public/'||V_FILENAME)) then
-- dbms_xdb.deleteResource('/public/'||V_FILENAME);
-- end if;
-- res := dbms_xdb.createResource('/public/'||V_FILENAME,V_XMLSCHEMA);
dbms_xmlschema.registerSchema
schemaurl => V_FILENAME,
schemadoc => V_XMLSCHEMA.getClobVal(),
local => TRUE,
genTypes => TRUE,
genBean => FALSE,
genTables => TRUE,
enablehierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE,
owner => user
end;
declare
V_FILENAME VARCHAR2(700) := 'CMFXML.SWIFT.MT544.xsd';
V_XMLSCHEMA XMLTYPE := xmltype(bfilename('XMLDIR',V_FILENAME),nls_charset_id('AL32UTF8'));
-- res boolean;
begin
dbms_xmlschema_annotate.addXDBNamespace(V_XMLSCHEMA);
dbms_xmlschema_annotate.setDefaultTable(V_XMLSCHEMA,'CMFXML','CMFXML_MT544_TABLE');
dbms_xmlschema_annotate.DISABLEDEFAULTTABLECREATION(V_XMLSCHEMA);
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TIndicator-22F-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TAmount-19A-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TDate-98A-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TRate-92A-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TFlag-17B-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TQuantityOfFinancialInstrument-36B-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TReference-20C-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
select insertChildXML
V_XMLSCHEMA,
'//xsd:element[@type="TParty-95PQR-01"]',
'@xdb:SQLInline',
'false',
'xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
into V_XMLSCHEMA
from dual;
dbms_xmlschema_annotate.setOutOfLine(V_XMLSCHEMA,'element','ReceiveFreeConfirmationType','TwoLegTransactionDetails','MT544_TWO_LEG_TRANS_TABLE');
dbms_xmlschema_annotate.setOutOfLine(V_XMLSCHEMA,'element','ReceiveFreeConfirmationType','TradeDetails','MT544_TRADE_DETAILS_TABLE');
dbms_xmlschema_annotate.setOutOfLine(V_XMLSCHEMA,'complexType','TTradeDetails','FinancialInstrumentAttributes','MT544_FIN_INST_ATTRS_TABLE');
-- DEBUG generated xdb annotations via resource
-- if (dbms_xdb.existsResource('/public/'||V_FILENAME)) then
-- dbms_xdb.deleteResource('/public/'||V_FILENAME);
-- end if;
-- res := dbms_xdb.createResource('/public/'||V_FILENAME,V_XMLSCHEMA);
dbms_xmlschema.registerSchema
schemaurl => V_FILENAME,
schemadoc => V_XMLSCHEMA.getClobVal(),
local => TRUE,
genTypes => TRUE,
genBean => FALSE,
genTables => TRUE,
enablehierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE,
owner => user
end;
-- -
Hi!!
During insert an xml doc I'm getting the error:
ORA-30951: Element or attribute at Xpath /Security/SecurityInformation/FundInformation/TotalAssets exceeds maximum length
This is the part of the xml doc:
<Security id="16850" xmlns="http://mydb/security_v1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mydb/security_v1.1 security.xsd">
<Symbol>AAAGX</Symbol>
<Name>AAL Aggressive Growth A</Name>
<ShortName>AAAGX</ShortName>
<SecurityType>Stock Fund</SecurityType>
<SecurityInformation>
<FundInformation>
<FundFamily>AAL Mutual Funds</FundFamily>
<Sector>Healthcare</Sector>
<Industry>Advertising</Industry>
<Industry>ElectricUtilities</Industry>
<AssetGroup>Large Growth</AssetGroup>
<Category Capitalization="Small" Class="Value"/>
<ExpenseRatio>0.62</ExpenseRatio>
<TotalAssets>34423803904</TotalAssets>
<MinInitialInvestment>10000</MinInitialInvestment>
<MinSubsequentInvestment>100</MinSubsequentInvestment>
</FundInformation>
And this is the part of the schema:
<xsd:element name="FundInformation">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FundFamily" type="xsd:string"/>
<xsd:element name="Sector" type="security:SectorType" minOccurs="0"/>
<xsd:element name="Industry" type="security:IndustryType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="AssetGroup" type="xsd:string"/>
<!--xsd:choice-->
<xsd:element name="Category" type="security:CategoryType" minOccurs="0"/>
<xsd:element name="FixedIncome" type="security:FixedIncomeType" minOccurs="0"/>
<!--/xsd:choice-->
<xsd:element name="ExpenseRatio" type="security:SecurityDecimalType"/>
<xsd:element name="TotalAssets" type="security:SecurityDecimalType"/>
<xsd:element name="MinInitialInvestment" type="xsd:integer" minOccurs="0"/>
<xsd:element name="MinSubsequentInvestment" type="xsd:integer" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
What did I wrong?
Thanks for your help!!In this case I think SPY is wrong
SQL>
SQL>
SQL> var schemaURL varchar2(64);
SQL> --
SQL> begin
2 :schemaURL := 'security.xsd';
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
2 /
Call completed.
SQL> declare
2 xmlSchema xmltype := xmltype(
3 '<?xml version="1.0" encoding="UTF-8"?>
4 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:security="http://mydb/security_v
1.1" targetNamespace="http://mydb/security_v1.1" elementFormDefault="qualified" attributeFormDefault="unqualified">
5 <xsd:element name="FundInformation" xdb:defaultTable="FUND_TABLE">
6 <xsd:complexType xdb:SQLType="FUND_T">
7 <xsd:sequence>
8 <xsd:element name="FundFamily" type="xsd:string"/>
9 <xsd:element name="Sector" type="xsd:string" minOccurs="0"/>
10 <xsd:element name="Industry" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
11 <xsd:element name="AssetGroup" type="xsd:string"/>
12 <xsd:element name="Category" type="xsd:string" minOccurs="0"/>
13 <xsd:element name="FixedIncome" type="xsd:decimal" minOccurs="0"/>
14 <xsd:element name="ExpenseRatio" type="security:SecurityDecimalType"/>
15 <xsd:element name="TotalAssets" type="security:SecurityDecimalType"/>
16 <xsd:element name="MinInitialInvestment" type="xsd:integer" minOccurs="0"/>
17 <xsd:element name="MinSubsequentInvestment" type="xsd:integer" minOccurs="0"/>
18 </xsd:sequence>
19 </xsd:complexType>
20 </xsd:element>
21 <xsd:simpleType name="SecurityDecimalType">
22 <xsd:restriction base="xsd:decimal">
23 <xsd:minInclusive value="0"/>
24 <xsd:totalDigits value="13"/>
25 <xsd:fractionDigits value="4"/>
26 </xsd:restriction>
27 </xsd:simpleType>
28 </xsd:schema>');
29 begin
30 dbms_xmlSchema.registerSchema(:schemaURL,xmlSchema);
31 end;
32 /
PL/SQL procedure successfully completed.
SQL> desc FUND_TABLE
Name Null? Type
TABLE of SYS.XMLTYPE(XMLSchema "security.xsd" Element "FundInformation") STORAGE Object-relational TYPE "FUND_T"
SQL> --
SQL> desc FUND_T
Name Null? Type
SYS_XDBPD$ XDB.XDB$RAW_LIST_T
FundFamily VARCHAR2(4000 CHAR)
Sector VARCHAR2(4000 CHAR)
Industry Industry8403_COLL
AssetGroup VARCHAR2(4000 CHAR)
Category VARCHAR2(4000 CHAR)
FixedIncome NUMBER
ExpenseRatio NUMBER(13,4)
TotalAssets NUMBER(13,4)
MinInitialInvestment NUMBER(38)
MinSubsequentInvestment NUMBER(38)
SQL> --
SQL> insert into FUND_TABLE values ( xmltype(
2 '<FundInformation xmlns="http://mydb/security_v1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://my
db/security_v1.1 security.xsd">
3 <FundFamily>AAL Mutual Funds</FundFamily>
4 <Sector>Healthcare</Sector>
5 <Industry>Advertising</Industry>
6 <Industry>ElectricUtilities</Industry>
7 <AssetGroup>Large Growth</AssetGroup>
8 <Category/>
9 <ExpenseRatio>0.62</ExpenseRatio>
10 <TotalAssets>34423803904</TotalAssets>
11 <MinInitialInvestment>10000</MinInitialInvestment>
12 <MinSubsequentInvestment>100</MinSubsequentInvestment>
13 </FundInformation>'))
14 /
insert into FUND_TABLE values ( xmltype(
ERROR at line 1:
ORA-30951: Element or attribute at Xpath /FundInformation/TotalAssets exceeds
maximum length
SQL>
SQL>
SQL> var schemaURL varchar2(64);
SQL> --
SQL> begin
2 :schemaURL := 'security.xsd';
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
2 /
Call completed.
SQL> declare
2 xmlSchema xmltype := xmltype(
3 '<?xml version="1.0" encoding="UTF-8"?>
4 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:security="http://mydb/security_v
1.1" targetNamespace="http://mydb/security_v1.1" elementFormDefault="qualified" attributeFormDefault="unqualified">
5 <xsd:element name="FundInformation" xdb:defaultTable="FUND_TABLE">
6 <xsd:complexType xdb:SQLType="FUND_T">
7 <xsd:sequence>
8 <xsd:element name="FundFamily" type="xsd:string"/>
9 <xsd:element name="Sector" type="xsd:string" minOccurs="0"/>
10 <xsd:element name="Industry" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
11 <xsd:element name="AssetGroup" type="xsd:string"/>
12 <xsd:element name="Category" type="xsd:string" minOccurs="0"/>
13 <xsd:element name="FixedIncome" type="xsd:decimal" minOccurs="0"/>
14 <xsd:element name="ExpenseRatio" type="security:SecurityDecimalType"/>
15 <xsd:element name="TotalAssets" type="security:SecurityDecimalType"/>
16 <xsd:element name="MinInitialInvestment" type="xsd:integer" minOccurs="0"/>
17 <xsd:element name="MinSubsequentInvestment" type="xsd:integer" minOccurs="0"/>
18 </xsd:sequence>
19 </xsd:complexType>
20 </xsd:element>
21 <xsd:simpleType name="SecurityDecimalType">
22 <xsd:restriction base="xsd:decimal">
23 <xsd:minInclusive value="0"/>
24 <xsd:totalDigits value="15"/>
25 <xsd:fractionDigits value="4"/>
26 </xsd:restriction>
27 </xsd:simpleType>
28 </xsd:schema>');
29 begin
30 dbms_xmlSchema.registerSchema(:schemaURL,xmlSchema);
31 end;
32 /
PL/SQL procedure successfully completed.
SQL> desc FUND_TABLE
Name Null? Type
TABLE of SYS.XMLTYPE(XMLSchema "security.xsd" Element "FundInformation") STORAGE Object-relational TYPE "FUND_T"
SQL> --
SQL> desc FUND_T
Name Null? Type
SYS_XDBPD$ XDB.XDB$RAW_LIST_T
FundFamily VARCHAR2(4000 CHAR)
Sector VARCHAR2(4000 CHAR)
Industry Industry8404_COLL
AssetGroup VARCHAR2(4000 CHAR)
Category VARCHAR2(4000 CHAR)
FixedIncome NUMBER
ExpenseRatio NUMBER(15,4)
TotalAssets NUMBER(15,4)
MinInitialInvestment NUMBER(38)
MinSubsequentInvestment NUMBER(38)
SQL> --
SQL> insert into FUND_TABLE values ( xmltype(
2 '<FundInformation xmlns="http://mydb/security_v1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://my
db/security_v1.1 security.xsd">
3 <FundFamily>AAL Mutual Funds</FundFamily>
4 <Sector>Healthcare</Sector>
5 <Industry>Advertising</Industry>
6 <Industry>ElectricUtilities</Industry>
7 <AssetGroup>Large Growth</AssetGroup>
8 <Category/>
9 <ExpenseRatio>0.62</ExpenseRatio>
10 <TotalAssets>34423803904</TotalAssets>
11 <MinInitialInvestment>10000</MinInitialInvestment>
12 <MinSubsequentInvestment>100</MinSubsequentInvestment>
13 </FundInformation>'))
14 /
1 row created.
SQL>
SQL>
SQL>The original definition of SecurityDecimalType is a total 13 digits, with 4 reserved for fractional values, leaving 9 digits for the non fractional value. Your instance document contains a non fractional value with 11 digits. As can be seen if we alter the definition to allow for a total of 15 digits then everything works as expected.
I also checked and the XDB schema validator does not catch this issue either. I will file a bug on the schema validator for this issue. -
My code is giving me ora-01843 problem. When i put startdate as 01-jan-05 and
enddate as 31-jan-05, it gives me error. Please help me guys.
--declare
--ntwk_var varchar2(100);
SELECT PHY.PHYNAM,
decode (NETWORKPROTOCOL.LCC, 'Y', '<Lombardi Cancer Center>', '') ||
decode (NETWORKPROTOCOL.UMH, 'Y', ' <Union Memorial Hospital>', '') ||
decode (NETWORKPROTOCOL.GSH, 'Y', '<Good Somaritan Hospital>', '') ||
decode (NETWORKPROTOCOL.FSH, 'Y', '<Franklin Square Hospital>', '') ||
decode (NETWORKPROTOCOL.WHC, 'Y', '<Washington Hospital Center>', '') ||
decode (NETWORKPROTOCOL.HH, 'Y', '<Harbor Hospital>', '') as NETWORKID,
PRTCRC.FULLNAME,
CRCMTG.CRMTGDT, CRCMTG.CRCSTAT, PRTCRC.SUBMITTEDTOIRB,
PRTCRC.RECEIVEDIRBRESULTDATE,
PRTCRC.PRT, prtcrc.crcid,
PRTCRC.REVIEWSTATUS,
CRCMTG.CRCOUTCOME,
PRTCRC.REVIEWTYPE,
PRTCRC.MODIFICATIONDATE, PRTCRC.FINALIRBAPPROVALDATE,
PRTCRC.ACTIVATIONDATE, RECENTREAPPROVALDATE.RECENTREAPPROVAL,
recentamendmentdate.amenddate,
PRTCRC.CLOSURETOPATIENTACCRUAL, PRTCRC.TERMINATIONDATE,
prttype.descrip
FROM CRCMTG, PRTCRC, NETWORKPROTOCOL, RECENTREAPPROVALDATE, PHY, prttype, recentamendmentdate
WHERE
((CRCMTG.PRTCRCID(+)=PRTCRC.ID) AND
(NETWORKPROTOCOL.PRTCRCID(+)=PRTCRC.ID) AND
(PRTCRC.PRINCIPALINVESTIGATOR=PHY.PHY(+))
AND (PRTCRC.ID=RECENTREAPPROVALDATE.PRTCRCID(+))
AND (PRTCRC.ID=recentamendmentdate.PRTCRCID(+))
) and
TO_DATE('01'||SUBSTR(LTRIM( NVL(PRTCRC.CRCID, TO_CHAR(sysdate, 'MMYYYY'))) , 1, 6), 'DDMMYYYY') >= :startdate
and
TO_DATE('01'||SUBSTR(LTRIM( NVL(PRTCRC.CRCID, TO_CHAR(sysdate, 'MMYYYY'))) , 1, 6), 'DDMMYYYY') <= :enddate
) and
prtcrc.type=prttype.id(+) and
fullname is not null
order by &SORTas Andrew had mentioned you are trying to convert a numeric into date that might not be in date format. for example you had a value of 482334
SQL> select substr(ltrim('482334'),1,6)
2 from dual;
SUBSTR
482334then you tried to convert it into date format
SQL> select to_date(substr(ltrim('482334'),1,6),'ddmmyyyy')
2 from dual;
select to_date(substr(ltrim('482334'),1,6),'ddmmyyyy')
ERROR at line 1:
ORA-01847: day of month must be between 1 and last day of month
SQL> it will give you an error. what is the datatype for your column PRTCRC.CRCID? -
I have on a database running on Unix True64 a database link to another database. Also a True64 machine. The Oracle version is 8.1.7.0.0.
What happens is that I get a ora-12705 problem. Yes I know this has to do with NLS environment setting. But I doubt this is the case with this one. Look at the example:
unix> sqlplus /
SQL> select count(*) from zfindau;
select count(*) from zfindau
ERROR at line 1:
ORA-12705: invalid or unknown NLS parameter value specified
ORA-02063: preceding line from HUBD
SQL> connect system/<password>
SQL> connect /
SQL> select count(*) from zfindau;
COUNT(*)
74991
So under Unix I connect to an ops$ account. The zfindau is a synonym to the remote database table. First I do the select statement and get the ORA-12705 error. After I connect to a different user (system, or any other user available), do nothing and directly connect to the ops$account the same sql statement does work.
Does anyone of you know what's going on here.
Andre Seesinkanyone??
-
ORA-01552 problem, plz help it's urgent
Actually, before one week I made (run Norton QuikScan) & this ended by the ORA-01033 problem, I realized that the file (E:\ORACLE\PRODUCT\10.2.\ORADATA\ORCL\UNDOTBS01.DBF)
was corrupted, so I dropped it from the (Dos command Prompt), then the system generated it again and then everything was excellent.
After that I couldn't create any new tables.
NB. I've more than 30 large table.
then i got the ORA-01552 problem,
cannot use system rollback segment for non-system tablespace...
i did this:(
& i got this error:
SQL> alter system set undo_management=manual scope=spfile;
System altered.
SQL> shutdown immediate;
ORA-00376:file 2 cannot be read at this time
ORA-01110:data file 2:
'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF'
SQL> select name, status, BLOCK_SIZE from v$datafile;
NAME
STATUS BLOCK_SIZE
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
SYSTEM 8192
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
RECOVER 8192
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
ONLINE 8192
NAME
STATUS BLOCK_SIZE
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
ONLINE 8192
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
ONLINE 8192
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDO01.DBF
ONLINE 8192
i need to solve it...:(
is it correct to uninstall the ORACLE & install it again.
thanks in advance.ORA-01033 ORACLE initialization or shutdown in progress
Cause: An attempt was made to log on while Oracle is being started or shut down.
Action: Wait a few minutes. Then retry the operation.
Does not mean your datafile was corrupted!! You meed to recover the undo dbf. It does not have anything to do with reinstalling Oracle. You can restore from hot backup and recover the db, or drop and recreate the undo ts at mount. -
Character set Conversion (US7ASCII to AL32UTF8) -- ORA-31011 problem
Hello,
We've run into some problems as part of our character set conversion from US7ASCII to AL32UTF8. The latest problem is that we have a query that works in US7ASCII, but after converting to AL32UTF8 it no longer works and generates an ORA-31011 error. This is very concerning to us as this error indicates an XML parsing problem and we are doing no XML whatsoever in our DB. We do not have XML columns (nor even CLOBs or BLOBs) nor XML tables and it's not XMLDB.
For reference, we're running 11.2.0.2.0 over Solaris.
Has anyone seen this kind of problem before?
If need be, I'll find a way to post table definitions. However, it's safe to assume that we are only using DATE, VARCHAR2 and NUMBER column types in these tables. All of the tables are local to the DB.
ThanksWe converted using the database using scripts I developed. I'm not quite sure how we converted is relevant, other than saying that we did not use the Oracle conversion utility (not csscan, but the GUI Java tool).
A summary:
1) We replaced the lossy characters by parsing a csscan output file
2) After re-scanning with csscan and coming up clean, our DBA converted the database to AL32UTF8 (changed the parameter file, changing the character set, switched the semantics to char, etc).
3) Final step was changing existing tables to use char semantics by changing the table schema for VARCHAR2 columns
Any specific steps I cannot easily answer, I worked with a DBA at our company to do this work. I handled the character replacement / DDL changes and the DBA ran csscan & performed the database config changes.
Our actual error message:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00210: expected '<' instead of '�Error at line 1
31011. 00000 - "XML parsing failed"
*Cause: XML parser returned an error while trying to parse the document.
*Action: Check if the document to be parsed is valid.
Error at Line: 24 Column: 15
This seems to match the the document ID referenced below. I will ask our DBA to pull it up and review it.
Please advise if more information is needed from my end. -
ORA-29855 problem with creation of a index
Hi to all,
I'm trying to create an index but I have this problem:
SQL>CREATE INDEX ITALIA_NODE_IDX ON ITALIA_NODE$(GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
CREATE INDEX ITALIA_NODE_IDX ON ITALIA_NODE$(GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in spatial index: [mdrcrtxfergm]
ORA-13249: Error in spatial index: [mdpridxtxfergm]
ORA-29400: data cartridge error
ORA-01653: unable to extend table M2_10A70$$.1024 by SPATIAL in tablespace USERS
ORA-06512: a "MDSYS.SDO_INDEX_METHOD_10I", line 10
What do you think about this problem?
thank you in advance.
Crystal
Edited by: crystal13 on 18-giu-2010 2.03Hi,
it looks like your tablespace USERS is to small. You have no space left. So extend the size of the tablespace by enlarging the file underneath or putting a second one to it, or put the tablespace in AUTOEXTEND mode. See the administrators guide: http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tspaces.htm#i1010516 -
ORA-00313 problem, thank you very much!!
Hi, there,
when I use OEM standalone to login the database, I found there is an error:
ORA-00313:open failed for members of log group1 of thred 1
ORA-00312:online log 1 thread 1 "c:\oracle-database-server\oradata\redo01.log"
then I can't open the database and only can mount it.
and then I found all the other databases on my local machine have the exact same problem. at the same time, I found the service of OracleOracle9iDB_serveManagementServer can't startup. whenever I want to start it, it warn me "start and stop, becuase there is no work connect to it". so I doublt it seems there is something wrong with my operation system, but not the database's problem. my os is WIN XP PRO.
does there anyone who knows the reason and how can I solve it? besides, can I backup the database in mount status and how?
thank you very much for any hint!
I do need you help, thank you so much!!Does c:\oracle-database-server\oradata\redo01.log exist? Once I met a guy, who, as he said, deleted unnecessary log files :-)
-
ORA-00312 problem, thank you very much!
Hi, there,
when I use OEM standalone to login the database, I found there is an error:
ORA-00313:open failed for members of log group1 of thred 1
ORA-00312:online log 1 thread 1 "c:\oracle-database-server\oradata\redo01.log"
then I can't open the database and only can mount it.
and then I found all the other databases on my local machine have the exact same problem. at the same time, I found the service of OracleOracle9iDB_serveManagementServer can't startup. whenever I want to start it, it warn me "start and stop, becuase there is no work connect to it". so I doublt it seems there is something wrong with my operation system, but not the database's problem. my os is WIN XP PRO.
does there anyone who knows the reason and how can I solve it? besides, can I backup the database in mount status and how?
thank you very much for any hint!
I do need you help, thank you so much!!Please repost this in one of the database forums, unfortunately most of us on the JDev team are better at Java than database issues.
Here's the URL to the general RDBMS forum here on OTN:
General Database Discussions
Hope this helps,
Rob
Maybe you are looking for
-
Upgrading MacBook Pro to new machine want to unistall. No disc.
-
Has anyone had an issue with apple tvs producing sound but no picture over apple tv's? I have tried 10 other devices thru my reciever and all work just fine over hdmi. But both of my apple tv's do not. Any Ideas? I can give details but in a nutshell
-
Final Cut Pro 10.0.0.9 Crashes on Export -- PLEASE HELP!
Hello Everyone. I recently upgraded one of my user's mac pro tower to Mountain Lion from Snow Leopard. The user cannot export in any way. We've tried different projects and different users. Repairing permissions, deleting preferences and even a clean
-
Why can't I sync ringtones on my iphone with itunes? Using iOS7 and iTunes11.
I can't seem to find a way to sync my ringtones on to my iPhone. I'm syncing all ringtones. I've tried syncing selected ringtones with all selected. I've tried turning the phone off and back on, unplugged and replugged into my computer (Windows 7).
-
hi, i have a SB Creative Audigy, its been a while since iv been getting distortion though all my speakers (logitech G5) and sometimes its crackling, i know its not the speakers as iv tested them with another sound card (Creative USB 5. Surround and w