Loading datafrom a PL/SQL table into the Database table
I have created two procedures to try and achieve the problem at hand.
It retrieves and displays the record from a DBMS_OUTPUT.PUT_LINE prospective as indicated in (1&2), but I am having difficulty loading these values into a PL/SQL table from the package labeled as (3). I read your book and all but I do not see a solution to my problem
All code compiles. (1&2) work together, (3) works by itself but will not populate the table, and I get no errors.
1.The first being the one that retrieves the XML file and parses it.
CREATE OR REPLACE procedure xml_main is
P XMLPARSER.Parser;
DOC CLOB;
v_xmldoc xmldom.DOMDocument;
v_out CLOB;
BEGIN
P := xmlparser.newParser;
xmlparser.setValidationMode(p, FALSE);
DOC := '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<com.welligent.Student.BasicStudent.Create>
<ControlAreaSync messageCategory="com.welligent.Student" messageObject="BasicStudent" messageAction="Create" messageRelease="1.0" messagePriority="1" messageType="Sync">
<Sender>
<MessageId>
<SenderAppId>com.openii.SyncRouter</SenderAppId>
<ProducerId>a72af712-90ea-43be-b958-077a87a29bfb</ProducerId>
<MessageSeq>53</MessageSeq>
</MessageId>
<Authentication>
<AuthUserId>Router</AuthUserId>
</Authentication>
</Sender>
<Datetime>
<Year>2001</Year>
<Month>3</Month>
<Day>23</Day>
<Hour>13</Hour>
<Minute>47</Minute>
<Second>30</Second>
<SubSecond>223</SubSecond>
<Timezone>6:00-GMT</Timezone>
</Datetime>
</ControlAreaSync>
<DataArea>
<NewData>
<BasicStudent mealCode="" usBorn="Yes" migrant="No" workAbility="No" ellStatus="">
<StudentNumber>052589F201</StudentNumber>
<ExternalIdNumber>1234567890</ExternalIdNumber>
<StateIdNumber>123456</StateIdNumber>
<Name>
<LastName>Lopez</LastName>
<FirstName>Maria</FirstName>
<MiddleName>S</MiddleName>
</Name>
<Gender>Female</Gender>
<BirthDate>
<Month>1</Month>
<Day>1</Day>
<Year>1995</Year>
</BirthDate>
<Race>Hispanic</Race>
<Ethnicity>Hispanic</Ethnicity>
<PrimaryLanguage>English</PrimaryLanguage>
<HouseholdLanguage>Spanish</HouseholdLanguage>
<Address>
<Street>123 Any Street</Street>
<ApartmentNumber>12-D</ApartmentNumber>
<City>Los Angeles</City>
<County>Los Angeles</County>
<State>CA</State>
<ZipCode>90071</ZipCode>
</Address>
</BasicStudent>
</NewData>
</DataArea>
</com.welligent.Student.BasicStudent.Create>';
--v_out := DOC;
SYS.XMLPARSER.PARSECLOB ( P, DOC );
v_xmldoc := SYS.XMLPARSER.getDocument(P);
--DBMS_LOB.createtemporary(v_out,FALSE,DBMS_LOB.SESSION);
--v_out := SYS.XMLPARSER.PARSECLOB ( P, DOC );
--SYS.XMLDOM.writetoCLOB(v_xmldoc, v_out);
--INSERT INTO TEST (TEST_COLUMN)
--VALUES(V_OUT);
--printElements(v_xmldoc);
printElementAttributes(v_xmldoc);
exception
when xmldom.INDEX_SIZE_ERR then
raise_application_error(-20120, 'Index Size error');
when xmldom.DOMSTRING_SIZE_ERR then
raise_application_error(-20120, 'String Size error');
when xmldom.HIERARCHY_REQUEST_ERR then
raise_application_error(-20120, 'Hierarchy request error');
when xmldom.WRONG_DOCUMENT_ERR then
raise_application_error(-20120, 'Wrong doc error');
when xmldom.INVALID_CHARACTER_ERR then
raise_application_error(-20120, 'Invalid Char error');
when xmldom.NO_DATA_ALLOWED_ERR then
raise_application_error(-20120, 'Nod data allowed error');
when xmldom.NO_MODIFICATION_ALLOWED_ERR then
raise_application_error(-20120, 'No mod allowed error');
when xmldom.NOT_FOUND_ERR then
raise_application_error(-20120, 'Not found error');
when xmldom.NOT_SUPPORTED_ERR then
raise_application_error(-20120, 'Not supported error');
when xmldom.INUSE_ATTRIBUTE_ERR then
raise_application_error(-20120, 'In use attr error');
END;
2. The second which displays the values from the .xml file I initialized above.
CREATE OR REPLACE procedure printElementAttributes(doc xmldom.DOMDocument) is
nl XMLDOM.DOMNODELIST;
len1 NUMBER;
len2 NUMBER;
n XMLDOM.DOMNODE;
e XMLDOM.DOMELEMENT;
nnm XMLDOM.DOMNAMEDNODEMAP;
attrname VARCHAR2(100);
attrval VARCHAR2(100);
text_value VARCHAR2(100):=NULL;
n_child XMLDOM.DOMNODE;
BEGIN
-- get all elements
nl := XMLDOM.getElementsByTagName(doc, '*');
len1 := XMLDOM.getLength(nl);
-- loop through elements
FOR j in 0..len1-1 LOOP
n := XMLDOM.item(nl, j);
e := XMLDOM.makeElement(n);
DBMS_OUTPUT.PUT_LINE(xmldom.getTagName(e) || ':');
-- get all attributes of element
nnm := xmldom.getAttributes(n);
n_child:=xmldom.getFirstChild(n);
text_value:=xmldom.getNodeValue(n_child);
dbms_output.put_line('val='||text_value);
IF (xmldom.isNull(nnm) = FALSE) THEN
len2 := xmldom.getLength(nnm);
dbms_output.put_line('length='||len2);
-- loop through attributes
FOR i IN 0..len2-1 LOOP
n := xmldom.item(nnm, i);
attrname := xmldom.getNodeName(n);
attrval := xmldom.getNodeValue(n);
dbms_output.put(' ' || attrname || ' = ' || attrval);
END LOOP;
dbms_output.put_line('');
END IF;
END LOOP;
END printElementAttributes;
3. The package trying to insert into a PL/SQL table.
CREATE OR REPLACE PACKAGE BODY XMLSTUD2 AS
PROCEDURE STUDLOAD
IS
v_parser xmlparser.Parser;
v_doc xmldom.DOMDocument;
v_nl xmldom.DOMNodeList;
v_n xmldom.DOMNode;
DOC CLOB;
v_out CLOB;
n2 XMLDOM.DOMNODELIST;
TYPE stuxml_type IS TABLE OF STUDENTS%ROWTYPE;
s_tab stuxml_type := stuxml_type();
--l_sturec students%rowtype;
BEGIN
-- Create a parser.
v_parser := xmlparser.newParser;
xmlparser.setValidationMode(v_parser, FALSE);
DOC := '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<com.welligent.Student.BasicStudent.Create>
<ControlAreaSync messageCategory="com.welligent.Student" messageObject="BasicStudent" messageAction="Create" messageRelease="1.0" messagePriority="1" messageType="Sync">
<Sender>
<MessageId>
<SenderAppId>com.openii.SyncRouter</SenderAppId>
<ProducerId>a72af712-90ea-43be-b958-077a87a29bfb</ProducerId>
<MessageSeq>53</MessageSeq>
</MessageId>
<Authentication>
<AuthUserId>Router</AuthUserId>
</Authentication>
</Sender>
<Datetime>
<Year>2001</Year>
<Month>3</Month>
<Day>23</Day>
<Hour>13</Hour>
<Minute>47</Minute>
<Second>30</Second>
<SubSecond>223</SubSecond>
<Timezone>6:00-GMT</Timezone>
</Datetime>
</ControlAreaSync>
<DataArea>
<NewData>
<BasicStudent mealCode="" usBorn="Yes" migrant="No" workAbility="No" ellStatus="">
<StudentNumber>052589F201</StudentNumber>
<ExternalIdNumber>1234567890</ExternalIdNumber>
<StateIdNumber>123456</StateIdNumber>
<Name>
<LastName>Lopez</LastName>
<FirstName>Maria</FirstName>
<MiddleName>S</MiddleName>
</Name>
<Gender>Female</Gender>
<BirthDate>
<Month>1</Month>
<Day>1</Day>
<Year>1995</Year>
</BirthDate>
<Race>Hispanic</Race>
<Ethnicity>Hispanic</Ethnicity>
<PrimaryLanguage>English</PrimaryLanguage>
<HouseholdLanguage>Spanish</HouseholdLanguage>
<Address>
<Street>123 Any Street</Street>
<ApartmentNumber>12-D</ApartmentNumber>
<City>Los Angeles</City>
<County>Los Angeles</County>
<State>CA</State>
<ZipCode>90071</ZipCode>
</Address>
</BasicStudent>
</NewData>
</DataArea>
</com.welligent.Student.BasicStudent.Create>';
-- Parse the document and create a new DOM document.
SYS.XMLPARSER.PARSECLOB ( v_parser, DOC );
v_doc := SYS.XMLPARSER.getDocument(v_parser);
-- Free resources associated with the Parser now it is no longer needed.
xmlparser.freeParser(v_parser);
-- Get a list of all the STUD nodes in the document using the XPATH syntax.
v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/com.welligent.Student.BasicStudent.Create/DataArea/NewData/BasicStudent/Address');
dbms_output.put_line( 'New Stud processed on '||to_char(sysdate, 'YYYY-MON-DD'));
-- Loop through the list and create a new record in a tble collection
-- for each STUD record.
FOR stud IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
v_n := xmldom.item(v_nl, stud);
s_tab.extend;
-- Use XPATH syntax to assign values to he elements of the collection.
--s_tab(s_tab.last).STUDENT_ID :=xslprocessor.valueOf(v_n,'StudentNumber');
--s_tab(s_tab.last).SSN :=xslprocessor.valueOf(v_n,'ExternalIdNumber');
--s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'StateIdNumber');
s_tab(s_tab.last).STUDENT_LAST_NAME :=xslprocessor.valueOf(v_n,'LastName');
--dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
s_tab(s_tab.last).STUDENT_FIRST_NAME :=xslprocessor.valueOf(v_n,'FirstName');
--s_tab(s_tab.last).STUDENT_MI :=xslprocessor.valueOf(v_n,'MiddleName');
--s_tab(s_tab.last).STUDENT_GENDER :=xslprocessor.valueOf(v_n,'Gender');
--s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Month');
--s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Day');
--s_tab(s_tab.last).SHISID :=xslprocessor.valueOf(v_n,'Year');
--s_tab(s_tab.last).STUDENT_RACE :=xslprocessor.valueOf(v_n,'Race');
--s_tab(s_tab.last).STUDENT_ETHNIC :=xslprocessor.valueOf(v_n,'Ethnicity');
--s_tab(s_tab.last).STUDENT_PRI_LANG :=xslprocessor.valueOf(v_n,'PrimaryLanguage');
--s_tab(s_tab.last).STUDENT_SEC_LANG :=xslprocessor.valueOf(v_n,'HouseholdLanguage');
--s_tab(s_tab.last).STUDENT_STREET :=xslprocessor.valueOf(v_n,'Street');
--s_tab(s_tab.last).STUDENT_APART_NO :=xslprocessor.valueOf(v_n,'ApartmentNumber');
--s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'City');
--s_tab(s_tab.last).STUDENT_COUNTY :=xslprocessor.valueOf(v_n,'County');
--s_tab(s_tab.last).STUDENT_STATE :=xslprocessor.valueOf(v_n,'State');
--s_tab(s_tab.last).STUDENT_ZIP :=xslprocessor.valueOf(v_n,'ZipCode');
END LOOP;
FOR stud IN s_tab.first..s_tab.last LOOP
dbms_output.put_line( s_tab(s_tab.last).STUDENT_LAST_NAME);
INSERT INTO STUDENTS (
SHISID, SSN, DOE_SCHOOL_NUMBER,
PATIENT_TYPE, TEACHER, HOMEROOM,
STUDENT_LAST_NAME, STUDENT_FIRST_NAME, STUDENT_MI,
STUDENT_DOB, STUDENT_BIRTH_CERT, STUDENT_COMM,
STUDENT_MUSA, STUDENT_FAMSIZE, STUDENT_FAMINCOME,
STUDENT_UNINSURED, STUDENT_LUNCH, STUDENT_ZIP,
STUDENT_STATE, STUDENT_COUNTY, STUDENT_STREET,
STUDENT_APART_NO, STUDENT_PHONE, STUDENT_H2O_TYPE,
STUDENT_WASTE_TRT, STUDENT_HOME_SET, STUDENT_NONHOME_SET,
STUDENT_GENDER, STUDENT_RACE, STUDENT_ETHNIC,
STUDENT_PRI_LANG, STUDENT_SEC_LANG, STUDENT_ATRISK,
EMER_COND_MEMO, ASSIST_DEVICE_TYPE, SCHOOL_ENTER_AGE,
STUDENT_CURR_GRADE, S504_ELIG_DATE, S504_DEV_DATE,
S504_REV_DATE, STUDENT_504, STUDENT_IEP,
IEP_EXP_DATE, GRAD_CLASS, TYPE_DIPLOMA,
GRADE_RETAIN, LIT_PASS_TEST_MATH, LIT_PASS_DATE_MATH,
LIT_PASS_TEST_WRITE, LIT_PASS_DATE_WRITE, LIT_PASS_TEST_READ,
LIT_PASS_DATE_READ, SPEC_ED_ELIG, SPEC_ED_CODE,
TRANSPORT_CODE, TRANSPORT_NO, PRIME_HANDICAP,
PRIME_HANDICAP_PERCENT, PRIME_HANDI_MANAGER, FIRST_ADD_HANDI,
FIRST_ADD_HANDICAP_PERCENT, FIRST_ADD_HANDI_504, FIRST_ADD_HANDI_504_DATE,
SECOND_ADD_HANDI, SECOND_ADD_HANDICAP_PERCENT, MED_EXTERNAL_NAME,
INS_TYPE, INS_PRI, INS_NAME,
INS_MEDICAID_NO, ELIGDATE, INS_PRIV_INSURANCE,
INS_APPR_BILL, INS_APPR_DATE, INS_PARENT_APPR,
INS_POL_NAME, INS_POL_NO, INS_CARRIER_NO,
INS_CARRIER_NAME, INS_CARRIER_RELATE, INS_AFFECT_DATE,
INS_COPAY_OV, INS_COPAY_RX, INS_COPAY_AMBUL,
INS_COPAY_EMER, INS_COPAY_OUTPAT, STUDENT_INACTIVE,
PHYS_ID, ENCOUNTERNUM, USERID,
MODDATE, STUDENT_ID, S504_DISABILITY,
CHAPTER1, WELLNESS_ENROLL, SCHOOL_OF_RESIDENCE,
INITIAL_IEP_DATE, CALENDAR_TRACK, USA_BORN,
ALT_ID, FUTURE_SCHOOL, IEP_LAST_MEETING,
IEP_LAST_SETTING, IEP_LAST_REFER_EVAL, THIRD_ADD_HANDI,
LEP, GIFTED, IEP_EXIT_REASON,
CASE_MANAGER_ID, INTAKE_NOTES, CALLER_PHONE,
CALL_DATE, CALLER_RELATIONSHIP, CALLER_NAME,
BUSINESS_PHONE, FAX, EMAIL,
HIGHEST_EDUCATION, INTAKE_DATE, SERVICE_COORDINATOR,
DISCHARGE_DATE, DISCHARGE_REASON, DISCHARGE_NOTES,
INTAKE_BY, INTAKE_STATUS, IEP_LAST_SERVED_DATE,
IEP_APC_DATE, IEP_EXIT_DATE, ADDRESS2,
LEGAL_STATUS, RELIGION, EMPLOYMENT_STATUS,
TARG_POP_GROUP1, TARG_POP_GROUP2, MARITAL_STATUS,
THIRD_ADD_HANDI_PERCENT, LAST_INTERFACE_DATE, SERVICE_PLAN_TYPE,
CURRENT_JURISDICTION, FIPS, BIRTH_PLACE_JURISDICTION,
BIRTH_PLACE_HOSPITAL, BIRTH_PLACE_STATE, BIRTH_PLACE_COUNTRY,
OTHER_CLIENT_NAME, SIBLINGS_WITH_SERVICES, PERM_SHARE_INFORMATION,
PERM_VERIFY_INSURANCE, REFERRING_AGENCY, REFERRING_INDIVIDUAL,
AUTOMATIC_ELIGIBILITY, INTAKE_IEP_ID, FUTURE_SCHOOL2,
FUTURE_SCHOOL3, TRANSLATOR_NEEDED, TOTAL_CHILDREN_IN_HOME,
REFERRED_BY, FAMILY_ID, SCREENING_CONSENT_FLAG,
PICTURE_FILE, DUAL_ENROLLED, DOE_SCHOOL_NUMBER2)
VALUES (123456789012, null,null ,
null,null,null ,s_tab(stud).STUDENT_LAST_NAME
, s_tab(stud).STUDENT_LAST_NAME,null ,
null ,null ,null ,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null ,null , null,
null, null,null );
END LOOP;
COMMIT;
-- Free any resources associated with the document now it
-- is no longer needed.
xmldom.freeDocument(v_doc);
END STUDLOAD;
END XMLSTUD2;
/
Here's a first cut for you. Note that I've added some annotations to the XML Schema
SQL>
SQL>
SQL> var schemaURL varchar2(256)
SQL> var schemaPath varchar2(256)
SQL> --
SQL> begin
2 :schemaURL := 'http://xmlns.welligent.com/xsd/Student.xsd';
3 :schemaPath := '/public/Student.xsd';
4 end;
5 /
PL/SQL procedure successfully completed.
SQL> call dbms_xmlSchema.deleteSchema(:schemaURL,4)
2 /
Call completed.
SQL> declare
2 res boolean;
3 xmlSchema xmlType := xmlType(
4 '<xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xs="http://www.w3.org/2001/XMLSchema">
5 <xs:element name="Address" xdb:defaultTable="">
6 <xs:complexType>
7 <xs:sequence>
8 <xs:element ref="Street"/>
9 <xs:element ref="ApartmentNumber"/>
10 <xs:element ref="City"/>
11 <xs:element ref="County"/>
12 <xs:element ref="State"/>
13 <xs:element ref="ZipCode"/>
14 </xs:sequence>
15 </xs:complexType>
16 </xs:element>
17 <xs:element name="ApartmentNumber" xdb:defaultTable="">
18 <xs:simpleType>
19 <xs:restriction base="xs:string">
20 <xs:enumeration value="12-D"/>
21 </xs:restriction>
22 </xs:simpleType>
23 </xs:element>
24 <xs:element name="AuthUserId" xdb:defaultTable="">
25 <xs:simpleType>
26 <xs:restriction base="xs:string">
27 <xs:enumeration value="Router"/>
28 </xs:restriction>
29 </xs:simpleType>
30 </xs:element>
31 <xs:element name="Authentication" xdb:defaultTable="">
32 <xs:complexType>
33 <xs:sequence>
34 <xs:element ref="AuthUserId"/>
35 </xs:sequence>
36 </xs:complexType>
37 </xs:element>
38 <xs:element name="BasicStudent" xdb:defaultTable="">
39 <xs:complexType>
40 <xs:sequence>
41 <xs:element ref="StudentNumber"/>
42 <xs:element ref="ExternalIdNumber"/>
43 <xs:element ref="StateIdNumber"/>
44 <xs:element ref="Name"/>
45 <xs:element ref="Gender"/>
46 <xs:element ref="BirthDate"/>
47 <xs:element ref="Race"/>
48 <xs:element ref="Ethnicity"/>
49 <xs:element ref="PrimaryLanguage"/>
50 <xs:element ref="HouseholdLanguage"/>
51 <xs:element ref="Address"/>
52 </xs:sequence>
53 <xs:attribute name="mealCode" type="xs:string" use="required"/>
54 <xs:attribute name="usBorn" use="required">
55 <xs:simpleType>
56 <xs:restriction base="xs:string">
57 <xs:enumeration value="Yes"/>
58 </xs:restriction>
59 </xs:simpleType>
60 </xs:attribute>
61 <xs:attribute name="migrant" use="required">
62 <xs:simpleType>
63 <xs:restriction base="xs:string">
64 <xs:enumeration value="No"/>
65 </xs:restriction>
66 </xs:simpleType>
67 </xs:attribute>
68 <xs:attribute name="workAbility" use="required">
69 <xs:simpleType>
70 <xs:restriction base="xs:string">
71 <xs:enumeration value="No"/>
72 </xs:restriction>
73 </xs:simpleType>
74 </xs:attribute>
75 <xs:attribute name="ellStatus" type="xs:string" use="required"/>
76 </xs:complexType>
77 </xs:element>
78 <xs:element name="BirthDate" xdb:defaultTable="">
79 <xs:complexType>
80 <xs:sequence>
81 <xs:element ref="Month"/>
82 <xs:element ref="Day"/>
83 <xs:element ref="Year"/>
84 </xs:sequence>
85 </xs:complexType>
86 </xs:element>
87 <xs:element name="City" xdb:defaultTable="">
88 <xs:simpleType>
89 <xs:restriction base="xs:string">
90 <xs:enumeration value="Los Angeles"/>
91 </xs:restriction>
92 </xs:simpleType>
93 </xs:element>
94 <xs:element name="ControlAreaSync" xdb:defaultTable="">
95 <xs:complexType>
96 <xs:sequence>
97 <xs:element ref="Sender"/>
98 <xs:element ref="Datetime"/>
99 </xs:sequence>
100 <xs:attribute name="messageCategory" use="required">
101 <xs:simpleType>
102 <xs:restriction base="xs:string">
103 <xs:enumeration value="com.welligent.Student"/>
104 </xs:restriction>
105 </xs:simpleType>
106 </xs:attribute>
107 <xs:attribute name="messageObject" use="required">
108 <xs:simpleType>
109 <xs:restriction base="xs:string">
110 <xs:enumeration value="BasicStudent"/>
111 </xs:restriction>
112 </xs:simpleType>
113 </xs:attribute>
114 <xs:attribute name="messageAction" use="required">
115 <xs:simpleType>
116 <xs:restriction base="xs:string">
117 <xs:enumeration value="Create"/>
118 </xs:restriction>
119 </xs:simpleType>
120 </xs:attribute>
121 <xs:attribute name="messageRelease" use="required">
122 <xs:simpleType>
123 <xs:restriction base="xs:decimal">
124 <xs:enumeration value="1.0"/>
125 </xs:restriction>
126 </xs:simpleType>
127 </xs:attribute>
128 <xs:attribute name="messagePriority" use="required">
129 <xs:simpleType>
130 <xs:restriction base="xs:byte">
131 <xs:enumeration value="1"/>
132 </xs:restriction>
133 </xs:simpleType>
134 </xs:attribute>
135 <xs:attribute name="messageType" use="required">
136 <xs:simpleType>
137 <xs:restriction base="xs:string">
138 <xs:enumeration value="Sync"/>
139 </xs:restriction>
140 </xs:simpleType>
141 </xs:attribute>
142 </xs:complexType>
143 </xs:element>
144 <xs:element name="County" xdb:defaultTable="">
145 <xs:simpleType>
146 <xs:restriction base="xs:string">
147 <xs:enumeration value="Los Angeles"/>
148 </xs:restriction>
149 </xs:simpleType>
150 </xs:element>
151 <xs:element name="DataArea" xdb:defaultTable="">
152 <xs:complexType>
153 <xs:sequence>
154 <xs:element ref="NewData"/>
155 </xs:sequence>
156 </xs:complexType>
157 </xs:element>
158 <xs:element name="Datetime">
159 <xs:complexType>
160 <xs:sequence>
161 <xs:element ref="Year"/>
162 <xs:element ref="Month"/>
163 <xs:element ref="Day"/>
164 <xs:element ref="Hour"/>
165 <xs:element ref="Minute"/>
166 <xs:element ref="Second"/>
167 <xs:element ref="SubSecond"/>
168 <xs:element ref="Timezone"/>
169 </xs:sequence>
170 </xs:complexType>
171 </xs:element>
172 <xs:element name="Day" xdb:defaultTable="">
173 <xs:simpleType>
174 <xs:restriction base="xs:byte">
175 <xs:enumeration value="1"/>
176 <xs:enumeration value="23"/>
177 </xs:restriction>
178 </xs:simpleType>
179 </xs:element>
180 <xs:element name="Ethnicity" xdb:defaultTable="">
181 <xs:simpleType>
182 <xs:restriction base="xs:string">
183 <xs:enumeration value="Hispanic"/>
184 </xs:restriction>
185 </xs:simpleType>
186 </xs:element>
187 <xs:element name="ExternalIdNumber" xdb:defaultTable="">
188 <xs:simpleType>
189 <xs:restriction base="xs:int">
190 <xs:enumeration value="1234567890"/>
191 </xs:restriction>
192 </xs:simpleType>
193 </xs:element>
194 <xs:element name="FirstName" xdb:defaultTable="">
195 <xs:simpleType>
196 <xs:restriction base="xs:string">
197 <xs:enumeration value="Maria"/>
198 </xs:restriction>
199 </xs:simpleType>
200 </xs:element>
201 <xs:element name="Gender" xdb:defaultTable="">
202 <xs:simpleType>
203 <xs:restriction base="xs:string">
204 <xs:enumeration value="Female"/>
205 </xs:restriction>
206 </xs:simpleType>
207 </xs:element>
208 <xs:element name="Hour" xdb:defaultTable="">
209 <xs:simpleType>
210 <xs:restriction base="xs:byte">
211 <xs:enumeration value="13"/>
212 </xs:restriction>
213 </xs:simpleType>
214 </xs:element>
215 <xs:element name="HouseholdLanguage" xdb:defaultTable="">
216 <xs:simpleType>
217 <xs:restriction base="xs:string">
218 <xs:enumeration value="Spanish"/>
219 </xs:restriction>
220 </xs:simpleType>
221 </xs:element>
222 <xs:element name="LastName" xdb:defaultTable="">
223 <xs:simpleType>
224 <xs:restriction base="xs:string">
225 <xs:enumeration value="Lopez"/>
226 </xs:restriction>
227 </xs:simpleType>
228 </xs:element>
229 <xs:element name="MessageId" xdb:defaultTable="">
230 <xs:complexType>
231 <xs:sequence>
232 <xs:element ref="SenderAppId"/>
233 <xs:element ref="ProducerId"/>
234 <xs:element ref="MessageSeq"/>
235 </xs:sequence>
236 </xs:complexType>
237 </xs:element>
238 <xs:element name="MessageSeq" xdb:defaultTable="">
239 <xs:simpleType>
240 <xs:restriction base="xs:byte">
241 <xs:enumeration value="53"/>
242 </xs:restriction>
243 </xs:simpleType>
244 </xs:element>
245 <xs:element name="MiddleName" xdb:defaultTable="">
246 <xs:simpleType>
247 <xs:restriction base="xs:string">
248 <xs:enumeration value="S"/>
249 </xs:restriction>
250 </xs:simpleType>
251 </xs:element>
252 <xs:element name="Minute" xdb:defaultTable="">
253 <xs:simpleType>
254 <xs:restriction base="xs:byte">
255 <xs:enumeration value="47"/>
256 </xs:restriction>
257 </xs:simpleType>
258 </xs:element>
259 <xs:element name="Month" xdb:defaultTable="">
260 <xs:simpleType>
261 <xs:restriction base="xs:byte">
262 <xs:enumeration value="1"/>
263 <xs:enumeration value="3"/>
264 </xs:restriction>
265 </xs:simpleType>
266 </xs:element>
267 <xs:element name="Name" xdb:defaultTable="">
268 <xs:complexType>
269 <xs:sequence>
270 <xs:element ref="LastName"/>
271 <xs:element ref="FirstName"/>
272 <xs:element ref="MiddleName"/>
273 </xs:sequence>
274 </xs:complexType>
275 </xs:element>
276 <xs:element name="NewData" xdb:defaultTable="">
277 <xs:complexType>
278 <xs:sequence>
279 <xs:element ref="BasicStudent"/>
280 </xs:sequence>
281 </xs:complexType>
282 </xs:element>
283 <xs:element name="PrimaryLanguage" xdb:defaultTable="">
284 <xs:simpleType>
285 <xs:restriction base="xs:string">
286 <xs:enumeration value="English"/>
287 </xs:restriction>
288 </xs:simpleType>
289 </xs:element>
290 <xs:element name="ProducerId" xdb:defaultTable="">
291 <xs:simpleType>
292 <xs:restriction base="xs:string">
293 <xs:enumeration value="a72af712-90ea-43be-b958-077a87a29bfb"/>
294 </xs:restriction>
295 </xs:simpleType>
296 </xs:element>
297 <xs:element name="Race" xdb:defaultTable="">
298 <xs:simpleType>
299 <xs:restriction base="xs:string">
300 <xs:enumeration value="Hispanic"/>
301 </xs:restriction>
302 </xs:simpleType>
303 </xs:element>
304 <xs:element name="Second" xdb:defaultTable="">
305 <xs:simpleType>
306 <xs:restriction base="xs:byte">
307 <xs:enumeration value="30"/>
308 </xs:restriction>
309 </xs:simpleType>
310 </xs:element>
311 <xs:element name="Sender" xdb:defaultTable="">
312 <xs:complexType>
313 <xs:sequence>
314 <xs:element ref="MessageId"/>
315 <xs:element ref="Authentication"/>
316 </xs:sequence>
317 </xs:complexType>
318 </xs:element>
319 <xs:element name="SenderAppId" xdb:defaultTable="">
320 <xs:simpleType>
321 <xs:restriction base="xs:string">
322 <xs:enumeration value="com.openii.SyncRouter"/>
323 </xs:restriction>
324 </xs:simpleType>
325 </xs:element>
326 <xs:element name="State" xdb:defaultTable="">
327 <xs:simpleType>
328 <xs:restriction base="xs:string">
329 <xs:enumeration value="CA"/>
330 </xs:restriction>
331 </xs:simpleType>
332 </xs:element>
333 <xs:element name="StateIdNumber" xdb:defaultTable="">
334 <xs:simpleType>
335 <xs:restriction base="xs:int">
336 <xs:enumeration value="123456"/>
337 </xs:restriction>
338 </xs:simpleType>
339 </xs:element>
340 <xs:element name="Street" xdb:defaultTable="">
341 <xs:simpleType>
342 <xs:restriction base="xs:string">
343 <xs:enumeration value="123 Any Street"/>
344 </xs:restriction>
345 </xs:simpleType>
346 </xs:element>
347 <xs:element name="StudentNumber" xdb:defaultTable="">
348 <xs:simpleType>
349 <xs:restriction base="xs:hexBinary">
350 <xs:enumeration value="052589F201"/>
351 </xs:restriction>
352 </xs:simpleType>
353 </xs:element>
354 <xs:element name="SubSecond" xdb:defaultTable="">
355 <xs:simpleType>
356 <xs:restriction base="xs:short">
357 <xs:enumeration value="223"/>
358 </xs:restriction>
359 </xs:simpleType>
360 </xs:element>
361 <xs:element name="Timezone" xdb:defaultTable="">
362 <xs:simpleType>
363 <xs:restriction base="xs:string">
364 <xs:enumeration value="6:00-GMT"/>
365 </xs:restriction>
366 </xs:simpleType>
367 </xs:element>
368 <xs:element name="Year" xdb:defaultTable="">
369 <xs:simpleType>
370 <xs:restriction base="xs:short">
371 <xs:enumeration value="1995"/>
372 <xs:enumeration value="2001"/>
373 </xs:restriction>
374 </xs:simpleType>
375 </xs:element>
376 <xs:element name="ZipCode" xdb:defaultTable="">
377 <xs:simpleType>
378 <xs:restriction base="xs:int">
379 <xs:enumeration value="90071"/>
380 </xs:restriction>
381 </xs:simpleType>
382 </xs:element>
383 <xs:element name="com.welligent.Student.BasicStudent.Create" xdb:defaultTable="STUDENT_TABLE">
384 <xs:complexType>
385 <xs:sequence>
386 <xs:element ref="ControlAreaSync"/>
387 <xs:element ref="DataArea"/>
388 </xs:sequence>
389 </xs:complexType>
390 </xs:element>
391 </xs:schema>');
392 begin
393 if (dbms_xdb.existsResource(:schemaPath)) then
394 dbms_xdb.deleteResource(:schemaPath);
395 end if;
396 res := dbms_xdb.createResource(:schemaPath,xmlSchema);
397 end;
398 /
PL/SQL procedure successfully completed.
SQL> begin
2 dbms_xmlschema.registerSchema
3 (
4 :schemaURL,
5 xdbURIType(:schemaPath).getClob(),
6 TRUE,TRUE,FALSE,TRUE
7 );
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> insert into STUDENT_TABLE values (xmltype(
2 '<com.welligent.Student.BasicStudent.Create>
3 <ControlAreaSync messageCategory="com.welligent.Student" messageObject="BasicStudent" messageAction="Create" messageRelease="1.0" me
ssagePriority="1" messageType="Sync">
4 <Sender>
5 <MessageId>
6 <SenderAppId>com.openii.SyncRouter</SenderAppId>
7 <ProducerId>a72af712-90ea-43be-b958-077a87a29bfb</ProducerId>
8 <MessageSeq>53</MessageSeq>
9 </MessageId>
10 <Authentication>
11 <AuthUserId>Router</AuthUserId>
12 </Authentication>
13 </Sender>
14 <Datetime>
15 <Year>2001</Year>
16 <Month>3</Month>
17 <Day>23</Day>
18 <Hour>13</Hour>
19 <Minute>47</Minute>
20 <Second>30</Second>
21 <SubSecond>223</SubSecond>
22 <Timezone>6:00-GMT</Timezone>
23 </Datetime>
24 </ControlAreaSync>
25 <DataArea>
26 <NewData>
27 <BasicStudent mealCode="" usBorn="Yes" migrant="No" workAbility="No" ellStatus="">
28 <StudentNumber>052589F201</StudentNumber>
29 <ExternalIdNumber>1234567890</ExternalIdNumber>
30 <StateIdNumber>123456</StateIdNumber>
31 <Name>
32 <LastName>Lopez</LastName>
33 <FirstName>Maria</FirstName>
34 <MiddleName>S</MiddleName>
35 </Name>
36 <Gender>Female</Gender>
37 <BirthDate>
38 <Month>1</Month>
39 <Day>1</Day>
40 <Year>1995</Year>
41 </BirthDate>
42 <Race>Hispanic</Race>
43 <Ethnicity>Hispanic</Ethnicity>
44 <PrimaryLanguage>English</PrimaryLanguage>
45 <HouseholdLanguage>Spanish</HouseholdLanguage>
46 <Address>
47 <Street>123 Any Street</Street>
48 <ApartmentNumber>12-D</ApartmentNumber>
49 <City>Los Angeles</City>
50 <County>Los Angeles</County>
51 <State>CA</State>
52 <ZipCode>90071</ZipCode>
53 </Address>
54 </BasicStudent>
55 </NewData>
56 </DataArea>
57 </com.welligent.Student.BasicStudent.Create>'))
58 /
1 row created.
SQL>
SQL>
SQL>
Similar Messages
-
Loading issue : Error: sql error in the database while accessing a table
Hello,
where as one of the DTP in the process chain failed due to *Error: sql error in the database while accessing a table*, where as in the short dump it showing as Transaction log of data base is full., but i checked the data base space in DB02, more space is available . once we run the same DTP by manually its successful. its not through any errors.
could u please help me out solve the problem.
Thanks
siva kumar.it might be a lock. do you drop index before loading?
the database might be full at the moment of loading and not later if many loadings happen at the same time on the same system...
when you then rerun your dtp manually, it can go through as it's perhaps the only one running at that moment...
you can try to set the btch parameter to 1...this will help in some cases.
M. -
How to load a XML file into the database
Hi,
I've always only loaded data into the database by using SQL-Loader and the data format was Excel or ASCII
Now I have to load a XML.
How can I do?
The company where I work has Oracle vers. 8i (don't laugh, please)
Thanks in advance!Hi,
Tough job especially if the XML data is complex. The have been some similar question in the forum:
Using SQL Loader to load an XML File -- use 1 field's data for many records
SQL Loader to upload XML file
Hope they help.
Regards,
Sujoy -
dear all,
i have done a system copy from production server into quality server. quality was scrapped and freshly installed with SAP then used the DB flush method to carry out the system copy. i had to change the DBS_ORA_SCHEMA in environment variables to SAP<SOURCE SID> from SAPSR3. the sap version is ECC6.0,DB is ORACLE10.2 on WIN NT.
after MMC opened, i get "SQL error in the database when accessing a table" error is coming. in SM21, I am getting "Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000 )
Database error 8103 at SEL access to table TBTCO
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
Database error 8103 at FET access to table TBTCP
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130339 sibqty_Q TY_00 " generated
Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
> Short dump "081018 130339 sibqty_Q TY_00 " generated
Transaction Canceled 00 671 ( DBIF_RSQL_SQL_ERROR 20081018130339sibqty_QTY_00 SAPSYS 000
Delete session 001 after error 023
Database error 8103 at DEL access to table TMSALOGAR
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130432 sibqty_Q TY_00 " generated
Database error 8103 at FET access to table SNAP
Run-time error "DBIF_RSQL_SQL_ERROR" occurred
> Short dump "081018 130432 sibqty_Q TY_00 " generated
Transaction Canceled SY 002 ( SQL error in the database when accessing a table. )
Database error 8103 at FET access to table TSP02"
please find the st22 DUMP:
ow to correct the error |
Database error text........: "ORA-08103: object no longer exists"
Internal call code.........: "[RSQL/READ/TBTCO ]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
"SAPMSSY2" or "SAPMSSY2"
"INITIATE_JOB_START"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"INITIATE_JOB_START" "(FORM)", or its possible occurrence must be declared in
the
RAISING clause of the procedure.
|
please do me this favor if you know to avoid this problem..
thanks a lot..Hello Anuj,
This is because the COUNT(*) is returning a value which is longer than the INT4 data type it is expecting. If you restrict the selection by introducing a WHERE clause, then you won't get the dump:
DATA: dyn_from TYPE string,
dyn_where TYPE string,
gx_sql_err TYPE REF TO cx_sy_open_sql_error,
gv_text TYPE string.
dyn_from = `DD01L INNER JOIN DD02L ON DD02L~AS4LOCAL = DD01L~AS4LOCAL AND DD02L~AS4VERS = DD01L~AS4VERS`.
dyn_where = `DOMNAME LIKE 'Z%'`.
TRY .
SELECT COUNT(*) FROM (dyn_from) WHERE (dyn_where).
WRITE: / sy-dbcnt NO-GROUPING.
CATCH: cx_sy_open_sql_db INTO gx_sql_err,
cx_sy_dynamic_osql_semantics INTO gx_sql_err,
cx_sy_dynamic_osql_syntax INTO gx_sql_err.
ENDTRY.
IF gx_sql_err IS BOUND.
gv_text = gx_sql_err->get_text( ).
WRITE: / gv_text.
ENDIF.
BR,
Suhas -
Ive just learned that i can use loadjava to load jsp pages into the database.
Ive just learned that i can use loadjava to load jsp pages into the database. How is that possible. How can someone go to my lets say, index.jsp page and actually see it if its inside the database? What authenticates it? Where would you set the parameters to tell http(apache) to look inside the db for the pages?
Any ideas?Thanks for the reply. If I put the file on the database, does it have to be in a particular location? I've put it on the database server, launched sql*plus (as APPS) and ran the following:
execute dbms_java.loadjava('-v', 'ZebraGetPrinterFromXML.class');
PL/SQL procedure successfully completed.Then when I try to run a process that uses this I get this:
ORA-29540: class ZebraGetPrinterFromXML does not exist -
Loading class oracle/jpub/runtime/dbws/DbwsProxy into the database
I am trying to create a Database Web Services call-out in PL/SQL, however, encountered error "ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist". I followed some steps to load utl_dbws.jar, utl_dbws_jserver.jar and dbwsclient.jar into the database, but still getting the same error saying DbwsProxy class does not exist. This is very frustrating and I do not know how to fix this. I tried to just load DbwsProxy.class into the database and it executed successfully, however, the database is still complaining that oracle/jpub/runtime/dbws/DbwsProxy does not exist. Does anyone has any idea what's going on? Thanks much. I am cracking my brain out here.
This is the error message I received when loading:
The following operations failed
class java/lang/NumberFormatException: creation (createFailed)
class java/lang/Number: creation (createFailed)
class java/lang/Object: creation (createFailed)
class java/lang/String: creation (createFailed)
class java/lang/Long: creation (createFailed)
exiting : Failures occurred during processing
This is the error message I received in the database after loading dbwsclient.jar:
ERROR at line 1:
ORA-29540: class oracle/jpub/runtime/dbws/DbwsProxy does not exist
ORA-06512: at "SYS.UTL_DBWS", line 135
ORA-06512: at "SYS.UTL_DBWS", line 132
ORA-06512: at "MICHELLE.MICH", line 8
ORA-06512: at line 1
So that class is still missing. You were suspecting that this class is not loaded successfully into the database? Is it possible for me to just load that particular class into the database?
Thanks. -
Getting error "SQL error in the database when accessing a table."
Hi All,
We are getting Dump Error SQL error in the database when accessing a table for the batch job EISSD/REQUISITION 14 / which includes program AQ20FD==========A2============. Please reply. The Dump error details are as follows
Short text
SQL error in the database when accessing a table.
How to correct the error
Database error text........: "ORA-01555: snapshot too old: rollback segment
number 21 with name "_SYSSMU21$" too small"
Internal call code.........: "[RSQL/FTCH/VBRK ]"
Please check the entries in the system log (Transaction SM21).
Thanks
Padmakar Kudtarkar
Edited by: Rob Burbank on May 19, 2011 9:38 AMThe query where we are getting error in Standard program AQ20FD==========A2============ for Job
EISSD/REQUISITION 14 / is as follows:
select VBRKBUKRS VBRKFKART VBRKFKDAT VBRKFKTYP VBRKGJAHR VBRKKUNAG VBRKKUNRG VBRKKURRF VBRKVBELN VBRKWAERK VBRP~AUBEL
VBRPAUPOS VBRPFKIMG VBRPKVGR2 VBRPKZWI1 VBRPMATNR VBRPMWSBP VBRPNETWR VBRPPSTYV VBRPVBELN VBRPVGBEL VBRP~VGPOS
VBRPVKBUR VBRPVKGRP VBRPVRKME VBRPWAVWR
into (VBRK-BUKRS , VBRK-FKART , VBRK-FKDAT , VBRK-FKTYP , VBRK-GJAHR , VBRK-KUNAG , VBRK-KUNRG , VBRK-KURRF , VBRK-VBELN
, VBRK-WAERK , VBRP-AUBEL , VBRP-AUPOS , VBRP-FKIMG , VBRP-KVGR2 , VBRP-KZWI1 , VBRP-MATNR , VBRP-MWSBP , VBRP-NETWR
, VBRP-PSTYV , VBRP-VBELN , VBRP-VGBEL , VBRP-VGPOS , VBRP-VKBUR , VBRP-VKGRP , VBRP-VRKME , VBRP-WAVWR )
from ( VBRK
inner join VBRP
on VBRPVBELN = VBRKVBELN )
where VBRK~BUKRS in SP$00004
and VBRK~FKDAT in SP$00001
and VBRK~KUNAG in SP$00002
and VBRK~VBELN in SP$00006
and VBRP~MATNR in SP$00003.
%dbacc = %dbacc - 1.
if %dbacc = 0.
stop.
endif.
check SP$00004.
check SP$00001.
check SP$00002.
check SP$00006.
check SP$00003.
add 1 to %count-VBRK.
%linr-VBRK = '01'.
extract %fg01.
%ext-VBRP01 = 'X'.
extract %fgwrVBRP01.
endselect. -
Root cause of "SQL error in the database when accessing a table. "
Dear experts,
I meet this dump "SQL error in the database when accessing a table" when executing a sql.
Sql:
SELECT sesssessno poscrm_serplan_id poscrm_ser_h_id poscrm_ser_i_id
possolution_id sessbundle_id sessdbid sessinstno pos~crm_ordered_prod
sessdbid sessinstno
INTO CORRESPONDING FIELDS OF TABLE et_sess_list
FROM dsvassessadmin AS sess JOIN service_posn_sm AS pos
ON possession_id = sesssessno
FOR ALL ENTRIES IN lt_contractno
WHERE sess~contractno = lt_contractno-contract_no
AND sess~status IN lt_status_range
AND bundle_id IN lt_bundle_id
AND pos~solution_id GT 0
This sql works well in dev system SD7, however, it causes dump in another dev system "SMV".
Can anyone give me any ideas?
ThanksHi Jovito,
This is info from ST22
Short text
SQL error in the database when accessing a table.
What can you do?
Note which actions and input led to the error.
For further help in handling the problem, contact your SAP administrator
You can use the ABAP dump analysis transaction ST22 to view and manage
termination messages, in particular for long term reference.
How to correct the error
Database error text........: "SQL0101N The statement is too long or too
complex. SQLSTATE=54001" Internal call code.........: "[RSQL/OPEN/DSVASSESSADMIN ]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
"CL_AGS_SERVICE_SERV===========CP" or "CL_AGS_SERVICE_SERV===========CM018"
"GET_OVS_SESSION_LIST"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"GET_OVS_SESSION_LIST" "(METHOD)", or its possible occurrence must be declared
in the
RAISING clause of the procedure.
To prevent the exception, note the following:
It seems that after translation the native sql is too long. But I think this can be solved. -
hi...m using a mac pro quad core.....its not booting up...i can only see the apple logo and a circle loading...could not get into the login screen...any suggestions please.....m in the middle of a project and now i have got this one
regards,
v.s.bharanWelcome to Apple Discussions!
Do you keep your data backed up?
If not, you should always do so*:
http://www.macmaps.com/backup.html
You never know when a hard drive or a directory might go bad. Having a bootable clone is a must.
That link also shows you some tools you can use to recover data.
If you aren't backed up, try buying those tools first, before attempting to repair the directory.
Directory issues can be fixed with these tools*:
http://www.macmaps.com/directoryfaq.html -
SQL error in the database when accessing a table.
Hi,
I got below error at production server. Please suggest how to reslove this error.
<br>
<br>
<br>
Runtime Errors DBIF_RSQL_SQL_ERROR
<br>
Exception CX_SY_OPEN_SQL_DB
<br>
Date and Time 02.01.2011 15:55:06
<br>
<br>
<br>
<br>
<br>
Short text
<br>
SQL error in the database when accessing a table.
<br>
<br>
<br>
How to correct the error
<br>
Database error text........: "[10054] TCP Provider: An existing connection was
<br>
forcibly closed by the remote host.
<br>
[10054] Communication link failure"
<br>
Internal call code.........: "[RSQL/INSR/SWFCNTBUF ]"
<br>
Please check the entries in the system log (Transaction SM21).
<br>
<br>
If the error occures in a non-modified SAP program, you may be able to
<br>
find an interim solution in an SAP Note.
<br>
If you have access to SAP Notes, carry out a search with the following
<br>
keywords:
<br>
<br>
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
<br>
"CL_SWF_CNT_FACTORY_SHMEM======CP" or "CL_SWF_CNT_FACTORY_SHMEM======CM001"
<br>
| "ADD_INSTANCE"
<br>
<br>
<br>
Information on where terminated
<br>
Termination occurred in the ABAP program "CL_SWF_CNT_FACTORY_SHMEM======CP" -
<br>
in "ADD_INSTANCE".
<br>
The main program was "SAPMSSY1 ".
<br>
<br>
In the source code you have the termination point in line 16
<br>
of the (Include) program "CL_SWF_CNT_FACTORY_SHMEM======CM001".
<br>
The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
<br>
procedure "ADD_INSTANCE" "(METHOD)", but it was neither handled locally nor
<br>
declared
<br>
in the RAISING clause of its signature.
<br>
<br>
The procedure is in program "CL_SWF_CNT_FACTORY_SHMEM======CP "; its source
<br>
code begins in line
<br>
1 of the (Include program "CL_SWF_CNT_FACTORY_SHMEM======CM001 ".
<br>
<br>
<br>
<br>
Source Code Extract
<br>
<br>
Line
SourceCde
<br>
<br>
1
METHOD add_instance .
<br>
2
<br>
3
data: ls_id type swfcntbuf.
<br>
4
<br>
5
check buffer method - store in local buffer if necessary
<br>
6
retcode = cl_swf_cnt_factory=>add_instance( ibf_por = ibf_por instance = instance ).
<br>
7
<br>
8
CHECK m_buffer_method EQ mc_buffer_shared.
<br>
9
<br>
10
append key to list of tasks to add stored in database table SWFCNTBUF
<br>
11
will be evaluated by build process for shared memory area (UPDATE_BUFFER method)
<br>
12
<br>
13
ls_id-mandt = sy-mandt.
<br>
14
ls_id-id = ibf_por.
<br>
15
<br>
>>>>>
INSERT swfcntbuf CONNECTION r/3*wfcontainer
<br>
17
FROM ls_id.
<br>
18
<br>
19
IF sy-subrc EQ 0.
<br>
20
Commit seems to be necessary always, even if INSERT has failed, to get rid of
<br>
21
database locks
<br>
22
COMMIT CONNECTION r/3*wfcontainer.
<br>
23
ENDIF.
<br>
24
<br>
25
ENDMETHOD.
<br>duplicate here SQL error in the database when accessing a table.
Do not post the same question in more than on forum. -
Loading a .wft file into the database
I have saved my workflow process into a .wft file. I would like to send this file to another person for them to load the process etc into their database. If I open the file, copy the contents of the file (looks like it is some script) into a word document and they then paste those contents into notepad and save the notepad as a .wft file and then upload into the database would this work out? The reason I am asking this question is because, I cannot send them the attachment, but need to write up the contents in a word document.
ThanksYes you can do that.
-
DBIF_RSQL_SQL_ERROR: SQL error in the database when accessing a table
Hi Gurus,
Im getting DBIF_RSQL_SQL_ERROR: SQL error in the database when accessing a table error while I was importing support pack in the system. This is ERP 6.0 with EHP4 with MS SQL in back ground and I was applying the BASIS SP 04. It was in the TEST scenario and in the SPDD_SPAU_CHECK phase it threw the error.
Short text
SQL error in the database when accessing a table.
What can you do?
Note which actions and input led to the error.
For further help in handling the problem, contact your SAP administrator
You can use the ABAP dump analysis transaction ST22 to view and manage
termination messages, in particular for long term reference.
How to correct the error
Database error text........: "[601] Could not continue scan with NOLOCK due to
data movement."
Internal call code.........: "[RSQL/FTCH/E071 ]"
Please check the entries in the system log (Transaction SM21).
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
"SAPLSVRT" or "LSVRTU01"
"TR_LAST_IMPORT_OF_OBJECT"
SPAM is ending with the above short dump. I have checked the space availability and it is OK.
Kindly help.
Renju Aravind.Hi,
this error is very often seen in case of a database corruptions. Please follow note 142731 and perform a complete database check. Send the results when they show errors.
Best regards
Clas -
Scripting to load all pdfs in a month into the place command?
Hello, I was wondering if anyone knows of a script that allows for you to place all pdfs within a set date range from a folder into an InDesign document? I am looking to do my monthly report and each month I have to go out and get each one, would be nice to load the place tool with all the pdfs I have done with a set date range and then just place them accordingly. Is there something out there like this and/or am I missing something obvious?
Thanks!
BIM Sorry tomaxxi, am I suppose to be inputting something somewhere here in
regard to the dates? I would need an example like for lets say the month of
Nov. I try to paste this and save it in the script editor but it keep
saying that the file cannot be saved. Any ideas? Please bear in mind your
speaking to a guy who has like zero knowledge when it comes to scripts.
Best regards,
Robert
From: tomaxxi <[email protected]>
To: Robert Borchardt <[email protected]>
Date: 11/08/2010 03:29 PM
Subject: Scripting to load all pdfs in a month into the place command?
Sorry for delay...
I just tested script and it's working fine for me here.
I created 4 sample PDF-s with just one page, then started script,
selected exported PDF-s, script sorts them by creation date and loads
placegun.
So, all you need to do, is to start script and select documents you want to
place.
I changed script little, so make sure you use this one:
if(app.documents.length != 0){
var myFiles = File.openDialog("Select Files:", "*.pdf", true);
if(myFiles != null){
myFiles.sort(function ( a, b )
if ( a.created < b.created )
return -1;
if ( a.created > b.created )
return 1;
return 0;
app.activeDocument.place(myFiles);
}else{
alert("No files selected!");
}else{
alert("No documents opened!");
tomaxxi
http://indisnip.wordpress.com/ -
Inbound-Queue SYSFAIL: SQL error in the database when accessing a table
Hi,
we send around 80 IDoc simultaneously, there 15 are stuck.
They all have SYSFAIL in SMQ2 with message: SQL error in the database when accessing a table
I already unlocked the queues and try to resend. Nothing happend!
I ran RSQIWKEX for the single queus but now there are new queues in Status SYSFAIL.
I already checked some entries in forum and blogs, but nothing worked out yet!
Can someone help?! it's urgent!!
brHi, well as mentioned i searched and found this already.
But in ST22 i got error concerning
Laufzeitfehler DBIF_RSQL_SQL_ERROR
Ausnahme CX_SY_OPEN_SQL_DB
So i guess it's something more serious.
Any more ideas?!
Can i simply delete the stucked queues and reporcess them?!
br -
Capture Web Cam image in APEX and Upload into the Database
Overview
By using a flash object, you should be able to interface with a usb web cam connected to the client machine. Their are a couple of open source ones that I know about, but the one I chose to go with is by Taboca Labs and is called CamCanvas. This is released under the MIT license, and it is at version 0.2, so not very mature - but in saying that it seems to do the trick. The next part is to upload a snapshot into the database - in this particular implementation, it is achieved by taking a snapshot, and putting that data into the canvas object. This is a new HTML5 element, so I am not certain what the IE support would be like. Once you have the image into the canvas, you can then use the provided function convertToDataURL() to convert the image into a Base64 encoded string, which you can then use to convert into to a BLOB. There is however one problem with the Base64 string - APEX has a limitation of 32k for and item value, so can't be submitted by normal means, and a workaround (AJAX) has to be implemented.
Part 1. Capturing the Image from the Flash Object into the Canvas element
Set up the Page
Required Files
Download the tarball of the webcam library from: https://github.com/taboca/CamCanvas-API-/tarball/master
Upload the necessary components to your application. (The flash swf file can be got from one of the samples in the Samples folder. In the root of the tarball, there is actually a swf file, but this seems to be a different file than of what is in the samples - so I just stick with the one from the samples)
Page Body
Create a HTML region, and add the following:
<div class="container">
<object id="iembedflash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240">
<param name="movie" value="#APP_IMAGES#camcanvas.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<embed allowScriptAccess="always" id="embedflash" src="#APP_IMAGES#camcanvas.swf" quality="high" width="320" height="240"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" mayscript="true" />
</object>
</div>
<p><a href="javascript:captureToCanvas()">Capture</a></p>
<canvas style="border:1px solid yellow" id="canvas" width="320" height="240"></canvas>That will create the webcam container, and an empty canvas element for the captured image to go into.
Also, have a hidden unprotected page item to store the Base64 code into - I called mine P2_IMAGE_BASE64
HTML Header and Body Attribute
Add the Page HTML Body Attribute as:
onload="init(320,240)"
JavaScript
Add the following in the Function and Global Variable Declarations for the page (mostly taken out of the samples provided)
//Camera relations functions
var gCtx = null;
var gCanvas = null;
var imageData = null;
var ii=0;
var jj=0;
var c=0;
function init(ww,hh){
gCanvas = document.getElementById("canvas");
var w = ww;
var h = hh;
gCanvas.style.width = w + "px";
gCanvas.style.height = h + "px";
gCanvas.width = w;
gCanvas.height = h;
gCtx = gCanvas.getContext("2d");
gCtx.clearRect(0, 0, w, h);
imageData = gCtx.getImageData( 0,0,320,240);
function passLine(stringPixels) {
//a = (intVal >> 24) & 0xff;
var coll = stringPixels.split("-");
for(var i=0;i<320;i++) {
var intVal = parseInt(coll);
r = (intVal >> 16) & 0xff;
g = (intVal >> 8) & 0xff;
b = (intVal ) & 0xff;
imageData.data[c+0]=r;
imageData.data[c+1]=g;
imageData.data[c+2]=b;
imageData.data[c+3]=255;
c+=4;
if(c>=320*240*4) {
c=0;
gCtx.putImageData(imageData, 0,0);
function captureToCanvas() {
flash = document.getElementById("embedflash");
flash.ccCapture();
var canvEle = document.getElementById('canvas');
$s('P2_IMAGE_BASE64', canvEle.toDataURL());//Assumes hidden item name is P2_IMAGE_BASE64
clob_Submit();//this is a part of part (AJAX submit value to a collection) two
}In the footer region of the page (which is just a loading image to show whilst the data is being submitted to the collection [hidden by default]) :<img src="#IMAGE_PREFIX#processing3.gif" id="AjaxLoading"
style="display:none;position:absolute;left:45%;top:45%;padding:10px;border:2px solid black;background:#FFF;" />If you give it a quick test, you should be able to see the webcam feed and capture it into the canvas element by clicking the capture link, in between the two elements - it might through a JS error since the clob_Submit() function does not exist yet.
*Part 2. Upload the image into the Database*
As mentioned in the overview, the main limitation is that APEX can't submit values larger than 32k, which I hope the APEX development team will be fixing this limitation in a future release, the workaround isn't really good from a maintainability perspective.
In the sample applications, there is one that demonstrates saving values to the database that are over 32k, which uses an AJAX technique: see http://www.oracle.com/technetwork/developer-tools/apex/application-express/packaged-apps-090453.html#LARGE.
*Required Files*
From the sample application, there is a script you need to upload, and reference in your page. So you can either install the sample application I linked to, or grab the script from the demonstration I have provided - its called apex_save_large.js.
*Create a New Page*
Create a page to Post the large value to (I created mine as 1000), and create the following process, with the condition that Request = SAVE. (All this is in the sample application for saving large values).declare
l_code clob := empty_clob;
begin
dbms_lob.createtemporary( l_code, false, dbms_lob.SESSION );
for i in 1..wwv_flow.g_f01.count loop
dbms_lob.writeappend(l_code,length(wwv_flow.g_f01(i)),wwv_flow.g_f01(i));
end loop;
apex_collection.create_or_truncate_collection(p_collection_name => wc_pkg_globals.g_base64_collection);
apex_collection.add_member(p_collection_name => wc_pkg_globals.g_base64_collection,p_clob001 => l_code);
htmldb_application.g_unrecoverable_error := TRUE;
end;I also created a package for storing the collection name, which is referred to in the process, for the collection name:create or replace
package
wc_pkg_globals
as
g_base64_collection constant varchar2(40) := 'BASE64_IMAGE';
end wc_pkg_globals;That is all that needs to be done for page 1000. You don't use this for anything else, *so go back to edit the camera page*.
*Modify the Function and Global Variable Declarations* (to be able to submit large values.)
The below again assumes the item that you want to submit has an item name of 'P2_IMAGE_BASE64', the condition of the process on the POST page is request = SAVE, and the post page is page 1000. This has been taken srtaight from the sample application for saving large values.//32K Limit workaround functions
function clob_Submit(){
$x_Show('AjaxLoading')
$a_PostClob('P2_IMAGE_BASE64','SAVE','1000',clob_SubmitReturn);
function clob_SubmitReturn(){
if(p.readyState == 4){
$x_Hide('AjaxLoading');
$x('P2_IMAGE_BASE64').value = '';
}else{return false;}
function doSubmit(r){
$x('P2_IMAGE_BASE64').value = ''
flowSelectAll();
document.wwv_flow.p_request.value = r;
document.wwv_flow.submit();
}Also, reference the script that the above code makes use of, in the page header<script type="text/javascript" src="#WORKSPACE_IMAGES#apex_save_large.js"></script>Assuming the script is located in workspace images, and not associated to a specific app. Other wise reference #APP_IMAGES#
*Set up the table to store the images*CREATE TABLE "WC_SNAPSHOT"
"WC_SNAPSHOT_ID" NUMBER NOT NULL ENABLE,
"BINARY" BLOB,
CONSTRAINT "WC_SNAPSHOT_PK" PRIMARY KEY ("WC_SNAPSHOT_ID")
create sequence seq_wc_snapshot start with 1 increment by 1;
CREATE OR REPLACE TRIGGER "BI_WC_SNAPSHOT" BEFORE
INSERT ON WC_SNAPSHOT FOR EACH ROW BEGIN
SELECT seq_wc_snapshot.nextval INTO :NEW.wc_snapshot_id FROM dual;
END;
Then finally, create a page process to save the image:declare
v_image_input CLOB;
v_image_output BLOB;
v_buffer NUMBER := 64;
v_start_index NUMBER := 1;
v_raw_temp raw(64);
begin
--discard the bit of the string we dont need
select substr(clob001, instr(clob001, ',')+1, length(clob001)) into v_image_input
from apex_collections
where collection_name = wc_pkg_globals.g_base64_collection;
dbms_lob.createtemporary(v_image_output, true);
for i in 1..ceil(dbms_lob.getlength(v_image_input)/v_buffer) loop
v_raw_temp := utl_encode.base64_decode(utl_raw.cast_to_raw(dbms_lob.substr(v_image_input, v_buffer, v_start_index)));
dbms_lob.writeappend(v_image_output, utl_raw.length(v_raw_temp),v_raw_temp);
v_start_index := v_start_index + v_buffer;
end loop;
insert into WC_SNAPSHOT (binary) values (v_image_output); commit;
end;Create a save button - add some sort of validation to make sure the hidden item has a value (i.e. image has been captured). Make the above conditional for request = button name so it only runs when you click Save (you probably want to disable this button until the data has been completely submitted to the collection - I haven't done this in the demonstration).
Voila, you should have now be able to capture the image from a webcam. Take a look at the samples from the CamCanvas API for extra effects if you wanted to do something special.
And of course, all the above assumed you want a resolution of 320 x 240 for the image.
Disclaimer: At time of writing, this worked with a logitech something or rather webcam, and is completely untested on IE.
Check out a demo: http://apex.oracle.com/pls/apex/f?p=trents_demos:webcam_i (my image is a bit blocky, but i think its just my webcam. I've seen others that are much more crisp using this) Also, just be sure to wait for the progress bar to dissappear before clicking Save.
Feedback welcomed.Hmm, maybe for some reason you aren't getting the base64 version of the saved image? Is the collection getting the full base64 string? Seems like its not getting any if its no data found.
The javascript console is your friend.
Also, in the example i used an extra page, from what one of the examples on apex packages apps had. But since then, I found this post by Carl: http://carlback.blogspot.com/2008/04/new-stuff-4-over-head-with-clob.html - I would use this technique for submitting the clob, over what I have done - as its less hacky. Just sayin.
Maybe you are looking for
-
I could not pair my bluetooth device with my ipad mini retina display. My ipad could not detect the bluetooth device. I do not facing this problem with my iphone and my older ipad on the same bluetooth device.Is there anyone facing the same problem?
-
HI, I have a String that i obtain supose as "16:30"..I need to 1.Convert this String into a time object 2.Use this Time object's value into an SQL Query as: Query="SELECT * FROM Table WHERE Time='TimeVal'; That is,i need to display all records where
-
hi, what apps is there available to linux for Project management? I been using MS Project so far but thats for windows :S would be nice to start doing that part in linux too. /Thomas
-
How can I get a new overhead line replaced?
Hey guys, I suscribed to BT infinity two months ago and I've noticed that everytime it rains my internet is knocked offline. Yesterday my area was battered with rain and wind all day and my internet disconnected 6 times an hour as the light kept goin
-
VAT Configuration for India with out CIN
Hi Experts, Greetings. My clinet is into service industry,basically our products include online data sets, software. When the Project was implemented as per the discussions with the tax experts the system is configured with out CIN. All these P