Select query error - dun understand
Hi ,
i am sorry for posting such simple sql statement but i simply still dun quite get the hand of how PL/SQL works and i apprecaite ur patience
i ran this statement :
declare
mydate date ;
mydate := sysdate ;
select mydate;
the error is :
ORA-06550: line 3, column 8:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table LONG_ double ref
char time timestamp interval date binary national character
nchar
i think line 4 can be replace with --> dbms_output.put_line(mydate);
but i dun unserstand where line 3 has gone wrong
pls advise
tks & rdgs
I think you're after something like this:
declare
mydate date;
begin
mydate := sysdate ;
dbms_output.put_line(mydate);
end;I highly reccommend reading a book or an online begginners guide to PL/SQL.
PL/SQL is more like propper programming than just plain SQL statements and requires a bit of a mindset change if you're only used to using SQL by itself to extract data.
Similar Messages
-
Hi Experts,
In the following code I am getting some error like,
"the list (w_tabnachn,w_tabvorna) after "INTO" is not of the form (f1,...,fn) or contains an undefined field.
the form (f1,...,fn), or contains an undefined field. "
SELECT nachn vorna FROM PA0002 into (w_tabnachn, w_tabvorna)
WHERE PERNR = w_pldoc_key-pernr.
ENDSELECT.
I could able to execute this code within the local class, but not doing so in global class, any clue pls
Regards,
HarithaHi,
Check the declarations of the fields w_tabnachn & w_tabvorna. Declare these variables globally then it will work.
Thanks,
Rakesh -
I am getting dump error while running one report in one select query
Hi,
While running a report program, I am getting a dump error in one select query. So could you please correct the select query so that I can't face the dump error.
SELECT vbeln parvw kunnr INTO CORRESPONDING FIELDS OF TABLE l_t_vbpa
FROM vbpa
FOR ALL ENTRIES IN l_t_backorder_item
WHERE vbeln = l_t_backorder_item-vbeln AND
( ( parvw = c_we AND kunnr IN rng_shipto ) OR ( parvw = c_ag AND
kunnr IN rng_soldto ) ) .
<removed by moderator>
Best Regards,
BDP
Edited by: Thomas Zloch on Apr 30, 2010 12:31 PMHi Bansidhar,
It would be helpful if you could tell what type of dump it is.
If it is a timeout you should check whether l_t_backorder_item is empty - in this case ALL document numbers are selected. f you get the timeout with a populated table consider converting the l_t_backorder_item table into one ore more ranges tables - the select with ranges tables is way quicker than 'for all entries'. But take care the ranges table has not to many entries - the SAP SQL converter puts this into one huge SQL statement and this might become too big to be handled by the database (depends on the actual underlying database).
I would also consider splitting the SELECT into two (2nd one with 'appending into table') to make the code easier to understand It also helps the database system determining a strategy for the select.
Regards,
Gerd Rother -
Selected Query Parameter backend error
Hi, experts,
I am having some backend error whenever I add a parameter to the Selected Query Parameter to the ValueHelpQuery of an OVS.
Can anybody please tell me why it is happening?
Any help is needed and highly appreciated.
Regards,
May T.Hi, Horst,
Thanks, I understand it.
I did not bind that N_AccountUUID with nothing else. Do I have to?
I always add a new field to the SearchParameters and than I bind it in the Selected Query Parameters.
I don't bind it with anything else.
Is that a problem?
I just bound it with my BO data field and it shows "The data field is bound to query parameter".
Regards,
May T. -
Select-options in SELECT query - syntax error
Hi all,
I get the error below when I try to use the select options in a SELECT query . Please help me.
"The IN operator with "SO_AWART" is followed neither by an internal
table nor by a value list."
The code i have used(Logical database PNP is used):
TABLES: pernr,
catsdb.
INCLUDE ztime_cwtr_top. " global Data
INCLUDE ztime_cwtr_f01.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
PARAMETERS P_THRES TYPE I.
SELECTION-SCREEN END OF BLOCK B1.
Get data from CATSDB table. Workdates within the date interval are considered.
SELECT pernr workdate awart catsquantity beguz enduz status
FROM catsdb
INTO TABLE it_catsdb
WHERE pernr = pernr-pernr AND
workdate GE pn-begda AND
workdate LE pn-endda AND
status IN ('20', '30') AND
awart IN so_awart .
awart IN ('1100', '1137', '1138', '1139', '1140',
'1147', '1148', '1149', '1157', '2003' ).
when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
I have tried different options like using only the select-options in the where condition.
Thanks in advance.....
MadhuSolved.
Code with syntax error:
include z...top .
include z...fo1.
select-options: xxxxxxx
Code with no syntax error:
select-options: xxxxxxx
include z...top .
include z...fo1.
Thanks for all your help,
Madhu -
Error ORA-01652 while running select query
A select query returning millions of records is returning the following error.
SQL Error [
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
We requested DBA to increased the TEMP tablespace. He increased it to 20GB and also, changed to Autoextent.
When we executed the query again, we got the same error ?
What could be the reason of this issue and how it can be resolved ?All sort operations that don't fit into the SORT_AREA_SIZE will go to the temp tablespace (they can be seen as direct writes in the trace file).
It can easy be the case, that your temp tablespace needs to be many GB in size [we have a table with millions of rows and for the loading/merging our temp is 80GB in size].
May be you can change your process of loading i.e. with this select you fill a intermediate table (with CTAS) and do your processing there or even try to do the processing in SQL while building the table. You could also try to do the processing with a cursor and BULK COLLECT LIMIT 100 and then inserting into the target table with the FORALL statement. -
Error coming while running Hibernate HQL select query in jdeveloper
Hi ,
I have created hibernate application with just create query its running fine, i also writeen HQL select query below exception is coming,
CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
i also checked org.hibernate.hql.ast.HqlToken , its thr in jar file, eventhough it is throwing error.
plz give sollutionHi dvohra,
I have written below code
List l1=new ArrayList();
try{
HibClass hib = new HibClass();
Session session = hib.currentSession();
Transaction tx = session.beginTransaction();
Manager m;
System.out.println("server------------------------");
//Using from Clause
String SQL_QUERY ="from Manager manager";
Query query = session.createQuery(SQL_QUERY);
List list = query.list();
for (int i = 0; i < list.size();
i++) {
Manager manager =
(Manager) list.get(i);
System.out.println(
"MId " +
manager.getMid() +
" Manager Name: " +
manager.getMname());
m=new Manager();
m.setMid(manager.getMid());
m.setMname(manager.getMname());
l1.add(m);
session.close();
}catch(Exception e){
System.out.println("helo-------------error---------"+e.getMessage());
}finally{
return l1;
still below exception is coming
CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
oc4j is shutting down
i am trying from 4 days , help me -
Error While Firing select Query on Table
Hi aill,
we have Oracle 11g RG2 RAC on Production Machine. When I am firing select query on one partiton table,it will show me below error in Alter Log file :
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x0] [PC:0x84056AA, kkpamDInfo()+38] [flags: 0x0, count: 1]
Errors in file /opt/app/oracle/diag/rdbms/winsdb/WINSDB2/trace/WINSDB2_ora_29686.trc (incident=288563):
ORA-07445: exception encountered: core dump [kkpamDInfo()+38] [SIGSEGV] [ADDR:0x0] [PC:0x84056AA] [Address not mapped to object] []
Incident details in: /opt/app/oracle/diag/rdbms/winsdb/WINSDB2/incident/incdir_288563/WINSDB2_ora_29686_i288563.trc
While checking the trace file :
========== FRAME [2] (ksedst1()+98 -> skdstdst()) ==========
defined by frame pointers 0x2ba371efaa40 and 0x2ba371efa990
CALL TYPE: call ERROR SIGNALED: no COMPONENT: KSE
RDI 0000000000000000 RSI 0000000000000000 RDX 00002BA371EF6118
RCX 0000000000000001 R8 0000000000000000 R9 0000000000000000
RAX 0000000000000000 RBX 0000000000000003 RBP 00002BA371EFAA40
R10 71EFA9A000000000 R11 0000000000000000 R12 0000000000000003
R13 0000000000000003 R14 0000000000000001 R15 0000000000000001
RSP 00002BA371EFA9A0 RIP 000000000349E72E
Dump of memory from 0x2ba371efaa40 to 0x2ba371efaaf0
2BA371EFAA40 71EFAB10 00002BA3 0349E77F 00000000 [...q.+....I.....]
2BA371EFAA50 00000000 00000000 00000000 00000000 [................]
2BA371EFAA60 71B996F0 00002BA3 02050034 00000000 [...q.+..4.......]
2BA371EFAA70 000000FF 00002BA3 00002004 00000000 [.....+... ......]
2BA371EFAA80 00000000 00000000 2338D058 00016DAB [........X.8#.m..]
2BA371EFAA90 00000003 00000000 085232F3 00000000 [.........2R.....]
2BA371EFAAA0 0000000D 00000000 00000002 00000000 [................]
2BA371EFAAB0 00000000 00000000 00000000 00000000 [................]
2BA371EFAAC0 71EFAAD0 00002BA3 085BBFCF 00000000 [...q.+....[.....]
2BA371EFAAD0 71EFAB10 00002BA3 0349E249 00000000 [...q.+..I.I.....]
2BA371EFAAE0 00000000 00002BA3 00000013 00000000 [.....+..........]
Can Anyone guide me for above Errors. How can I resolve the same.A quick search of Oracle Support shows that there are a handful of bugs that match ORA-07445 with an argument of kkpamDInfo()+38.
Whether yours is already identified and patched depends on the exact version of 11.2 and the specific circumstances.
If you're on 11.2.0.1 then this might be part of what sounds like quite a big bucket of such errors - Bug 9399991 relating to errors and dumps with SQL against partitioned tables. -
Hi all,
i am getting a below error whenever executing the below select query....
some times it will show dead lock detected while waiting for resource and terminated...
some times it executes and gives result..
but all the time it writes an alert to alert log
Plesae suggest how to resolve the issue..........
Thanks in advance
Env: Linux / Oracle 11.2.0.3.3
Error from alert log:
Errors in file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trc:
ORA-00060: deadlock detected while waiting for resource
ORA-10387: parallel query server interrupt (normal)
Trace file info... bdrdb_p017_6076.trc:
Trace file /u01/oracle/oracle/diag/rdbms/bdrdb/bdrdb/trace/bdrdb_p017_6076.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/oracle/oracle/product/11.2.0/dbhome_1
System name: Linux
Node name: bdrdb.cteplindia.com
Release: 2.6.18-308.el5PAE
Version: #1 SMP Fri Jan 27 17:40:09 EST 2012
Machine: i686
Instance name: bdrdb
Redo thread mounted by this instance: 1
Oracle process number: 92
Unix process pid: 6076, image: [email protected] (P017)
*** 2013-11-04 23:18:57.915
*** SESSION ID:(423.59970) 2013-11-04 23:18:57.915
*** CLIENT ID:() 2013-11-04 23:18:57.915
*** SERVICE NAME:(bdrdb) 2013-11-04 23:18:57.915
*** MODULE NAME:() 2013-11-04 23:18:57.915
*** ACTION NAME:() 2013-11-04 23:18:57.915
*** 2013-11-04 23:18:57.915
DEADLOCK DETECTED ( ORA-00060 )
[Transaction Deadlock]
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
PS-00000001-00000011 92 423 S 33 128 S X
BF-2ed08c01-00000000 33 128 S 92 423 S X
session 423: DID 0001-005C-00081126 session 128: DID 0001-0021-00067D23
session 128: DID 0001-0021-00067D23 session 423: DID 0001-005C-00081126
DEADLOCK DETECTED ( ORA-00060 )
[Transaction Deadlock]
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
PS-00000001-00000011 92 423 S 33 128 S X
BF-2ed08c01-00000000 33 128 S 92 423 S X
session 423: DID 0001-005C-00081126 session 128: DID 0001-0021-00067D23
session 128: DID 0001-0021-00067D23 session 423: DID 0001-005C-00081126
Rows waited on:
Session 423: no row
Session 128: obj - rowid = 00021DC1 - AAAh3BAAVAAAQL/AAA
(dictionary objn - 138689, file - 21, block - 66303, slot - 0)
----- Information for the OTHER waiting sessions -----
Session 128:
sid: 128 ser: 46176 audsid: 1836857 user: 102/DBLOCAL
flags: (0x8000041) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
flags2: (0x40009) -/-/INC
pid: 33 O/S info: user: oracle, term: UNKNOWN, ospid: 31611
image: [email protected]
client details:
O/S info: user: masked, term: masked, ospid: 5924:568
machine: masked program: Toad.exe
application name: TOAD background query session, hash value=526966934
current SQL:
application name: TOAD background query session, hash value=526966934
current SQL:
SELECT DISTINCT B_FP_TEST.TEST_ID
FROM B_FP_TEST,
B_USER_INFO,
J_FP_INVESTIGATOR,
L_TEST_STATUS,
L_ATMS_TEST_TYPE,
j_op_test_anml
WHERE B_FP_TEST.TEST_ID = J_FP_INVESTIGATOR.TEST_ID
AND B_FP_TEST.TEST_TYPE_ID = L_ATMS_TEST_TYPE.ATMS_TEST_TYPE_ID
AND B_USER_INFO.B_USER_INFO_ID = J_FP_INVESTIGATOR.INVESTIGATOR_ID
AND B_FP_TEST.STATUS_ID = L_TEST_STATUS.STATUS_ID
AND B_FP_TEST.IS_DELETED = :"SYS_B_00"
AND B_FP_TEST.TEST_NUM NOT IN (:"SYS_B_01", :"SYS_B_02", :"SYS_B_03")
AND L_ATMS_TEST_TYPE.IS_DELETED = :"SYS_B_04"
AND J_FP_INVESTIGATOR.is_pi = :"SYS_B_05"
AND L_TEST_STATUS.STATUS IN (:"SYS_B_06", :"SYS_B_07", :"SYS_B_08")
AND j_op_test_anml.test_id = B_FP_TEST.TEST_ID
----- End of information for the OTHER waiting sessions -----
*** 2013-11-04 23:18:57.916
dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x0, level=3, mask=0x0)
----- Error Stack Dump -----
ORA-00060: deadlock detected while waiting for resource
ORA-10387: parallel query server interrupt (normal)
----- SQL Statement (None) -----
Current SQL information unavailable - no cursor.
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
More......
Query:
SELECT DISTINCT B_FP_TEST.TEST_ID
FROM B_FP_TEST,
B_USER_INFO,
J_FP_INVESTIGATOR,
L_TEST_STATUS,
L_ATMS_TEST_TYPE,
j_op_test_anml
WHERE B_FP_TEST.TEST_ID = J_FP_INVESTIGATOR.TEST_ID
AND B_FP_TEST.TEST_TYPE_ID = L_ATMS_TEST_TYPE.ATMS_TEST_TYPE_ID
AND B_USER_INFO.B_USER_INFO_ID = J_FP_INVESTIGATOR.INVESTIGATOR_ID
AND B_FP_TEST.STATUS_ID = L_TEST_STATUS.STATUS_ID
AND B_FP_TEST.IS_DELETED = 0
AND B_FP_TEST.TEST_NUM NOT IN (1, 2, 99)
AND L_ATMS_TEST_TYPE.IS_DELETED = 0
AND J_FP_INVESTIGATOR.is_pi = 1
AND L_TEST_STATUS.STATUS IN ('Scheduled', 'In-Progress', 'Completed')
AND j_op_test_anml.test_id = B_FP_TEST.TEST_ID
AND ( (j_op_test_anml.end_date BETWEEN TO_DATE ('28-Oct-2013') - 1
AND TO_DATE ('04-Nov-2013') + 1)
OR (j_op_test_anml.start_date BETWEEN TO_DATE ('28-Oct-2013') - 1
AND TO_DATE ('04-Nov-2013') + 1)
OR (TO_DATE ('28-Oct-2013') BETWEEN j_op_test_anml.start_date
AND j_op_test_anml.end_date)
OR (TO_DATE ('04-Nov-2013') BETWEEN j_op_test_anml.start_date
AND j_op_test_anml.end_date))
AND L_ATMS_TEST_TYPE.IS_DELETED = 0
AND B_FP_TEST.DATASOURCE_ID = 9
Query Exp plan:
Plan hash value: 3398228788
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 1501 | 102K| 1929 (1)| 00:00:24 | | | | | |
| 1 | HASH UNIQUE | | 1501 | 102K| 1929 (1)| 00:00:24 | | | | | |
| 2 | CONCATENATION | | | | | | | | | | |
| 3 | PX COORDINATOR | | | | | | | | | | |
| 4 | PX SEND QC (RANDOM) | :TQ30005 | 241 | 16870 | 800 (1)| 00:00:10 | | | Q3,05 | P->S | QC (RAND) |
|* 5 | HASH JOIN | | 241 | 16870 | 800 (1)| 00:00:10 | | | Q3,05 | PCWP | |
| 6 | PX RECEIVE | | 246 | 15990 | 797 (1)| 00:00:10 | | | Q3,05 | PCWP | |
| 7 | PX SEND HASH | :TQ30004 | 246 | 15990 | 797 (1)| 00:00:10 | | | Q3,04 | P->P | HASH |
|* 8 | HASH JOIN | | 246 | 15990 | 797 (1)| 00:00:10 | | | Q3,04 | PCWP | |
| 9 | PX RECEIVE | | 573 | 29223 | 793 (1)| 00:00:10 | | | Q3,04 | PCWP | |
| 10 | PX SEND HASH | :TQ30003 | 573 | 29223 | 793 (1)| 00:00:10 | | | Q3,03 | P->P | HASH |
|* 11 | HASH JOIN | | 573 | 29223 | 793 (1)| 00:00:10 | | | Q3,03 | PCWP | |
| 12 | BUFFER SORT | | | | | | | | Q3,03 | PCWC | |
| 13 | PX RECEIVE | | | | | | | | Q3,03 | PCWP | |
| 14 | PX SEND BROADCAST | :TQ30000 | | | | | | | | S->P | BROADCAST |
| 15 | NESTED LOOPS | | | | | | | | | | |
| 16 | NESTED LOOPS | | 485 | 20855 | 781 (0)| 00:00:10 | | | | | |
| 17 | TABLE ACCESS BY GLOBAL INDEX ROWID| J_OP_TEST_ANML | 485 | 10185 | 296 (0)| 00:00:04 | ROWID | ROWID | | | |
|* 18 | INDEX RANGE SCAN | IDX$$_2D190001 | 485 | | 4 (0)| 00:00:01 | | | | | |
|* 19 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 20 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
| 21 | PX BLOCK ITERATOR | | 70382 | 549K| 11 (0)| 00:00:01 | | | Q3,03 | PCWC | |
|* 22 | TABLE ACCESS FULL | J_FP_INVESTIGATOR | 70382 | 549K| 11 (0)| 00:00:01 | | | Q3,03 | PCWP | |
| 23 | BUFFER SORT | | | | | | | | Q3,04 | PCWC | |
| 24 | PX RECEIVE | | 3 | 42 | 3 (0)| 00:00:01 | | | Q3,04 | PCWP | |
| 25 | PX SEND HASH | :TQ30001 | 3 | 42 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 26 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
| 27 | BUFFER SORT | | | | | | | | Q3,05 | PCWC | |
| 28 | PX RECEIVE | | 30 | 150 | 3 (0)| 00:00:01 | | | Q3,05 | PCWP | |
| 29 | PX SEND HASH | :TQ30002 | 30 | 150 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 30 | TABLE ACCESS FULL | L_ATMS_TEST_TYPE | 30 | 150 | 3 (0)| 00:00:01 | | | | | |
| 31 | NESTED LOOPS | | | | | | | | | | |
| 32 | NESTED LOOPS | | 3 | 210 | 329 (1)| 00:00:04 | | | | | |
| 33 | NESTED LOOPS | | 3 | 195 | 329 (1)| 00:00:04 | | | | | |
|* 34 | HASH JOIN | | 2 | 114 | 325 (1)| 00:00:04 | | | | | |
| 35 | NESTED LOOPS | | | | | | | | | | |
| 36 | NESTED LOOPS | | 6 | 258 | 322 (1)| 00:00:04 | | | | | |
| 37 | PARTITION RANGE SINGLE | | 6 | 126 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 38 | TABLE ACCESS FULL | J_OP_TEST_ANML | 6 | 126 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 39 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 40 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
|* 41 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
|* 42 | TABLE ACCESS BY INDEX ROWID | J_FP_INVESTIGATOR | 1 | 8 | 2 (0)| 00:00:01 | | | | | |
|* 43 | INDEX RANGE SCAN | FI_TEST_ID_PK | 1 | | 1 (0)| 00:00:01 | | | | | |
|* 44 | INDEX UNIQUE SCAN | L_ATMS_TEST_TYPE_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 45 | TABLE ACCESS BY INDEX ROWID | L_ATMS_TEST_TYPE | 1 | 5 | 1 (0)| 00:00:01 | | | | | |
| 46 | PX COORDINATOR | | | | | | | | | | |
| 47 | PX SEND QC (RANDOM) | :TQ20003 | | | | | | | Q2,03 | P->S | QC (RAND) |
| 48 | NESTED LOOPS | | | | | | | | Q2,03 | PCWP | |
| 49 | NESTED LOOPS | | 33 | 2310 | 399 (2)| 00:00:05 | | | Q2,03 | PCWP | |
|* 50 | HASH JOIN | | 33 | 2145 | 397 (2)| 00:00:05 | | | Q2,03 | PCWP | |
| 51 | PX RECEIVE | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q2,03 | PCWP | |
| 52 | PX SEND HASH | :TQ20002 | 78 | 3978 | 393 (1)| 00:00:05 | | | Q2,02 | P->P | HASH |
|* 53 | HASH JOIN | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q2,02 | PCWP | |
| 54 | BUFFER SORT | | | | | | | | Q2,02 | PCWC | |
| 55 | PX RECEIVE | | | | | | | | Q2,02 | PCWP | |
| 56 | PX SEND BROADCAST | :TQ20000 | | | | | | | | S->P | BROADCAST |
| 57 | NESTED LOOPS | | | | | | | | | | |
| 58 | NESTED LOOPS | | 66 | 2838 | 382 (1)| 00:00:05 | | | | | |
| 59 | PARTITION RANGE SINGLE | | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 60 | TABLE ACCESS FULL | J_OP_TEST_ANML | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 61 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 62 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
| 63 | PX BLOCK ITERATOR | | 70382 | 549K| 11 (0)| 00:00:01 | | | Q2,02 | PCWC | |
|* 64 | TABLE ACCESS FULL | J_FP_INVESTIGATOR | 70382 | 549K| 11 (0)| 00:00:01 | | | Q2,02 | PCWP | |
| 65 | BUFFER SORT | | | | | | | | Q2,03 | PCWC | |
| 66 | PX RECEIVE | | 3 | 42 | 3 (0)| 00:00:01 | | | Q2,03 | PCWP | |
| 67 | PX SEND HASH | :TQ20001 | 3 | 42 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 68 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
|* 69 | INDEX UNIQUE SCAN | L_ATMS_TEST_TYPE_PK | 1 | | 0 (0)| 00:00:01 | | | Q2,03 | PCWP | |
|* 70 | TABLE ACCESS BY INDEX ROWID | L_ATMS_TEST_TYPE | 1 | 5 | 1 (0)| 00:00:01 | | | Q2,03 | PCWP | |
| 71 | PX COORDINATOR | | | | | | | | | | |
| 72 | PX SEND QC (RANDOM) | :TQ10003 | | | | | | | Q1,03 | P->S | QC (RAND) |
| 73 | NESTED LOOPS | | | | | | | | Q1,03 | PCWP | |
| 74 | NESTED LOOPS | | 33 | 2310 | 399 (2)| 00:00:05 | | | Q1,03 | PCWP | |
|* 75 | HASH JOIN | | 34 | 2210 | 397 (2)| 00:00:05 | | | Q1,03 | PCWP | |
| 76 | PX RECEIVE | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q1,03 | PCWP | |
| 77 | PX SEND HASH | :TQ10002 | 78 | 3978 | 393 (1)| 00:00:05 | | | Q1,02 | P->P | HASH |
|* 78 | HASH JOIN | | 78 | 3978 | 393 (1)| 00:00:05 | | | Q1,02 | PCWP | |
| 79 | BUFFER SORT | | | | | | | | Q1,02 | PCWC | |
| 80 | PX RECEIVE | | | | | | | | Q1,02 | PCWP | |
| 81 | PX SEND BROADCAST | :TQ10000 | | | | | | | | S->P | BROADCAST |
| 82 | NESTED LOOPS | | | | | | | | | | |
| 83 | NESTED LOOPS | | 66 | 2838 | 382 (1)| 00:00:05 | | | | | |
| 84 | PARTITION RANGE SINGLE | | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 85 | TABLE ACCESS FULL | J_OP_TEST_ANML | 66 | 1386 | 316 (1)| 00:00:04 | 7 | 7 | | | |
|* 86 | INDEX UNIQUE SCAN | FT_TEST_ID_PK | 1 | | 0 (0)| 00:00:01 | | | | | |
|* 87 | TABLE ACCESS BY GLOBAL INDEX ROWID | B_FP_TEST | 1 | 22 | 1 (0)| 00:00:01 | ROWID | ROWID | | | |
| 88 | PX BLOCK ITERATOR | | 70382 | 549K| 11 (0)| 00:00:01 | | | Q1,02 | PCWC | |
|* 89 | TABLE ACCESS FULL | J_FP_INVESTIGATOR | 70382 | 549K| 11 (0)| 00:00:01 | | | Q1,02 | PCWP | |
| 90 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
| 91 | PX RECEIVE | | 3 | 42 | 3 (0)| 00:00:01 | | | Q1,03 | PCWP | |
| 92 | PX SEND HASH | :TQ10001 | 3 | 42 | 3 (0)| 00:00:01 | | | | S->P | HASH |
|* 93 | TABLE ACCESS FULL | L_TEST_STATUS | 3 | 42 | 3 (0)| 00:00:01 | | | | | |
|* 94 | INDEX UNIQUE SCAN | L_ATMS_TEST_TYPE_PK | 1 | | 0 (0)| 00:00:01 | | | Q1,03 | PCWP | |
|* 95 | TABLE ACCESS BY INDEX ROWID | L_ATMS_TEST_TYPE | 1 | 5 | 1 (0)| 00:00:01 | | | Q1,03 | PCWP | |
Predicate Information (identified by operation id):
5 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
8 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
11 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
18 - access("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05
00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
19 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
20 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
22 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
26 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
30 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)
34 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
38 - filter("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."END_DATE"<=TO_DATE(' 2013-11-05
00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND (LNNVL("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
39 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
40 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
41 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
42 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
43 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
44 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
45 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)
50 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
53 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
60 - filter("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-11-04 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-04
00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND (LNNVL("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
LNNVL("J_OP_TEST_ANML"."END_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND (LNNVL("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27
00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
61 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
62 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
64 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
68 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
69 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
70 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)
75 - access("B_FP_TEST"."STATUS_ID"="L_TEST_STATUS"."STATUS_ID")
78 - access("B_FP_TEST"."TEST_ID"="J_FP_INVESTIGATOR"."TEST_ID")
85 - filter("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-28 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-10-28
00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND (LNNVL("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-11-04 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR
LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-04 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND (LNNVL("J_OP_TEST_ANML"."END_DATE">=TO_DATE(' 2013-10-27
00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("J_OP_TEST_ANML"."END_DATE"<=TO_DATE(' 2013-11-05 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND
(LNNVL("J_OP_TEST_ANML"."START_DATE">=TO_DATE(' 2013-10-27 00:00:00', 'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("J_OP_TEST_ANML"."START_DATE"<=TO_DATE(' 2013-11-05
00:00:00', 'syyyy-mm-dd hh24:mi:ss'))))
86 - access("J_OP_TEST_ANML"."TEST_ID"="B_FP_TEST"."TEST_ID")
87 - filter("B_FP_TEST"."DATASOURCE_ID"=9 AND "B_FP_TEST"."IS_DELETED"=0 AND "B_FP_TEST"."TEST_NUM"<>1 AND "B_FP_TEST"."TEST_NUM"<>2 AND
"B_FP_TEST"."TEST_NUM"<>99)
89 - filter("J_FP_INVESTIGATOR"."IS_PI"=1)
93 - filter("L_TEST_STATUS"."STATUS"='Completed' OR "L_TEST_STATUS"."STATUS"='In-Progress' OR "L_TEST_STATUS"."STATUS"='Scheduled')
94 - access("B_FP_TEST"."TEST_TYPE_ID"="L_ATMS_TEST_TYPE"."ATMS_TEST_TYPE_ID")
95 - filter("L_ATMS_TEST_TYPE"."IS_DELETED"=0)Excellent piece of follow-up on my first suggestion.
I nearly made a comment about how the plan doesn't show Bloom filter pruning either - and then I realised why not. The plan you've shown us comes from Explain Plan with literal values present; the trace file shows bind variables with names that are generated when cursor_sharing is set to force or similar - so the run-time plan and the plan from explain plan are almost guaranteed to be different.
Oracle support will need you to supply the plan you get from trying to run the query and then making a call to dbms_xplan.display_cursor() - dbms_xplan in 10g | Oracle Scratchpad If you do this I think you'll find that the pstart/pstop columns contain entries like :BF0000, and you may even find operations link PX JOIN FILTER CREATE / PX JOIN FILTER USE
A couple of generic notes:
if a query does sufficient work to merit parallel execution, then it's usually better to supply the best possible information to the optimizer, which means using literals rather than bind variables - you could try executing the query with the hint /*+ cursor_sharing_exact */ to stop Oracle from turning your literals into binds; it might be the presence of bind variables that's making the optimizer choose a path that has to include bloom filter pruning in your case.
Where you have the to_date() call you've used a four-digit year - which is a very good thing and helps the optimizer - but it's also a good idea to include an explicit format string as well: with a four-digit year this probably won't make any difference, but it avoids any risk of ambiguity for the optimizer.
I made a comment about the P->S stage and bottlenecks - I spent a couple more minutes looking at the plan, and I see the optimizer has used concatentation: in effect it has run three query blocks one after the other and fed the results to the query co-ordinator - in this case the P->S would make no difference to the end-user response time there's always a final P->S to the coordinator, you just happen to have three of them.
Regards
Jonathan Lewis -
TIME-OUT error in BSAK select query(Progress Indicator is also used)
Hi,
In my report program one select query is there on BSAK table, which is as follows --
SELECT BUKRS
BELNR
GJAHR
SHKZG
BSCHL
UMSKZ
LIFNR
EBELN
EBELP
WRBTR
DMBTR
XZAHL
REBZG
AUGBL
BLART
AUFNR
AUGDT
BUZEI FROM BSAK
INTO TABLE IT_BSAK
FOR ALL ENTRIES IN IT_BKPF1
WHERE BUKRS = IT_BKPF1-BUKRS
AND AUGDT = IT_BKPF1-BUDAT
AND AUGBL = IT_BKPF1-BELNR
AND BSCHL IN ('31' , '29', '26', '39', '25').
I used Progress Indicator befor running this query and after this query also. But still It's giving me TIME-OUT error in this select query only.
I run the same query for 10 records in IT_BKPF1 table, it runs perfectly. But when I run it for 1000 records it giving dump.
And in actual bussiness my records are always more than 100 only.
I also check the indexing. It having secondary indexing on this BUKRS, AUGDT, AUGBL fields. Then also it's giving error.
so, How can I solve this dump..?? What could be the reason..??
Thanks in advance...!!
Regards,
Poonam.Hi Poonam Patil,
Try to provide BELNR and GJAHR in where condition...
BKPF-DBBLG ==> BSAK-BELNR
Also check
BKPF-BLDAT ==> BSAK-AUGDT
Check out above relation...
If data is there in these fields of the table and both are matching then you can pass it and as they are in primary key of BSAK it will improve the performance...
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
Error in select query with package size
Hi Experts,
I have an issue.
SELECT * FROM (w_tab-tablename) I
NTO CORRESPONDING FIELDS OF TABLE <lt_data> PACKAGE SIZE 10000.
Am splitting the table for every 10000 records,for first time the select query is successful.
But when it comes for the second 10000 records,its throwing the following dump.
"DBIF_RSQL_INVALID_CURSOR"
Help AppreciatedHi,
There are a few instances where you get this error.
1) If you are debugging inside select ... endselect.
2) You have written any of the below statements inside select ... endselect.
Please look at the dump .. you'll find the below ..
MESSAGE (apart from MESSAGE S...)
COMMIT WORK
ROLLBACK WORK
BREAK-POINT
WAIT
CALL FUNCTION ... DESTINATION (synchronous RFC)
CALL FUNCTION ... STARTING NEW TASK
RECEIVE RESULTS
CALL DIALOG
CALL SELECTION-SCREEN
CALL TRANSACTION
CALL SCREEN, or any other statement that results in the display of a
new screen
Regards,
Srini. -
Hey Gurus,
i am working on a requirement in which select query is fetching 8 fields from a ZTABLE.
IF NOT IT_ZQAPP1[] IS INITIAL.
SELECT AUFNR VORNR PROBNR PIPENO NVORNR SHIFT
PSTAT PRODAT FROM ZQAPP INTO CORRESPONDING FIELDS OF TABLE IT_ZQAPP_B
FOR ALL ENTRIES IN IT_ZQAPP1
WHERE AUFNR = IT_ZQAPP1-AUFNR
AND WERKS IN P_WERKS
AND PRODAT LE P_PRODAT.
it works fine for lesser data but throws a dump error TSV_TNEW_PAGE_ALLOC_FAILED for entries more than 70000,
and my requirement is to fetch more than a lac record.
Kindly Suggest the corrections.
Thanks in Advance...Hi!
This error occurs typically, when there is no more memory for your ABAP session. This means, you have to do one of the followings:
- restrict your report for smaller intervals, like process only 1 month instead of 6 months together
- rewrite your program, and eliminate/refresh/free the unneccesary internal tables, or columns from internal tables. You might even try to remove unneccesary lines from internal tables
- use SELECT - ENDSELECT instead of SELECT ... INTO statement. This could slower your program, but you'll need less memory usage
Check your memory usage always, with SM04 transaction (Goto - Memory menu).
Regards
Tamá -
Hi All,
The Actual query to perform is below.
SELECT name,number from emp WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE 1 END = 1;
I have tried in DB adapter like below as a parameter for :1 as #vInputParam
SELECT name,number from emp WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE 1 END = 1;
Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
Can someone help me on this please?
Thanks,
HariHi,
Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
This is the option you will get when you are extending your vo. So make sure that both are same.
You can refer the below link too
VO extension leads to "Invalid column index" exception
Thanks
Bharat -
Cursor handle error in select query
Hello!
I'm having troubles with select query. I get the folowing error:
ODBC Error 'S1000', TimesTen Error 970, ODBC rc -1
ERROR in TTCommand.cpp, line 404: Error in TTCmd::Close() while closing cursor
[TimesTen][TimesTen 7.0.3.0.0 ODBC Driver][TimesTen]TT0970: Invalid cursor handle -- file "curAPI.c", lineno 1086, procedure "sb_curClose()"
*** ODBC Error/Warning = S1000, TimesTen Error/Warning = 970
*** Error in TTCmd::Close() for statement <SELECT 'alive' FROM DUAL>.
Error occures after aproximatelly 1000 request.
I' closing cursors and commiting after executing statement.
# ttisql -version
#TimesTen Release 7.0.3.0.0I use a code like described in sample.cpp in TimesTen demo directory.
First I prepare statement and function :
ControlData.Prepare(this, "SELECT 'alive' FROM DUAL", "", stat);
void
TTConnection::Control(TTStatus& stat)
TTStatus stat2;
try
ControlData.Execute(stat);
ControlData.Close(stat);
catch (TTStatus st)
cerr << "Error in SampleConnection::ContolData : " << st << endl;
ControlData.Close(stat2);
st.throwError() ;
In main function I use statement call like this (in endless loop)
try
conn.Control(stat);
conn.Commit(stat);
catch (TTError st)
cerr << "Error in CONTROL STATEMENT: " << st << endl;
Regards, Mitja -
hi experts,
I have written a pgm where i need to select records from BSAD table. This table has about 10 key fields. But according to my requirement, i can pass only 2 key fields to the table and have to fetch records from this table. But it goes to dump (timout error) in BSAD select query.
So i have used PACKAGE SIZE 20 and tried to fetch only 20 records at a time from the table. But still, it takes lot of time in fetching records from BSAD table.
Pls tell me what is the solution to avoid timeout error and how to fetch the records quickly.
Regards,
ShanthiI hope that your " two fields" are BUKRS and KUNNR.
Consider this: If I can't supply a value for the first field (after mandt), then the second, etc., the select is going to run FOREVER. I think that, if you used ST05 and explained the BSAD open, you would see the problem. I'm guessing that you're not supplying a value for BUKRS, etc., and thereby causing a full table scan. Or you may have supplied NOT operators in the where clause or included an order by statement. Current ABAP CHECK tools (like SLIN or SCID) should point out problems in the where statement also...
May I suggest utilizing SE11 and looking at BS* tables to see if there is an alternative data source where you can supply an EQ value for the first few fields (at least) of the index? Or, post psuedocode so that the forum users can help you out.
Maybe you are looking for
-
How to capture 2 stereo tracks (4 channels) in Premiere CS6? Thanks!
Problem capturing 2 stereo tracks (4 channels) into Premiere CS6 (on a Mac) from a Canon xls1? Thanks, IndigoJim!
-
If I reinstall Itunes will it delete all of my playlists, genres, etc?
Help, First time IPod owner who loaded 1,800 songs most of which had bad info (ie: wrong genre, artist showing as title, etc.) I've spent hours making changes in ITunes trying to get them right. I am having troubles connecting my IPod to ITunes and t
-
Hello, I'm reading documentation about Oracle10g, and I am a little bit confused. I have understood that it hasn't the Enterprise Manager Console and that the Administration task has to be executed from the OEM Grid Control (or OEM Database Control).
-
After Effects CC really slow in response
Hallo and sorry for may bad english! So,my nightmares with CC continues! I have serious lag when i do almost everything in AE. Press CTRL+Z i have to wait,press CTRL+A...wait...press P...wait....press the spacebar for move the preview window...wait f
-
Can't Download Itunes And Quicktime
i go to the download pages and the site gets a error where the download links are what gives. i get this "Network Timeout The operation timed out when attempting to contact swdlp.apple.com. The requested site did not respond to a connection request a