KM_RKM SQL LDAP (JYTHON).xml
Hello,
I am using the reverse engineering module. The tables are correctly retrieved. The columns aren't.
This might be the caused by:
clst = self.metadata.getColumns(self.srccatalog, self.srcschema, tablename, '%')
I get messages in the log resulting from:
self.logger.record(' *** Getting Columns for table: %s**' % tablename).
The tablename is correct.
Using java all works well.
Anybody?
kind regards,
Frans.
Hello,
I am using the reverse engineering module. The tables are correctly retrieved. The columns aren't.
This might be the caused by:
clst = self.metadata.getColumns(self.srccatalog, self.srcschema, tablename, '%')
I get messages in the log resulting from:
self.logger.record(' *** Getting Columns for table: %s**' % tablename).
The tablename is correct.
Using java all works well.
Anybody?
kind regards,
Frans.
Similar Messages
-
Can we generate the output of SQL Query in XML format ..
Hi Team,
Can we generate an XML doc for an SQL Query.
I've seen in SQL Server 2000.It is generating the output of an SQL Query in xml format.
select * from emp for xml auto
The output looks like
<emp EMPNO="7369" ENAME="SMITH" JOB="CLERK" MGR="7902" HIREDATE="1980-12-17T00:00:00" SAL="2800" DEPTNO="20"/><emp EMPNO="7370" ENAME="SMITH" JOB="CLERK" MGR="7902" HIREDATE="1980-12-17T00:00:00" SAL="2800" DEPTNO="10"/>Just a little bit of short hand.
Get the XML out of your database, via HTTP
Of course the easiest method is just to return an XMLType from a stored procedure and let the calling routine figure out what to do with it. Instead
of that way though, I'll show you how to do it via HTTP. It's all completely built into 10g and is super easy to use.
CREATE OR REPLACE VIEW emps_and_depts AS
SELECT e.employee_id AS "EmployeeId",
e.last_name AS "Name",
e.job_id AS "Job",
e.manager_id AS "Manager",
e.hire_date AS "HireDate",
e.salary AS "Salary",
e.commission_pct AS "Commission",
XMLFOREST (
d.department_id AS "DeptNo",
d.department_name AS "DeptName",
d.location_id AS "Location"
) AS "Dept"
FROM employees e, departments d
WHERE e.department_id = d.department_id
Some people hear web and immediately start salivating about security issues. Let me address that quickly. Just because you have the HTTP and/or
FTP servers running in the database, that does not mean you have a security problem. For one, I would hope your databases are behind a firewall.
Second, with the correct architecture (DMZ, app servers, etc) you can make this data available outside the firewall fairly transparently and third,
just because it's on the web does not mean the data MUST be available on the internet. This is a good way to make your data available on your
intranet. If you are worried about people INSIDE your firewall, that still doesn't preclude web based access. Follow Oracle security guidelines.
Before I show you how to get to your data, let's talk about URLs and URIs. A URL is a Uniform Resource Locater and URI is a Uniform Resource
Identifier. A URL is the way you would identify a document on the net, i.e. http://www.oracle.com is a URL. A URI is a more generic form of a URL.
Oracle supports three types of URI: HTTPURIType - basically a URL (which would be like the URL above), XDURIType - a pointer to an XDB resource
(usually an XML document but can be other objects), and DBURIType - a pointer to database objects.
It's the DBURIType that we're going to concentrate on here. The DBURIType let's us reference database objects using a file/folder paradigm. The
format for a DBURI is /oradb/<schema>/<table>. Oradb is shorthand for the database; it is not the database name or SID. My database is named XE
but I still use oradb in the DBURI. For example, the view we created above is in my XE database, is owned by HR (at least in my case) and is called
EMPS_AND_DEPTS. This can be referenced as /oradb/HR/EMPS_AND_DEPTS.
If the view had many rows and you wanted only one of them, you can restrict it by including a predicate. The documentation for XDB has a great
write up on Using DBURIs.In our case, we are going to write out the entire document. Now that you understand that the DBURI is a pointer to
objects in our instance, we can use that to access the data as a URL.
The format for the URL call is http://<machinename>:<port>/<DBURI>
In my case, my XE database is running on a machine called mach1 and is listening on port 8080. So to see the view we created above, I open my
browser and navigate to: http//mach1:8080/oradb/HR/EMPS_AND_DEPTS
The created URL will be as http//mach1:8080/oradb/PUBLIC/EMPS_AND_DEPTS
If your database is set up correctly and listening on port 8080 (the default), your browser should ask you to login. Login as the user who created the
view (in my case HR). You should now get an XML document displayed in your browser.
And that's it. It doesn't get much simpler than that. If you get rid of the descriptive text above, it basically comes down to:
Create a table or view
Open your web browser
Enter a URL
Enter a user ID and password
View your XML
If you notice, Oracle formatted the data as XML for us. Our view returns scalar columns and an XML fragment called Dept. Oracle formatted the
return results into an XML format.
And as a side note, if you look closely, you'll see that my URL has PUBLIC where I said to put HR. PUBLIC is a synonym for all objects that your
logged in user can see. That way, if your user has been granted select access on many schemas, you can use PUBLIC and see any of them. -
LIKE operator is not working in SQL Query in XML file
Hi Gurus,
LIKE operator is not working in SQL query in XML template.
I am creating a PDF report in ADF using Jdeveloper10g. The XML template is as follows
<?xml version="1.0" encoding="WINDOWS-1252" ?>
<dataTemplate name="catalogDataTemplate" description="Magazine
Catalog" defaultPackage="" Version="1.0">
<parameters>
<parameter name="id" dataType="number" />
<parameter name="ename" dataType="character" />
</parameters>
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[
SELECT ename, empno, job, mgr from EMP where deptno=:id and ename LIKE :ename || '%']]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="EmployeeInfo" source="Q1">
<element name="EmployeeName" value="ename" />
<element name="EMPNO" value="empno" />
<element name="JOB" value="job"/>
<element name="MANAGER" value="mgr" />
</group>
</dataStructure>
</dataTemplate>
if i pass the parameter value of :ename from UI, it doesn't filter. But if I give ename = :ename it retrieves the data. Can anyone help me why LIKE operator doesn't work here?
Appreciate your help,
Shyamal
email: [email protected]Hi
Well for a start, you are doing some very strange conversions there. For example...
and to_char(a.msd, 'MM/DD/YYYY') != '11/11/2030'
and to_char(a.msd, 'MM/DD/YYYY') != '10/10/2030'If a.msd is a date then you should e converting on the other side ie.
and a.msd != TO_DATE('11/11/2030', 'MM/DD/YYYY')
and a.msd != TO_DATE('10/10/2030', 'MM/DD/YYYY')Also, you may want to take into consideration nothing being input in :P2_ITEM_NUMBER like this...
AND INSTR(a.item_number,NVL(:P2_ITEM_NUMBER,a.item_number)) > 0Is item number actually a number or char field? If it's a number, you want to explicitly convert it to a string for using INSTR like this...
AND INSTR(TO_CHAR(a.item_number),NVL(TO_CHAR(:P2_ITEM_NUMBER),TO_CHAR(a.item_number))) > 0?
Cheers
Ben -
Equivalent of SQL JOINs using XML + XPath
I have been working on a Java app for a while that takes user queries and searches various translations of the Bible. The data is stored in 66 .xml files, one per book of the Bible, and those files, in turn, are stored in a .jar file.
The user may select 2 or more translations and see them in parallel. So for example, let's say that want Matthew chapter 1 and verses 1 to 10 from KJV and ASV. I simply use the following XPath expression: /book/chapter[@num=1]/verse[@num>=1 and @num<=10] . Then I use XPathFactory, XPath, compile() and evaluate() on Matthew.xml from kjv.jar and asv.jar.
However, the problem is not so simple for keyword queries from the user. In such a case the tool searches for keywords in one translation and then finds the same verses from all subsequent translations. Here the XPath expression might be more like: /book/chapter/verse[contains(., 'keyword1') and contains(., 'keyword2')] for the first translation. However, if I ran the same query on subsequent translations they may or may not return the exact same set of verses (depending on language (English, Greek, Hebrew) and also on the dialect (Old English vs. Modern English)). So, my question is what is the most efficient way of obtaining the same verses from subsequent translations?
I could simply look up the verses in the first translation, then use DOM API calls to find the chapter and verse numbers, and look those up in the other translations. But this seems tedious, SLOW, and possibly more error prone.
Also, a second question: if I wanted to include a help file in my application's .jar file. How could I access that file programmatically? That is, how do I tell the application to look for "help.html" in the jar file so I can manipulate and/or display the contents to the user?
And last question: since, I'm still learning my way around Java and XML, how would I go about programmatically applying a .xsl file to some given .xml input to produce HTML + CSS output? What classes, interfaces, etc. should I look up for this? And can anyone point me to sample code online for this?However, the problem is not so simple for keyword
queries from the user. In such a case the tool
searches for keywords in one translation and then
finds the same verses from all subsequent
translations. Here the XPath expression might be
more like: /book/chapter/verse[contains(.,
'keyword1') and contains(., 'keyword2')] for the
first translation. However, if I ran the same query
on subsequent translations they may or may not return
the exact same set of verses (depending on language
(English, Greek, Hebrew) and also on the dialect (Old
English vs. Modern English)). So, my question is
what is the most efficient way of obtaining the same
verses from subsequent translations?
I could simply look up the verses in the first
translation, then use DOM API calls to find the
chapter and verse numbers, and look those up in the
other translations. But this seems tedious, SLOW,
and possibly more error prone.There's nothing in XPath that I know of that helps with this. SQL is relational, XML is hierarchical. They're fundamentally different.
Also, a second question: if I wanted to include a
help file in my application's .jar file. How could I
access that file programmatically? That is, how do I
tell the application to look for "help.html" in the
jar file so I can manipulate and/or display the
contents to the user?If it's an HTML file, it's likely that you'll package it in a WAR file, along with the rest of your app. It's accessible as a URL that way.
And last question: since, I'm still learning my way
around Java and XML, how would I go about
programmatically applying a .xsl file to some given
.xml input to produce HTML + CSS output? What
classes, interfaces, etc. should I look up for this?.xsl transformations are applied using XSL-T engines, like Apache's Xalan. You would embed the HTML that you want to inject the XML data into in the XSL-T stylesheet.
That's one way. Another is to use a templating alternative like Velocity.
And can anyone point me to sample code online for this?Try the Apache Xalan docs. Or this:
http://www.cafeconleche.org/books/xmljava/chapters/ch17.html
% -
Error in IKM SQL to JMS XML Append
Hi
I am doing transformation from Oracle table to XML and send that XML to JMS Queue.
So i am uing 1) IKM SQL to JMS XML append 2) LKM SQL to SQL
In IKM SQL to JMS XML append
set following parameters:
SYNCHRO_XML_TO_JMS = true
INITIALIZE_XML_SCHEMA = true
JMS_EXTRACT_MESSAGE = <Root element name>
when execute interface,
Getting error in step "Insert into XML (JMS Message)" like
ODI-1228: Task INBOUND_XML_TEST (Integration) fails on the target JMS_QUEUE_XML connection INBOUND_XML.
Caused By: java.sql.SQLException: java.sql.SQLException: Parameter not set
at com.sunopsis.jdbc.driver.JMSXMLPreparedStatement.addBatch(JMSXMLPreparedStatement.java:62)
at oracle.odi.runtime.agent.execution.sql.BatchSQLCommand.execute(BatchSQLCommand.java:42)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:84)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740
Regards,
Ankush.Hi,
Is this issue resolved? If so, can you provide the fix?
I am getting the same error.
Thanks,
Ruby
Edited by: Rubellah Rajakumar on Oct 1, 2012 5:21 PM -
When production version of Oracle XML Parser for PL/SQL is
available?
and what are other XML utilities to be available for PL/SQL?
nullDo you have more precison about the date of the production
version of Oracle XML Parser for PL/SQL?
Oracle XML Team wrote:
: We have not yet announced a production date for the PL/SQL
: version as this just went beta and we need to get sufficient
: feedback. Have you tried it? Other PL/SQL XML utilities can
be
: found at http://www.oracle.com/xml/plsxml/index.html.
: Oracle XML Team
: http://technet.oracle.com
: Oracle Technology Network
: Boris Kolodny (guest) wrote:
: : When production version of Oracle XML Parser for PL/SQL is
: : available?
: : and what are other XML utilities to be available for PL/SQL?
null -
Display sql output in xml format
Hi,
We are using Oracle 9i. I want to display output of a sql query as xml format.
I noticed EXTRACT function in SQL does this. Can anyone please explain XMLType instance and XPath string parameters of this function.
All of my table columns are NUMBER/VARCHAR2 data types and the table is also NOT a XML Type. Please let me know the solution.
Thanks.SQL> select dbms_xmlquery.getxml('select * from scott.emp where rownum < 3') from dual ;
DBMS_XMLQUERY.GETXML('SELECT*FROMSCOTT.EMPWHEREROWNUM<3')
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
<MGR>7902</MGR>
<HIREDATE>12/17/1980 0:0:0</HIREDATE>
<SAL>800</SAL>
<DEPTNO>20</DEPTNO>
</ROW>
<ROW num="2">
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
<MGR>7698</MGR>
<HIREDATE>2/20/1981 0:0:0</HIREDATE>
<SAL>1600</SAL>
<COMM>304</COMM>
<DEPTNO>30</DEPTNO>
</ROW>
</ROWSET>
1 row selected.
SQL> select XMLType(dbms_xmlquery.getxml('select * from scott.emp where rownum < 3')).extract('/ROWSET/ROW[@num = "2"]/ENAME/text()').getStringVal() from dual ;
XMLTYPE(DBMS_XMLQUERY.GETXML('SELECT*FROMSCOTT.EMPWHEREROWNUM<3')).EXTRACT('/ROWSET/ROW[@NUM="2"]/ENAME/TEXT()').GETSTRINGVAL()
ALLEN
1 row selected.
SQL> -
Sql:variable and XML query performance
Can someone help with sql:variable() in xml queries? It seems that when I attempt to reference variables with the sql:variable(...) function in an xpath function (exist or nodes) it comes up with a totally different query plan, possibly ignoring
my secondary indices like the ones for VALUE, PATH.
But if I replace sql:variable("@p_ObjectIdentifierForReference") with the literal (ie. "ord/p/ord0616.p") then it uses secondary indices more consistently.
Below you will see an unsuccessful attempt to get the query to "OPTIMIZE FOR" a specific literal value of @p_ObjectIdentifierForReference. But this doesn't give work. It doesn't give me a plan using the secondary index I expect.
Ideally there would be a way to get the sql:variable(...) function to give the same query plan as a literal. Not sure why that isn't the default behavior.
DECLARE
@p_ObjectIdentifierForReference
varchar(500);
SET
@p_ObjectIdentifierForReference
= 'ord/p/ord0616.p';
WITH
XMLNAMESPACES ('uri:schemas-progress-com:XREFD:0004'
as D)
SELECT
XREF_FileDataReference.XREF_FileData
AS XrefFileData,
InnerRowNode.value('/D:Reference[1]/D:File-num[1]',
'int')
AS FileNumber,
InnerRowNode.value('/D:Reference[1]/D:Line-num[1]',
'int')
AS LineNumber
FROM
(SELECT
XREF.XREF_FileData.XREF_FileData,
XREF.XREF_FileData.XREF_FileEntry,
InnerRow.query('.')
AS InnerRowNode
FROM
XREF.XREF_FileData
OUTER APPLY
DataXref.nodes('/D:Cross-reference/D:Source/D:Reference[@Object-identifier = sql:variable("@p_ObjectIdentifierForReference")
and @Reference-type = "RUN"]')
as T(InnerRow)
WHERE DataXref.exist('/D:Cross-reference/D:Source/D:Reference[@Object-identifier
= sql:variable("@p_ObjectIdentifierForReference") and @Reference-type = "RUN"]')
= 1)
AS XREF_FileDataReference
INNER
JOIN XREF.XREF_MemberBuilt
ON XREF_MemberBuilt.XREF_FileData
= XREF_FileDataReference.XREF_FileData
INNER
JOIN XREF.XREF_FileEntry
ON XREF_FileEntry.XREF_FileEntry
= XREF_FileDataReference.XREF_FileEntry
WHERE
XREF_MemberBuilt.XREF_ProjectBuilt
= 69
OPTION(RECOMPILE,
OPTIMIZE FOR (@p_ObjectIdentifierForReference
= 'ord/p/ord0616.p')I tried to create a "repro" of your query so we can work on it and try and improve it, but I got the best results by just adding text() and [1] to it, eg
SELECT
XREF_FileDataReference.XREF_FileData AS XrefFileData,
InnerRowNode.value('(/D:Reference/D:File-num/text())[1]', 'int') AS FileNumber,
InnerRowNode.value('(/D:Reference/D:Line-num/text())[1]', 'int') AS LineNumber
FROM (
In my main repro, even with a large piece of xml with 100,000 elements, there still wasn't much difference between the queries:
USE tempdb
GO
IF NOT EXISTS ( SELECT * FROM sys.schemas WHERE name = 'XREF' )
EXEC( 'CREATE SCHEMA XREF' )
GO
IF OBJECT_ID('XREF.XREF_FileData') IS NOT NULL DROP TABLE XREF.XREF_FileData
CREATE TABLE XREF.XREF_FileData
rowId INT IDENTITY,
DataXref XML,
XREF_FileData INT,
XREF_FileEntry INT,
CONSTRAINT PK_XREF_FileData PRIMARY KEY ( rowId )
GO
IF OBJECT_ID('XREF.XREF_MemberBuilt') IS NOT NULL DROP TABLE XREF.XREF_MemberBuilt
CREATE TABLE XREF.XREF_MemberBuilt
XREF_ProjectBuilt INT,
XREF_FileData INT
GO
IF OBJECT_ID('XREF.XREF_FileEntry') IS NOT NULL DROP TABLE XREF.XREF_FileEntry
CREATE TABLE XREF.XREF_FileEntry
XREF_FileEntry INT
GO
-- Create larger piece of xml for repro
;WITH XMLNAMESPACES ( DEFAULT 'uri:schemas-progress-com:XREFD:0004' ), cte AS (
SELECT TOP 100000 ROW_NUMBER() OVER ( ORDER BY ( SELECT 1 ) ) rn
FROM master.sys.columns c1
CROSS JOIN master.sys.columns c2
CROSS JOIN master.sys.columns c3
INSERT INTO XREF.XREF_FileData ( DataXref, XREF_FileData, XREF_FileEntry )
SELECT
SELECT
CASE rn WHEN 9999 THEN 'ord/p/ord0616.p' ELSE CAST( rn AS VARCHAR(20) ) END AS "@Object-identifier",
'RUN' AS "@Reference-type",
SELECT
rn AS "File-num",
rn * 10 AS "Line-num"
FOR XML PATH(''), TYPE
) AS "*"
FROM cte
FOR XML PATH('Reference'), ROOT('Source'), TYPE
).query('<Cross-reference xmlns="uri:schemas-progress-com:XREFD:0004">{.}</Cross-reference>'), 1, 100
INSERT INTO XREF.XREF_FileEntry ( XREF_FileEntry )
VALUES ( 100 )
INSERT INTO XREF.XREF_MemberBuilt ( XREF_ProjectBuilt, XREF_FileData )
VALUES ( 69, 1 )
GO
--SELECT * FROM XREF.XREF_FileData
--SELECT * FROM XREF.XREF_FileEntry
--SELECT * FROM XREF.XREF_MemberBuilt
--GO
-- Add primary XML index
CREATE PRIMARY XML INDEX xidx_XREF_FileData ON XREF.XREF_FileData (DataXref)
GO
-- Add value, property and path xml indexes
CREATE XML INDEX xvalidx_XREF_FileData ON XREF.XREF_FileData (DataXref)
USING XML INDEX xidx_XREF_FileData FOR VALUE
CREATE XML INDEX xpthidx_XREF_FileData ON XREF.XREF_FileData (DataXref)
USING XML INDEX xidx_XREF_FileData FOR PATH
CREATE XML INDEX xprpidx_XREF_FileData ON XREF.XREF_FileData (DataXref)
USING XML INDEX xidx_XREF_FileData FOR PROPERTY
GO
:exit
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
GO
DECLARE @p_ObjectIdentifierForReference varchar(500);
SET @p_ObjectIdentifierForReference = 'ord/p/ord0616.p';
;WITH XMLNAMESPACES ('uri:schemas-progress-com:XREFD:0004' as D)
SELECT
XREF_FileDataReference.XREF_FileData AS XrefFileData,
InnerRowNode.value('/D:Reference[1]/D:File-num[1]', 'int') AS FileNumber,
InnerRowNode.value('/D:Reference[1]/D:Line-num[1]', 'int') AS LineNumber
FROM (
SELECT
XREF.XREF_FileData.XREF_FileData,
XREF.XREF_FileData.XREF_FileEntry,
InnerRow.query('.') AS InnerRowNode
FROM XREF.XREF_FileData
OUTER APPLY DataXref.nodes('/D:Cross-reference/D:Source/D:Reference[@Object-identifier = sql:variable("@p_ObjectIdentifierForReference") and @Reference-type = "RUN"]') as T(InnerRow)
WHERE DataXref.exist('/D:Cross-reference/D:Source/D:Reference[@Object-identifier = sql:variable("@p_ObjectIdentifierForReference") and @Reference-type = "RUN"]') = 1
) AS XREF_FileDataReference
INNER JOIN XREF.XREF_MemberBuilt ON XREF_MemberBuilt.XREF_FileData = XREF_FileDataReference.XREF_FileData
INNER JOIN XREF.XREF_FileEntry ON XREF_FileEntry.XREF_FileEntry = XREF_FileDataReference.XREF_FileEntry
WHERE XREF_MemberBuilt.XREF_ProjectBuilt = 69
OPTION( RECOMPILE, OPTIMIZE FOR (@p_ObjectIdentifierForReference = 'ord/p/ord0616.p') )
GO
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
GO
DECLARE @p_ObjectIdentifierForReference varchar(500);
SET @p_ObjectIdentifierForReference = 'ord/p/ord0616.p';
;WITH XMLNAMESPACES ('uri:schemas-progress-com:XREFD:0004' as D)
SELECT
XREF_FileDataReference.XREF_FileData AS XrefFileData,
InnerRowNode.value('(/D:Reference/D:File-num/text())[1]', 'int') AS FileNumber,
InnerRowNode.value('(/D:Reference/D:Line-num/text())[1]', 'int') AS LineNumber
FROM (
SELECT
XREF.XREF_FileData.XREF_FileData,
XREF.XREF_FileData.XREF_FileEntry,
InnerRow.query('.') AS InnerRowNode
FROM XREF.XREF_FileData
OUTER APPLY DataXref.nodes('/D:Cross-reference/D:Source/D:Reference[@Object-identifier = sql:variable("@p_ObjectIdentifierForReference") and @Reference-type = "RUN"]') as T(InnerRow)
WHERE DataXref.exist('/D:Cross-reference/D:Source/D:Reference[@Object-identifier = sql:variable("@p_ObjectIdentifierForReference") and @Reference-type = "RUN"]') = 1
) AS XREF_FileDataReference
INNER JOIN XREF.XREF_MemberBuilt ON XREF_MemberBuilt.XREF_FileData = XREF_FileDataReference.XREF_FileData
INNER JOIN XREF.XREF_FileEntry ON XREF_FileEntry.XREF_FileEntry = XREF_FileDataReference.XREF_FileEntry
WHERE XREF_MemberBuilt.XREF_ProjectBuilt = 69
OPTION( RECOMPILE, OPTIMIZE FOR (@p_ObjectIdentifierForReference = 'ord/p/ord0616.p') )
GO
So I guess I'm saying I cannot reproduce your problem on SQL 2008 R2 or SQL 2012. Does anything about this repro stand out as different from your situation?
Looking at your query I would say you might consider the following:
are you really seeing big differences in query duration?
pretty much ignore estimated plan costs for xml queries
consider breaking it up; eg carve off the xml then do the joins? If poor cardinality estimation is part of the problem this might help
Understand what PATH, PROPERTY and VALUE are for, then only create the ones you need
do you really have the range of queries that requires all three?
this is still a great article on xml indexes:
http://technet.microsoft.com/en-us/library/ms191497.aspx
What's performance like with the primary xml index only?
If performance is that important, consider materialising the columns permanently
I think the buffer_descriptors stuff is a distraction - mostly your cache is warm right?
plan forcing could be a last resort
Selective XML indexes in SQL 2012 onwards are great : ) much less storage required for example but much more specific -
Folks
I need to separate SQL statements from Java Code, How do i put these SQL Statements in an XML file and how to access these SQL statements from a Java code,
Any help with sample code is greatful,The use of entities as kstc_jyu may help. It really depends on how you design the XML vocabulary based on the expected usage (e.g., if the SQL statements change very often).
Back to the original question, I am right to interpret "how to use SQL statements in XML ?" as how to design an XML vocabulary to store SQL statements?
If not, you can simply use the scheme proposed by DrClap. Reading and extracting the SQL statement would be just as you would with any other XML document. Google for a Java XML tutorial. -
Folks
I need to separate SQL statements from Java Code, How do i put these SQL Statements in an XML file and how to access these SQL statements from a Java code,
Any help with sample code is greatful,
thanks
mathewI looked it and they support only Perl now, Infact i saw some questions posted in some forums about having SQL statements in XML, but i am not able to get that information,Let me know if you can get any information,
thanks
KM -
Import/export data from ms sql 7 to xml file in a particular xpdl format
I'm trying to write java program to import/export data from ms sql 7 to xml file in a particular xpdl format. Can anyone suggest how to do it?
take a glance at what these guys do: http://www.openbusinessengine.org/docs/guide.html
-
Error in IKM SQL to JMS XML Append SQLException: Parameter not set
Hi I am getting following error please can any one help its oracle to JMS XML integration
ODI-1228: Task jms_vendor_xml (Integration) fails on the target JMS_QUEUE_XML connection jms_xml_vendor.
Caused By: java.sql.SQLException: java.sql.SQLException: Parameter not set
at com.sunopsis.jdbc.driver.JMSXMLPreparedStatement.addBatch(JMSXMLPreparedStatement.java:62)
at oracle.odi.runtime.agent.execution.sql.BatchSQLCommand.execute(BatchSQLCommand.java:42)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:87)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: Parameter not set
at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatementRedirector.addBatch(SnpsXmlPreparedStatementRedirector.java:155)
at com.sunopsis.jdbc.driver.JMSXMLPreparedStatement.addBatch(JMSXMLPreparedStatement.java:58)
... 17 more
Source Code
select
FNL_VENDORT.COMPANY SNPSFILENAME,
FNL_VENDORT.VNAME SNPSFILEPATH,
FNL_VENDORT.ACCTNUM VENDORSPK
from AMIT.FNL_VENDORT FNL_VENDORT
where
(1=1)
Target Code
Insert into
VENDORS
SNPSFILENAME,
SNPSFILEPATH,
SNPSLOADDATE,
VENDORSPK
values
:SNPSFILENAME,
:SNPSFILEPATH,
:SNPSLOADDATE,
:VENDORSPK
/*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=VENDORSSNP$CRLOAD_FILE=VENDORS.VENDORSSNP$CRFILE_FORMAT=SNP$CRFILE_SEP_FIELD=SNP$CRFILE_SEP_LINE=SNP$CRFILE_FIRST_ROW=SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=SNPSFILENAMESNP$CRTYPE_NAME=VARCHARSNP$CRORDER=1SNP$CRLENGTH=0SNP$CRSCALE=0SNP$CRPRECISION=255SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=SNPSFILEPATHSNP$CRTYPE_NAME=VARCHARSNP$CRORDER=2SNP$CRLENGTH=0SNP$CRSCALE=0SNP$CRPRECISION=255SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=SNPSLOADDATESNP$CRTYPE_NAME=VARCHARSNP$CRORDER=3SNP$CRLENGTH=0SNP$CRSCALE=0SNP$CRPRECISION=255SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=VENDORSPKSNP$CRTYPE_NAME=NUMERICSNP$CRORDER=4SNP$CRLENGTH=0SNP$CRSCALE=0SNP$CRPRECISION=10SNP$CR$$SNPS_END_KEY*/
/*$$JMS_START_KEY
JMSDELIVERYMODE=2,
JMSTYPE=,
JMSEXPIRATION=0,
JMSPRIORITY=9,
MESSAGETIMEOUT=3000,
NEXTMESSAGETIMEOUT=,
MESSAGEMAXNUMBER=,
DURABLE=,
CLIENTID=,
MESSAGESELECTOR=
$$JMS_END_KEY*/Hi,
Try setting all values (without <default>:) to required fields in Target properties to IKM SQL to JMS XML append.
Thanks -
Inst. XDK on Oracle 8.05, just to transform sql-query in xml
hi,
id like to install xdk to use xsu to transform a sql query in xml.
(i didnt find a way to download xsu without xdk)
i4ve oracle 8.0.5 but i only find 9i-xdk-(pl/sql) - is this correct?
what do i have to notice when i install
this package with my orace-ver?
thanks :o)XDK 9.x is not only for Oracle9i Database. You can download the
9.0.2B XDK for Java and use XSU [or xsu12.jar(xsu11.jar)]. -
I am having trouble using the Query Multiple LDAP to XML component. I have it configured right(?) in the workflow. I am trying to retrieve a couple of attributes about the user who is logged in. For now, I have a text box with an invoke button on my form to simulate the action of getting the logged in user.
In my process, if I hardcode a user in or if I invoke the process via the Components label it runs fine and returns the correct XML. If I try to invoke the web service via my form, I receive an "error attempting to read from file".
I have never queried the LDAP before and I am a little confused. Could anyone offer some help?I have actually disabled the security for that service. I am thinking the problem is that the LDAP server has some sort of block on web service calls. Could that be the issue? All of my other web services (configured the same exact way) function just fine, and running the query in LiveCycle Workbench works fine. That leads me to believe that something is stopping the WSDL connection.
-
Learning sql and pssql ,xml,forms and report
ihave learned sql and plsql i donot Xml and forms and reports how to learn by own by easy method
by sql and psql we have learned from basic to higher ,weather things going from book to online (any other way to practising and understanding the concepts)learning sql and pssql ,xml,forms and repojavascript:;learning sql and pssql ,xml,forms and reportrt for beginners
Maybe you are looking for
-
Laser Jet CP1215 Color Matching Issues;
Colors are abnormally darker than the photos, art and copy especially those in red.They appear to be redishbrown. But, not all the photos/art on a page are effected. I have been working with HP Thech service guy who has put me through several days of
-
IPad Set Up without a PC or Mac
Just bought my first Apple product, an iPad 2. My work laptop is restricting me from downloading iTunes, which I require to set up my iPad. How do I set up my iPad? Is my only option going to an Apple Store? Will I have to do this many times or just
-
Error while Requsting fro Service Request ISR form
Hi, I had configured ADS and i'am trying to acess ISR forms from portal but when am trying to acess it is giving an error "<b>com.sap.pcuigp.xssfpm.java.FPMRuntimeException: Work item 000000000000 could not be read</b>" Anybody please guide me in thi
-
I use window xp with sp2 two day ago i update sp2 in sp3. After it adobe reader can't take print out on my canon lbp1210 printer. When i go for print there a massage about Date execution prevention & adobe reader was close. I use adobe reader versio
-
Unable to enter email address to gift song, what's wrong?
I want to send a song to an email address, but after I select the song and click "gift this song", the box that comes up does not allow me to enter the email address of the person I want to send the song to. What am I doing wrong?