Oracle distributed query problem
Hi,
I am running a nested query on multiple oracle servers of 10g R2 using DBLinks. But if the levels of nested query is increased e.g 3 or 4, oracle gives an error of ORA-02063.
Can any one please help on this.
Thanks,
Usman
Thanks for the quick response.
Following is the query:
select
Count( nvl(t1_st.t1_st_DG1.EMPTY,0)) AS "F1" ,
Count( nvl(rpt2."F2",0)) AS "F2" ,
Count( nvl(rpt1."F3",0)) AS "F3"
from t1_st.t1_st_JT@DBL_4_15_2008_4_41_11_PM761
INNER JOIN t1_st.t1_st_DG1@DBL_4_15_2008_4_41_11_PM761 On t1_st.t1_st_DG1.DG1_ID =t1_st.t1_st_JT.DG1_ID
Full outer join
( select t1_st.t1_st_DG1.EMPTY AS "F3" , t1_st.t1_st_DG1.EMPTY AS "F4"
from t1_st.t1_st_JT@DBL_4_15_2008_4_41_11_PM761
INNER JOIN t1_st.t1_st_DG1@DBL_4_15_2008_4_41_11_PM761 On t1_st.t1_st_DG1.DG1_ID =t1_st.t1_st_JT.DG1_ID
) rpt1 On nvl(t1_st.t1_st_DG1.EMPTY,' ')=nvl(rpt1."F4",' ')
Full outer join
( select t1_st.t1_st_DG1.EMPTY AS "F2" , t1_st.t1_st_DG1.EMPTY AS "F5"
from t1_st.t1_st_JT@DBL_4_15_2008_4_41_11_PM761
INNER JOIN t1_st.t1_st_DG1@DBL_4_15_2008_4_41_11_PM761 On t1_st.t1_st_DG1.DG1_ID =t1_st.t1_st_JT.DG1_ID
) rpt2 On nvl(t1_st.t1_st_DG1.EMPTY,' ')=nvl(rpt2."F5",' ') ;
Following is the error:
SQL Error: ORA-00904: "A2"."QCSJ_C000000000300001": invalid identifier
ORA-02063: preceding line from DBL_4_15_2008_4_41_11_PM761
Please note that query itself has no errors (i have confirmed this by running the query on its own server i.e without dblinks)
Thanks,
Usman
Similar Messages
-
Hi All,
I have a distributed deployment of two oracle instances where database A keeps a replication of a schema from database B.
I have A and B linked together, B sees A as a remote database, and my application sends queries to database B.
Let's say I have the following two queries:
The following is issued to B:
select * from magic.accountejb@A a where a.profile_userid = ( select userid from magic.accountprofileejb@A ap where ap.userid = 'uid:174')
and the following issued directly to A (which is basically the same query as above):
select * from accountejb a where a.profile_userid = ( select userid from accountprofileejb ap where ap.userid = 'uid:174')
when I measure the time through my Java application, the second query executes more than 3 times faster than the first query (23ms on A compared to 80ms on B). However, when I use the sqlplus client on B to issue the exact same query, the execution time reported by sqlplus is almost identical to the second one(20ms).
When I monitor the execution plan through *@UTLXPLAN*, it seems like the query sent to B is also fully executed remotely and on A. with a network latency of 11ms between A and B, I am not sure why I see such a long delay for the first query. Also playing with DRIVING_SITE did not have any perceived effect on improving performance.
I wonder if anybody has any explanation for the difference I see? is a distributed query really 3 times slower than a regular query even though both are pretty much handled by the same database engine? or is it so that I need some other sort of tuning?
Any thoughts or advice on how I can achieve comparable performance is highly appreciated.
thanks!
Edited by: 944957 on 16-Nov-2012 20:25
Edited by: 944957 on 16-Nov-2012 20:29Thanks a lot for the quick response:
rp0428 wrote:
1. the 4 digit Oracle version (or other DB version)
2. the JDK version
3. the JDBC jar name and versionI am using ojdbc14 with Oracle 11g XE and JDK 7.
4. the code you are using that shows an issue or problem.The queries I am using is basically the two queries I provided earlier, and here is the exact Java code. I loop over the code below 20 times and discard the first two retrieved results for each query and calculate an average on the remaining 18 results collected.
static Connection c1 = null, c2 = null;
static Statement _session;
public void getStats(){
long start;
for (int i = 0; i < 20; i++) {
c1 = (c1 != null) ? c1 :
DriverManager.getConnection("jdbc:oracle:thin:@//" + System.getProperty("host.1")+"/XE", "magic", "magic");
_session = c1.createStatement();
session.executeUpdate("ALTER SESSION SET CURRENTSCHEMA=magic");
start = System.currentTimeMillis();
_session.executeUpdate(query);
values[0] = System.currentTimeMillis() - start;
_session.close();
c2 = (c2 != null) ? c2 :
DriverManager.getConnection("jdbc:oracle:thin:@//" + System.getProperty("host.2")+"/XE", "magic", "magic");
_session = c2.createStatement();
_session.executeUpdate("ALTER SESSION SET CURRENT_SCHEMA=magic");
start = System.currentTimeMillis();
_session.executeUpdate(distQuery);
values[1] = System.currentTimeMillis() - start;
_session.close();
} // end for loop
} // end method
5. for performance related issues - the data volume being queried or processedThe data volume is rather small. I measure the data and it is roughly about 10K of data transfer.
>
Without seeing the code to see how you are measuring the timing it is hard to comment on what you posted.
3. How was the timing computed in sql*plus?for sqlplus, I issue *set timing on* prior to executing the queries.
4. Were the connections already created before the timing started? Or is the creation of the connection part of the timing result?As you see in the code, the connection is only created the first time I issue a query, and I discard the results of the first two queries using the connection as the timing is far off specially for the first query. I think the first query also download some metadata information that I don't consider in calculating the performance.
5. Do the timings include the retrieval of ALL result set data? Or just the first set of results?the time only consists of executing the first set.
Can you post the explain plans for the java and the sql*plus executions?Here is the results of the explain plan
PLAN_TABLE_OUTPUT
Plan hash value: 3819315806
| Id | Operation | Name | Rows | Bytes | Cos
t (%CPU)| Time | Inst |
PLAN_TABLE_OUTPUT
| 0 | SELECT STATEMENT REMOTE | | 1 | 43 |
2 (0)| 00:00:01 | |
| 1 | TABLE ACCESS BY INDEX ROWID| ACCOUNTEJB | 1 | 43 |
2 (0)| 00:00:01 | CORONA |
|* 2 | INDEX RANGE SCAN | ACCOUNT_USERID | 1 | |
1 (0)| 00:00:01 | CORONA |
|* 3 | INDEX UNIQUE SCAN | PK_ACCOUNTPROFILEEJB | 1 | 9 |
0 (0)| 00:00:01 | CORONA |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
2 - access("A1"."PROFILE_USERID"= (SELECT "A2"."USERID" FROM "MAGIC"."A
CCOUNTPROFILEEJB"
PLAN_TABLE_OUTPUT
"A2" WHERE "A2"."USERID"='uid:174'))
3 - access("A2"."USERID"='uid:174')
Note
- fully remote statement
Edited by: 944957 on 16-Nov-2012 20:51
Edited by: 944957 on 16-Nov-2012 20:53
Edited by: 944957 on 16-Nov-2012 20:55
Edited by: 944957 on 16-Nov-2012 20:56
Edited by: 944957 on 16-Nov-2012 20:57
Edited by: 944957 on 16-Nov-2012 20:59 -
Avoid Distributed query in PL/SQL cursor code
Hi,
I have to avoid a distributed qry in my cursor code in PL/SQL.
The query follows like this,
cursor c1
is
select a.test,b.test1,a.test2
from apple a,
[email protected] b,
bat c
where a.listid = b.listid
and a.list_name = c.list_name;
Now i need to split the above cursor into two .
(1)I need to query appl and bat which is from local database into one and
(2)Have to do something for the value from [email protected] is stored in a temp. table or PL/SQL table.So that ,i can use the PL/SQL table or temp table in my join in cursor ,instead of having a distributed query.
By doing so,will the performance hit badly ?
[Note: Imagine this scenario is taking place in Oracle 11i Apps]
Regards,
Prasanna Natarajan,
Oracle ERP Tech Team.[url http://groups.google.de/group/comp.databases.oracle.server/browse_frm/thread/df893cf9be9b2451/54f9cf0e937d7158?hl=de&tvc=1&q=%22Beautified%22+code+runs+slower#54f9cf0e937d7158]Recently somebody complained about slow performance after code was beatified in PL SQL Developer, after recompilation without flag "Add Debug Information" it run faster...
(just a guess)
Best regards
Maxim -
Converting Oracle XML Query Result in Java String by using XSU
Hi,
I have a problem by converting Oracle XML Query Result in Java
String by using XSU. I use XSU for Java.
For example:
String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
preise ps where match='"+args[0]+"'");
String datum1=datum;
I become the following error:
Prototyp.java:47: Incompatible type for declaration. Can't
convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
Can somebody tell me a method() for converting to solve my
problem??????
ThanksHmmm.. Pretty basic just look at the example:
OracleXMLQuery qry = new OracleXMLQuery(conn,"Select max(ps.datum) from preise ps where match='"+args[0]+"'");
String xmlString = qry.getXMLString();
Hi,
I have a problem by converting Oracle XML Query Result in Java
String by using XSU. I use XSU for Java.
For example:
String datum=new OracleXMLQuery(conn,"Select max(ps.datum) from
preise ps where match='"+args[0]+"'");
String datum1=datum;
I become the following error:
Prototyp.java:47: Incompatible type for declaration. Can't
convert oracle.xml.sql.query.OracleXMLQuery to java.lang.String.
Can somebody tell me a method() for converting to solve my
problem??????
Thanks -
Hi,
I have a View object with various attributes (eg, name1, name2, name3, address1, address2, address3 etc). A query/table component based on this view object works just fine. However, I wish to replace name1, name2, name3 and other attributes in the query with just 'name'. These attributes are still to be shown in the result table. This new 'name' attribute will be used in an Oracle Text query clause, instead of individual searches on each attribute.
My plan was to simply make the various name1, name2 etc attributes non-'queryable' in the View def to hide them from the query. Then I'd add a transient 'name' attribute. My hope was, that I could override the getWhereClause() in the ViewObjectImpl and simply tack on the oracle text clause to the WHERE (example below):
WHERE CONTAINS (
SOMECOLUMN,
'<query>
<textquery lang="ENGLISH" grammar="CONTEXT">TRANSIENT_ATTR_VALUE
..... Oracle Text query grammar stuff here .... </query>') > 0How do I access the transient value in the ViewObjectImpl to add the above SQL? Or am I going about this in completely the wrong way?
thanks,
Barry.Based on what I found in
http://www.oracle.com/technology/oramag/oracle/09-nov/o69frame.html?_template=/ocom/print
and
http://blogs.oracle.com/smuenchadf/examples/
136. Introducing a Checkbox to Toggle a Custom SQL Predicate on an LOV's Search Form. [11.1.1.0.0] 19-NOV-2008
I have the following implementation, which seems to work. Does anyone see any problems with this?
With regard to SQL injection, does ViewCriteriaItem sanitise the 'val' from the query, or should I do that manually here myself?
@Override
public java.lang.String getCriteriaItemClause(ViewCriteriaItem vci) {
if ("OraTextTransientAttrib".equals(vci.getAttributeDef().getName())) {
if (vci.getViewCriteria().isCriteriaForQuery()) {
String val = (String)vci.getValue();
logger.debug("Doing oracle text name search on '" + val + "'");
// simplified version of my oracle text query
return "CONTAINS ('<query>..... " + val + "....</query>') > 0 ";
} else {
// SQL predicate for no changes to the results
// spaces needed if you have several of these blocks
return " 1=1 ";
// other blocks for other similar oracle text attribs
return super.getCriteriaItemClause(vci);
} -
Oracle distributed document capture applet error [424]
this error appear on Oracle distributed document capture applet
There was a problem using xmlhttprequest to log out of Capture error [424]
any help / advice any help /or advicereinstal oddc activex
-
Oracle distributed doc capture - commiting
hi i'm currently researching on oracle doc capture and oracle distributed doc capture products,
currentyly i've problem in the commiting feature from the web oddc client,
after i scanned documents, i click send, (im using text commit profile)
but when i check in the commit folder at the capture server, there's nohting in it
(i've use c:\odc\commit for the commit folder)
but there's something in the IIS webcapture clientaccess folder (C:\Program Files\Oracle\Document Capture\WebPages\ClientAccess)
its a .PAK file name, when i open it in winrar, its indeed the document that i scanned and send from the client.
but why is it stored in here? what's with the .PAK format, and how to configure the settings properly for storing
files with its proper format (TIFF, JPG, PDF) in the server ??
i'm using recent odc and oddc from oracle, in windows 2003.
any help will be appreciated, if this works, i'll try commiting to ucm (so far it isnt working also)thank you ram for your response,
yes you're right i actually didnt notice there are ODDC service in in windows service list,
when i started it (not automatically started when installed) the package get "commited".
ok, now that the service is up, there are new problems here,
i want to integrate ODDC with UCM, ie: commiting to UCM,
when i commit to UCM, and check ODDC log, it seems that it results in an error, like this ...
06/19/09 04:01:32 PM 16957538_16957559 extracted into C:\Program Files\Oracle\Document Capture\WebPages\ClientAccess\16957538_16957559.
06/19/09 04:01:32 PM Start processing UCM-16957538. File Cabinet: cab-ucm; Create User: ADMIN; Modify User: ADMIN; Computer Name: COOLPIE\COOLPIE; Create Date: 6/19/2009 3:58:58 PM; Modify Date: 6/19/2009 3:59:19 PM.
06/19/09 04:01:32 PM Client Version Number: 10.1340.6.
06/19/09 04:01:32 PM UCM-000000000010 (ID: 21) created in cab-ucm with 1 pages from UCM-16957538.
06/19/09 04:01:33 PM ***Error*** Failed to process batch 16957538_16957559. Error Number: 40008, Error: Failed to commit batch (with delete). Commit Profile - commit-ucm: The following error was reported by ReleaseDocument. Error Number: 20004 Error Description: Server returned HTTP response code: 503 for URL: http://192.168.40.44/idc/idcplg
what's this error about, is there any detail information what causes it (just 503 code??)
thanks,.. and what is the best practice setting for making ODDC successfully commits to UCM. -
Distributed Query in-parallel?
I tried to execute distributed query on three database machines. I hope it would be executed in-parallel. Unfortunately, I found I used 3 times of execution time with distirbuted query compare to search in only one node. Obviously, the query statement was processed one by one. (Data was distributed in three nodes averagely)
Here is the example.
select * from nemo.seven_dis_table
union
select * from [email protected] where rownum<=1000
union
select * from [email protected] where rownum<=1000
With the docuemnt http://www.dba-oracle.com/t_opq_parallel_query.htm, this sql would be executed on two remote site in-parallel. My question is, why can not be executed in-parallel in my case? Is it really parallelism query?I'm by no means an expert in distributed queries, but having read through the document you linked and looking at your query, I think you're misunderstanding either distributed processing or the union statement.
At the moment, all you're doing is getting data from three sources and then mashing it together with a costly union statement.
If you put in UNION ALL instead, it would give you a better idea of how fast it retrieves data because it won't bother sorting and removing duplicated records.
The idea behind distributed processing is that you can query a very large table on ONE database using multiple processors, not multiple databases on different servers.... -
hi
can any body help me?
i have installed oracle developer 10g with oracle 8i database
when i run any form including the test.fmx
it always ask to install JInitiator although it has been installed (appears in the control panel and in c:\program file\oracle folder)
another problem appears after completing the installtion of JInitiator
the browser views the HTML tags of the form not execute it
so does any body have any idea???From the Windows Start menu, choose Run, type regedit, and click OK.
Expand the registry nodes HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE.
Make a backup copy of this key by right-clicking it and selecting Export from the context menu.
Select one of the HOME nodes beneath the ORACLE node (the one for Developer Suite). Ensure that you have opened the correct node by verifying that the key FORMS90_PATH exists in that node.
From the Registry Editor menu, select Edit > New > String Value. Type in the name FORMS90_HIDE_OBR_PARAMS.
Double-click FORMS90_HIDE_OBR_PARAMS and in the Value data field enter false, then click OK.
Close the registry editor.
Now when you run a form from Forms Builder, it should show parameters, including userid, in the URL, but it should run fine.
15. Set the path for Forms Builder to locate icons:
a) Double-click the UI_ICON key to open it for editing.
b) For the value data, append the path to the .gif file that you will use for the
button icon, which is the \icons subdirectory of your lab directory. Separate this
path from the remainder of the string with a semicolon; for example:
;e:\labs\lab\icons, then click OK. -
Oracle Report Printing problem
Dear All,
i m using below code on button in oracle forms 6i problem is that when i click on button report should be print
on network printer but it's print blank page however network printer is not my default printer when i set default printer
to this network printer its working fine.
and also its working when i set mode=character and network printer is not default printer but when i set mode=default or bitmap and notwork printer is not default then its print blank page.
DECLARE
p_list PARAMLIST;
BEGIN
p_list := get_parameter_list('importdata');
IF NOT Id_Null(p_list) THEN
Destroy_Parameter_List('importdata');
END IF;
p_list := Create_Parameter_List('importdata');
Add_Parameter(p_list,'P_IGM_NO',TEXT_PARAMETER,'10117/11');
Add_Parameter(p_list,'P_INDEX_NO',TEXT_PARAMETER,'498');
Add_Parameter(p_list,'P_CHR_NO',TEXT_PARAMETER,'CL-APL100/011');
Add_Parameter(p_list,'P_CONTAINER_NO',TEXT_PARAMETER,'APHU6305929');
Add_Parameter(p_list,'P_USER',TEXT_PARAMETER,'ALI');
Add_Parameter(p_list,'P_BAL_QTY',TEXT_PARAMETER,0);
Add_Parameter(p_list, 'PARAMFORM', TEXT_PARAMETER, 'NO');
Add_Parameter(p_list,'DESTYPE',TEXT_PARAMETER,'PRINTER');
Add_Parameter(p_list,'DESNAME',TEXT_PARAMETER,'\\192.168.1.67\epson');
RUN_PRODUCT(REPORTS,'\\ORASERV\Atlas6I\Import\System\Reports\abc.rep',
SYNCHRONOUS,
RUNTIME,
FILESYSTEM,
p_list,
NULL);
END;i have made one oracle 6i reports. its is quite wide.when i run the report it shrink into too small font.
and i increse it font size it by pressing + button on menu bar it looks okay.
>
The + button only causes a zoom in on the screen. It is not affecting the actual layout.
>
but the problem is that when i take print out of it ,it's printout comes in its intial format(in small font) evenif i choose different type of paper size or different orientation . it's printout is coming in too small font.
pl tell me how to overcome this problem>
The report rendering engine tries to fit the report page into the physical page size. This results in shrinking of font size,etc.
To fix
a) reduce the content on the report to something reasonable for printing.(Std paper sizes and orientation)
b) change the page size selection. Of course, you will need a printer and paper of the size you set.
Cheers, -
Oracle 10G connection problem
I launch my db with the following script:
su - oracle -c "export ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1 && /u01/app/oracle/product/10.1.0/db_1/bin/dbstart"
su - oracle -c "export ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1 && /u01/app/oracle/product/10.1.0/db_1/bin/lsnrctl start"
Here is the output:
SQL*Plus: Release 10.1.0.2.0 - Production on Fri Feb 27 22:17:51 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
SQL> Connected to an idle instance.
SQL> ORACLE instance started.
Total System Global Area 188743680 bytes
Fixed Size 778036 bytes
Variable Size 162537676 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Database "orcl" warm started.
LSNRCTL for Linux: Version 10.1.0.2.0 - Production on 27-FEB-2004 22:17:59
Copyright (c) 1991, 2004, Oracle. All rights reserved.
Starting /u01/app/oracle/product/10.1.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.1.0.2.0 - Production
System parameter file is /u01/app/oracle/product/10.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/10.1.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xavan_fi
xe)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 10.1.0.2.0 - Production
Start Date 27-FEB-2004 22:17:59
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.1.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xavan_fi
xe)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
But when i try to connect with sqlplus:
oracle@xavan_fixe oracle $ sqlplus
SQL*Plus: Release 10.1.0.2.0 - Production on Ven. Févr. 27 22:19:32 2004
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Enter user-name: scott
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directoryWhen you go to get connection you have to set the ORACLE_SID enviroment variable or use the service name in the string to get connection.
Joel Pérez -
Oracle Text query: Escaping characters and specifying progression sequences
How can I combine the escaping of a search string and the specification of progression sequences within an oracle text query
so that in all cases the correct results are delivered (see example below)?
The scenario in which to use this is the following:
+ Database: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
+ Requirement: Hitlist of results ordered by score whereby the different part within
the result list are specified using progression sequences within oracle text query
Example:
create table service_provider (
id number,
name_c varchar(100),
uri_c varchar(255)
insert into service_provider values (1,'ABB Company Mgmt','http://www.abb-company-mgmt.de');
insert into service_provider values (2,'Dr. Abbas Ming','http://www.dr-abbas-ming.de');
insert into service_provider values (3,'SABBATA United','http://www.sabbata-united.de');
insert into service_provider values (4,'ABB','http://www.abb.de');
insert into service_provider values (5,'AND Company Mgmt','http://www.and-company-mgmt.de');
insert into service_provider values (6,'Dr. Andas Ming','http://www.dr-andas-ming.de');
insert into service_provider values (7,'SANDATA United','http://www.sandata-united.de');
insert into service_provider values (8,'AND','http://www.and.de');
Query 1: works correctly in this case
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>abb</seq>' ||
'<seq>abb%</seq>' ||
'<seq>%abb%</seq>' ||
'<seq>fuzzy(abb,1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
delivers
76 4 ABB http://www.abb.de
76 1 ABB Company Mgmt http://www.abb-company-mgmt.de
51 2 Dr. Abbas Ming http://www.dr-abbas-ming.de
26 3 SABBATA United http://www.sabbata-united.de
Query 2: procudes error
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>and</seq>' ||
'<seq>and%</seq>' ||
'<seq>%and%</seq>' ||
'<seq>fuzzy(and,1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
produces ORA-29902, ORA-20000, DRG-50901 because AND is a reserved word in oracle text
So we need escaping ...
Query 3: does not work correctly
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>{abb}</seq>' ||
'<seq>{abb%}</seq>' ||
'<seq>{%abb%}</seq>' ||
'<seq>fuzzy({abb},1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
delivers
76 4 ABB http://www.abb.de
76 1 ABB Company Mgmt http://www.abb-company-mgmt.de
Query 4: does not produce an error, but also does not work correctly
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>{and}</seq>' ||
'<seq>{and%}</seq>' ||
'<seq>{%and%}</seq>' ||
'<seq>fuzzy({and},1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
delivers
76 8 AND http://www.and.de
76 5 AND Company Mgmt http://www.and-company-mgmt.deAnywhere that you just use the word by itself, enclose it in {}, but anywhere that you add % on either side or both don't enclose it in {}. Please see the demonstration below.
SCOTT@10gXE> SELECT * FROM v$version
2 /
BANNER
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SCOTT@10gXE> create table service_provider
2 (id number,
3 name_c varchar(100),
4 uri_c varchar(255))
5 /
Table created.
SCOTT@10gXE> insert all
2 into service_provider values (1,'ABB Company Mgmt','http://www.abb-company-mgmt.de')
3 into service_provider values (2,'Dr. Abbas Ming','http://www.dr-abbas-ming.de')
4 into service_provider values (3,'SABBATA United','http://www.sabbata-united.de')
5 into service_provider values (4,'ABB','http://www.abb.de')
6 into service_provider values (5,'AND Company Mgmt','http://www.and-company-mgmt.de')
7 into service_provider values (6,'Dr. Andas Ming','http://www.dr-andas-ming.de')
8 into service_provider values (7,'SANDATA United','http://www.sandata-united.de')
9 into service_provider values (8,'AND','http://www.and.de')
10 into service_provider values (9,'EBB','fuzzy test')
11 into service_provider values (10,'OND','fuzzy test')
12 select * from dual
13 /
10 rows created.
SCOTT@10gXE> CREATE INDEX your_index
2 ON service_provider (name_c)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 PARAMETERS ('STOPLIST CTXSYS.EMPTY_STOPLIST')
5 /
Index created.
SCOTT@10gXE> VARIABLE search_string VARCHAR2 (100)
SCOTT@10gXE> EXEC :search_string := 'abb'
PL/SQL procedure successfully completed.
SCOTT@10gXE> COLUMN name_c FORMAT A20 WORD_WRAPPED
SCOTT@10gXE> COLUMN uri_c FORMAT A40
SCOTT@10gXE> select *
2 from (select /*+ FIRST_ROWS */ score(1), this_.*
3 from service_provider this_
4 where CONTAINS
5 (this_.NAME_C ,
6 '<QUERY>
7 <textquery grammar="CONTEXT">
8 <progression>
9 <seq>{' || :search_string || '}</seq>
10 <seq>' || :search_string || '%</seq>
11 <seq>%' || :search_string || '%</seq>
12 <seq>fuzzy({' || :search_string || '},1,100,WEIGHT)</seq>
13 </progression>
14 </textquery>
15 </QUERY>', 1 ) > 0
16 order by score(1) desc, this_.NAME_C)
17 where rownum < 21
18 /
SCORE(1) ID NAME_C URI_C
76 4 ABB http://www.abb.de
76 1 ABB Company Mgmt http://www.abb-company-mgmt.de
51 2 Dr. Abbas Ming http://www.dr-abbas-ming.de
26 3 SABBATA United http://www.sabbata-united.de
4 9 EBB fuzzy test
SCOTT@10gXE> EXEC :search_string := 'and'
PL/SQL procedure successfully completed.
SCOTT@10gXE> /
SCORE(1) ID NAME_C URI_C
76 8 AND http://www.and.de
76 5 AND Company Mgmt http://www.and-company-mgmt.de
51 6 Dr. Andas Ming http://www.dr-andas-ming.de
26 7 SANDATA United http://www.sandata-united.de
5 10 OND fuzzy test
SCOTT@10gXE> -
Oracle distributed document capture OCR
there is no OCR in Oracle distributed document capture there is any solution fro this issue ??
Yes, the 11.1.1.8 version has Capture as a managed server and not as a windows based desktop app. So no seperate installer for the same.
Also, Looks like they'ave covered the ODDC use cases in the Capture itself, that being a web app now.
regards,
Pradeep Mahajan.
http://ucmchronicles.wordpress.com
http://ucmchronicles.wordpress.com/2013/08/20/whats-new-with-capture-in-the-11-1-1-8-version -
Oracle distributed document capture service not started
Oracle distributed document capture service not started
and timeoutI did check the Distributed Document Capture Configuration (from the Start menu) and it also indicates that I have selected "Oracle Distributed Document Capture Prompted Login". Once I click "OK" after I supplied all the paths required by server settings, it also displays the error "The username and password could not be validated". What credentials should be entered in the User ID / Password / Domain fields? You should use the username and password entered while configuring the "capture" security model. Leave the domain field blank.
I have not yet configured the IIS at this point. Is it required for the Capture application to authenticate the user I specified during the installation configuration at login? IIS will serve web ODDC interface and will be needed for authentication while accessing ODDC web pages. I beleive that it is not needed for authentication from ODC/ODDC applets. However, when something is not working as expected, I would first finish all required installation and especially post installation setup steps.
I had a look at the IIS configuration in the installation document. It doesn't clearly state which document is the default document for the website one needs to create in IIS. Do you know what it should be? You have to add new web site, say like "Capture" and add virtual directory from assumed path like: C:\Program Files\Oracle\Document Capture\WebPages
For the default document I have WebCapture.asp.
The Oracle Distributed Document Capture service does no start on my PC. Is this required for me to atleast login to the Capture application? It's required only for processing the scanned batches.
I hope that this will help.
Boris
Edited by: tombo on 2012.03.16 06:32 -
Hello APEX people,
I posted my problem here:
Designing LOV Query Problem
What I have is a sequence like this:
CREATE SEQUENCE
DR_SEQ_FIRST_SCHEDULE_GROUP
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE ;
What I need would be a SQL query returning all possible values oft my sequence like:
1
2
3
4
5
6
7
I want to use it as a source for a LOV...
The reason why I use the cycling sequence is: My app uses it to cycle scheduling priorities every month to groups identified by this number (1-7).
In the Admin Form, I want to restrict the assignment in a user friendly way - a LOV.
Thanks
JohannHere ist the solution (posted by michales in the PL/SQL forum):
SQL> CREATE SEQUENCE
dr_seq_first_schedule_group
MINVALUE 1 MAXVALUE 7 INCREMENT BY 1 START WITH 1
CACHE 6 ORDER CYCLE
Sequence created.
SQL> SELECT LEVEL sn
FROM DUAL
CONNECT BY LEVEL <= (SELECT max_value
FROM user_sequences
WHERE sequence_name = 'DR_SEQ_FIRST_SCHEDULE_GROUP')
SN
1
2
3
4
5
6
7
7 rows selected.
Maybe you are looking for
-
Using BEFW11S4. Has no IP address when I check status.
Hard wire OK. SBCGLOBAL.NET dsl connection. Wireless connects to the network but not the internet. Settings are "obtain IP automatically/WEP security/correct codes/channels in the laptops"
-
Displaying Zero Value in a Chart if there exist no database record.
Hello All, I need to create a chart that displays the number of jobs per hour over a 24 hour period. I can determine the hour the job was created and I have no trouble making a chart with a count of jobs per hour. The problem is that I also want to d
-
Problem in replicating the purchase order items
Hi, The Requirement is to replicate the line items of Purchase Order in ME23N which is extracted from BAPI_PO_GETDETAIL1 and copy it in BAPI_PO_CHANGE . The problem is when i am passing ACCTASSCAT(Account assignment category) it is not replicating
-
Hi, I need extract data from Oracle Hyperion HFM application, but i can't identify in which table of HFM database will find this information. Could help me to find that table, or clarify if there is a table that integrates centralized information of
-
Firefox crashes whenever I try to upload an image to the web.
For the past week, I've been trying to upload images to various sites, including Facebook and deviantART. Each time, Firefox stops responding, and then crashes. I have updated to 3.6.13, so it's not an outdated server. Any ideas?