Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to update schema-base xmltype by dba?error ORA-19007

718135Aug 19 2009 — edited Aug 23 2009
Hi ,
Connect to db using user 'u1', register schema to LOCAL and update schema-base xmltype success. Then I login in db as dba, update xmltype occus ORA-19007. If I register the schema to GLOBAL, using dba to update xmltype has no problem. But how to update schema-base xmltype who's schema is register as LOCAL by dba?

connect to db using user ‘U1’:
declare
begin
dbms_xmlschema.registerSchema(
'http://www.oradev.com/myschetest.xsd',
'<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.oradev.com/myschetest.xsd"
xmlns:sch="http://www.oradev.com/myschetest.xsd"
version="1.0" elementFormDefault="qualified">
<element name = "Employee">
<complexType>
<sequence>
<element name = "EmployeeId" type = "positiveInteger"/>
<element name = "FirstName" type = "string"/>
<element name = "LastName" type = "string"/>
<element name = "Salary" type = "positiveInteger"/>
</sequence>
</complexType>
</element>
</schema>',TRUE, TRUE, FALSE, FALSE);
end;
\
SCHEMA register as LOCAL.

create table globtest(id number, content sys.xmltype)XMLTYPE content STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oradev.com/myschetest.xsd" ELEMENT "Employee";
It's OK.
insert into globtest values(1, sys.XMLType.createXML('<Employee xmlns="http://www.oradev.com/myschetest.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oradev.com/myschetest.xsd http://www.oradev.com/myschetest.xsd"><EmployeeId>1234</EmployeeId><FirstName>Ravi</FirstName><LastName>Murthy</LastName><Salary>100</Salary></Employee>'));
It's OK.
update U1.globtest set content = sys.XMLType.createXML('<Employee xmlns="http://www.oradev.com/myschetest.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oradev.com/myschetest.xsd http://www.oradev.com/myschetest.xsd"><EmployeeId>1234</EmployeeId><FirstName>'||unistr('\0080\0081')||unistr('\0085')||'Ravi</FirstName><LastName>Murthy</LastName><Salary>100</Salary></Employee>') where id=1;
It's OK.

but when i login in as dba,
using above update sql. It has probleam.ORA-19007.
How can i using dba to update this LOCAL schema-base xmltype? Thanks a lot.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2009
Added on Aug 19 2009
1 comment
1,493 views