How to use "OCI Statement Cache - OCIStmtPrepare2" with XA ? Tuxedo ?
Hi All
Is there is a way to use "OCI Statement Cache - OCIStmtPrepare2" with tuxedo and XA ?
We have found out that a lot of the "CPU time" is spent by OCIStmtPrepare. We have 8 frequent statements (with bind) that we would like to cache .
Based on the following ORACLE paper, our interpenetration is that it is not allowed to cache statements when using XA.
*"Oracle® Database Advanced Application Developer's Guide 11g Release 1 (11.1)" - "Developing Applications with Oracle XA"*
Highlights from the ORACLE paper.
"When used in an Oracle XA application, cursors are valid only for the duration of the transaction. Explicit cursors must be opened after the transaction begins, and closed before the commit or rollback."
"Ensure that the application resets the fetch state before ending a transaction. In general, use release_cursor=no. Use release_cursor=yes only when you are certain that a statement will execute only once."
Regards
TechSgin
confirmed by ORACLE.
XA connections don't support OCIStmtPrepare2 (statement caching)
Similar Messages
-
How to use Oracle statement cache?
hi,
I'm using weblogic 7 with the included Oracle JDBC Thin driver
(9.2.0).
One new(?) feature in this driver statement caching, but it seems that
weblogic does not support this feature.
Mainly the classes in weblogic.jdbc.vendor.oracle.* that are some sort
of wrapper(?) to the thin driver does not support the methods that
enable this.
The driver docs says to use
OracleConnection.setImplicitStatementCachingEnabled(true)
or
OracleConnection.setExplicitStatementCachingEnabled(true)
but these just don't exist in the
weblogic.jdbc.vendor.oracle.OracleConnection class.
So, is this feature not supported by weblogic or there's another way
of doing statement caching?
Thanks
anatanat wrote:
hi,
I'm using weblogic 7 with the included Oracle JDBC Thin driver
(9.2.0).
One new(?) feature in this driver statement caching, but it seems that
weblogic does not support this feature.
Mainly the classes in weblogic.jdbc.vendor.oracle.* that are some sort
of wrapper(?) to the thin driver does not support the methods that
enable this.You are correct. Our oracle interface doesn't have that call, so you can't enable it.
Our next major release (in beta now) will allow you do do anything the driver
provides. For now, we do provide the same sort of functionality in our pool.
If you set the pool's statement cache size to N, then we will cache up to N
prepared statements for each pooled connection. This will get you exactly the
same performance benefit.
Joe
>
>
The driver docs says to use
OracleConnection.setImplicitStatementCachingEnabled(true)
or
OracleConnection.setExplicitStatementCachingEnabled(true)
but these just don't exist in the
weblogic.jdbc.vendor.oracle.OracleConnection class.
So, is this feature not supported by weblogic or there's another way
of doing statement caching?
Thanks
anat -
How to use union statement with declare & set function?
Hi Experts,
i have small query about how to use union statement with declare & set function?
Example as below :
DECLARE @name AS date
Declare @name2 AS date
/* SELECT FROM [2013].[dbo].[OINV] T0 */
/* WHERE */
SET @name = /* T0.DocDate */ '[%1]'
SET @name2 = /* T0.DocDate */ '[%2]'
select '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2013.dbo.orct t1
inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2013.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]
Union
/* SELECT FROM [2014].[dbo].[OINV] T0 */
/* WHERE */
SET @name = /* T0.DocDate */ '[%1]'
SET @name2 = /* T0.DocDate */ '[%2]'
select '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2014.dbo.orct t1
inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2014.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between [%1] and [%2]You have to create stored procedure in SQL only .
Like u must have create for Crystal .
You can execute procedure in query manager but you have to enter parameter manually..
example
Exec @Test '20140101' '20140501'
Every time user has to enter it manually in yyyymmdd format in case of date parameters.
Example
Create Proc [@Test]
as begin
DECLARE @name AS date
Declare @name2 AS date
/* SELECT FROM [2013].[dbo].[OINV] T0 */
/* WHERE */
select '2013',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2013.dbo.orct t1
inner join 2013.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2013.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2013.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2013].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between @Name and @Name2
Union
/* SELECT FROM [2014].[dbo].[OINV] T0 */
/* WHERE */
select '2014',t5.U_salmannm,t1.CardName,t2.sumapplied as CollectionAmount,t2.DcntSum ,t3.DocTotal as InvoiceTotal,
datediff(dd,t3.DocDate,t1.Docdate) as Days
from 2014.dbo.orct t1
inner join 2014.dbo.RCT2 t2 on t1.DocNum = t2.DocNum
left join 2014.dbo.oinv t3 on
t3.docentry = t2.baseAbs
inner join 2014.dbo.ocrd t4 on t1.Cardcode = t4.CardCode
inner join [2014].[dbo].[@CQ_RTSM] t5 on t4.U_BeatCode = t5.U_RoutCode
where t2.DcntSum <> 0.000000 and t3.DocDate between
between @Name and @Name2
end -
How to use " PERFORM ", STATEMENT WITH OFFSET
hI,
How we use Perform statement with offset, like
Example: " PERFORM READ_SEGRELEASE USING INT_EDIDC+11."
My requirement is to use Perform with Automatic length declaration.
Automatic length declaration in PERFORM statement
Kindly Explain and Provide some Example programm written in this situation.
Thanks,
P.N.KumarHiere is an example of what you probably require:
DATA:
lv_offset TYPE syoffi,
lv_length TYPE flength,
lv_field TYPE string.
lv_field = 'This is my value: hello world'.
lv_length = 5.
lv_offset = 18.
PERFORM read_segrelease USING lv_field
lv_length
lv_offset.
*& Form READ_SEGRELEASE
* text
* -->P_LV_FIELD text
* -->P_LV_LENGTH text
* -->P_LV_OFFSET text
FORM read_segrelease USING p_lv_field TYPE string
p_lv_length TYPE flength
p_lv_offset TYPE syoffi.
DATA:
lv_result TYPE string.
lv_result = p_lv_field+p_lv_offset(p_lv_length).
WRITE: / lv_result.
ENDFORM. " READ_SEGRELEASE -
How to use perform statements in sap scripts
how to use perform statements in sap scripts . and pls send me one progam for this
thnaks
rajaHi Raja,
<b>PERFORM</b> key work is used to include subroutine in sapscript form...
But the processing is lttle bit different form the one we use in ABAP.
Here the paramters passed to form is stored in internal table of name-value table. there are two table one for inbound parameter and other for outbound parameters.
Check out the example below to see how this is used..
<b>Definition in the SAPscript form:</b>
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
<b>Coding of the calling ABAP program:</b>
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this is clear to understand...
Enjoy SAP.
Pankaj Singh. -
How to use warn about changes property with page menus
how to use warn about changes property with page menus
Hi,
If u will enable this property, then u will get warning message as a popup in case of change of state of VO.
Regards,,
Gyan -
hi everybody,
how to use collect statement to get the total amount paid to different vendor payments
data : begin of wa occurs 0,
bukrs type bsak-bukrs,
lifnr type bsak-lifnr,
land1 type lfa1-land1,
name1 like lfa1-name1,
dmbtr like bsak-dmbtr,
count type i value 0,
tot_vend type i,
vend type i.
data :end of wa.
data : itab like table of wa.
select distinct bukrs lifnr waers from bsak into
corresponding fields of wa
where bukrs in s_bukrs
and lifnr in s_lifnr
and bschl in s_bschl.
i want the total amount paid according to vendor i am using this way but i am not getting
loop at itab into wa.
wa-dmbtr = bsak-dmbtr.
collect wa-dmbtr into itab.
modify itab from wa transporting dmbtr.
i am unalbe to get it
can anybody help me regarding this if possible with example.
thanks in advance,
regards,
venu.Hi Venu,
types: BEGIN OF ty,
NAME(20),
SALES TYPE I,
END OF ty.
data : itab type standard table of ty,
itab1 type standard table of ty,
wa type ty,
wa1 type ty.
wa-NAME = 'Duck'. wa-SALES = 10.
append wa to itab.
wa-NAME = 'Tiger'. wa-SALES = 20.
append wa to itab.
wa-NAME = 'Duck'. wa-SALES = 30.
append wa to itab.
loop at itab into wa.
wa1 = wa.
collect wa1 into itab1.
endloop.
loop at itab1 into wa1.
write : / wa1-name , wa1-sales.
endloop.
COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab .
If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.
<b>If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types ), the contents of these number fields are added together if the internal table already contains an entry with the same key fields.</b>
If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line.
In the program you mentioned yesterday,I am not able to get the logic since many lines are commented. -
How to use the same OC4j server with different port number
How to use the same OC4j server with different port numbers..?
I have to OC4J installed on my machine on different hard disk drives....
I want to be able to run both the server simultaneously..?
is it possible ..it yes then how..?
for that i have changed the port number of one server...
but when i am trying to start the other server with different port number..it says that JVM -Bind already...
Is there any clues...?
Nilesh GIn the config directory:
default-web-site.xml: Change the port the HTTP listener listens on
jms.xml: Change the port the JMS service listens on
rmi.xml: Change the port the ORMI listener listens on.
Or, you can add another web-site.xml file, and deploy your applications to 1 server, and bind the web applications to the different web sites. This way you only have to deploy your applications to 1 place.
Rob
Oracle -
How to use "Notes" on my iPad with my existing iCloud address?
How to use "Notes" on my iPad with my existing iCloud address? It asks me to create a new one...
Did I overlook some critical info here? I'm having the same problem described by Henry5, but I'm signed in to iCloud with my AppleID which is not the same as my Mobile Me/iCloud email. I keep being asked to create an account (which it won't allow me to do since the account already exists) but no where do I see an option to use the existing account. I also tried logging out with my AppleID account, and using the iCloud email, but that doesn't work.
I just want to sync my notes and mail... this is really irritating! -
How to use FM SO_DOCUMENT_REPOSITORY_MANAGER send mail with CC.
Dear Experts:
Please help me. How to use FM SO_DOCUMENT_REPOSITORY_MANAGER send mail with CC.
My Program code is as follow:
*Send the mail.
tb_receipients-recnam = 'BAITZ'.
tb_receipients-recesc = 'B'.
tb_receipients-sndex = 'X'.
tb_receipients-att_fix ='X' .
APPEND tb_receipients.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = wa_method1
office_user = wa_owner
ref_document = wa_ref_document
new_parent = wa_new_parent
IMPORTING
authority = wa_authority
TABLES
objcont = tb_objcnt
objhead = tb_objhead
objpara = tb_objpara
objparb = tb_objparb
recipients = tb_receipients
attachments = tb_attachments
references = tb_references
files = tb_files
CHANGING
document = wa_document
header_data = wa_header.
endform. " send_mail
By the why, tb_receipients-recnam = 'BAITZ'. What's the meaning of 'BAITZ'? Thanks!you can use FM SO_NEW_DOCUMENT_SEND_API1
WA_RECV TYPE SOMLRECI1,
IT_RECV TYPE STANDARD TABLE OF SOMLRECI1.
wa_recv-receiver = 'TO email address'.
wa_recv-rec_type = 'U'.
wa_recv-com_type = 'INT'.
APPEND wa_recv TO it_recv.
CLEAR wa_recv."To Recipient
wa_recv-receiver = 'CC email address'.
wa_recv-rec_type = 'U'.
wa_recv-com_type = 'INT'.
wa_recv-copy = 'X'.
APPEND wa_recv TO it_recv.
CLEAR wa_recv. "CC Recipient
wa_recv-receiver = 'BCC email address'.
wa_recv-rec_type = 'U'.
wa_recv-com_type = 'INT'.
wa_recv-blind_copy = 'X'.
APPEND wa_recv TO it_recv.
CLEAR wa_recv. "BCC Recipient -
How to use the eventing and databag with a WAS 6.20 ?
How to use the eventing and databag with a WAS 6.20 ?
Is what there is a good guide for these services?
Thank'sIn the raise event you can pass the value
like below.
<SCRIPT>
function raiseEvt(value1){
if(window.document.domain == window.location.hostname){
if ( document.domain.indexOf(".") > 0 ) document.domain = document.domain.substr(document.domain.indexOf(".")+1);
EPCMPROXY.raiseEvent( "urn:com.sap:BWEvents","BWiViewevent", value1, null );
// alert('tree domain'+document.domain);
</SCRIPT>
and in the
subscribe event you can get the values like below.
<script language="javascript">
if(window.document.domain == window.location.hostname){
document.domain = document.domain.substring(document.domain.indexOf('.')+1);
EPCMPROXY.subscribeEvent("urn:com.sap:BWEvents","BWiViewevent", window, "myreceiveEvent");
function myreceiveEvent( eventObj ) {
document.forms[0].gp_hidden.value = eventObj.dataObject;
</script>
Also look at the following link for a complete documentation.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/Enterprise%20Portal%20Client.pdf
Regards
Raja -
How to use CASE statement in WDA
Hi All,
Can any one Please expain me ' How to use CASE statement in Web dynpro ABAP? '
Please give me an example also.
Thanks in Advance !Hi,
The usage of case statement in webdynpro is same as used in general ABAP.
Data: l_id type string.
l_id = wdevent->get_string( 'ID' ).
case l_id.
when 'BTN1'.
when 'BTN2'.
when 'OTHERS'.
endcase.
Regards,
Radhika. -
How to use collect statement for below
data : begin of itab,
n(3) type c,
n1 type n,
k(5) type c,
end of itab.
select n n1 from into itab table /zteest.
*internal table has
n n1 k
gar 100 uji
hae 90 iou
gar 90 uji
hae 87 iou
I want
gar 190
hae 177
How to use collect statement as n1 is n ..?
let me know..
Thankstry this..
DATA : BEGIN OF itab OCCURS 0,
n(3) TYPE c,
n1(3) TYPE p DECIMALS 2,
k(5) TYPE c,
END OF itab.
itab-n = 'gar'.
itab-n1 = 100.
itab-k = 'uji'.
COLLECT itab .CLEAR itab.
itab-n = 'hae'.
itab-n1 = 90.
itab-k = 'iou'.
COLLECT itab .CLEAR itab.
itab-n = 'gar'.
itab-n1 = 90.
itab-k = 'uji'.
COLLECT itab .CLEAR itab.
itab-n = 'hae'.
itab-n1 = 87.
itab-k = 'iou'.
COLLECT itab .CLEAR itab. -
How to use multiple statements inside the "THEN" block of CASE statement?
Below is the code:
SET @strTempString = case @strKeyMode
WHEN 'AUTO/CYCLE'
THEN @strRefID + '|' + @strRetID
WHEN 'CYCLE'
THEN @strRefID + '|' + @strRetID
WHEN 'COMMERCIAL'
THEN @strRefID + '|' + @strRetID
WHEN 'ISNAP'
THEN set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + ' ', 2) + ' ', 2))))
'' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType
WHEN 'ASNAP'
THEN @strRefID + '|' + @strRetID
WHEN 'MOAT'
THEN @strRefID + '|' + @strRetID
else '0'
end
The first 3 conditions are understandable. How to use multiple statements in 4th case?
Here I first want to set the value as:
set @strFName = ltrim(rtrim((Left(dbo.CleanTheStringAdv(@strFName + ' ', 2) + ' ', 2))))
and then return the string '' + @strRefID + '|' + @strLName + '|' + @strFName + '|' + @strZIPorPolType to @strTempString.
Please help me remove the syntax errors.
Thanks in advance.Try below SQL
DECLARE @strKeyMode varchar(20) = 'ISNAP'
DECLARE @SQL VARCHAR(MAX)
DECLARE @strRefID int=1
DECLARE @strRetID INT=2
--FIRST WAY
IF @strKeyMode ='AUTO/CYCLE'
SELECT CAST(@strRefID as varchar(10))
ELSE IF @strKeyMode ='CYCLE'
SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
ELSE IF @strKeyMode='ISNAP'
SELECT @sql = CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
ELSE
SELECT @SQL='ABC'
print @sql
----SECOND WAY
SELECT @SQL = CASE @strKeyMode
WHEN 'AUTO/CYCLE' THEN CAST(@strRefID as varchar(10))
WHEN 'CYCLE' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))
WHEN 'ISNAP' THEN CAST(@strRefID as varchar(10)) + '|' + CAST(@strRetID as varchar(10))+'test'+'abc'
ELSE 'No Record'
END
PRINT (@SQL)
--Prashanth -
ANyone know how to use an Apple keyboard A1359 with a MacBook Air?
Does anyone know how to use an Apple Keyboard A1359 with a MacBook Air?
I'm going to ask the hosts to move this to the macbook forum since you're more likely to get answers there than in the iPad one.
Maybe you are looking for
-
[SOLVED]Video device file switches when starting Motion in daemon mode
I am not sure whether this should be here or in Kernel and Hardware. Motion live stream shows gray frame which says "Unable to open video device" and /var/log/errors.log gives: Failed to open video device /dev/video0: No such file or directory Could
-
I recenly changed device from BB Curve 8530 to BB Bold 9900 and ever since then can't accept BBM invitations and Invites sent shows only as "Pending for Authorization" but recipients are not receiving them either. Tried sending PIN messages but I g
-
Occi demo link error on solaris10/gcc2.95
Hi,every one,I have an error when I compile the occi demo as following command line: -bash-3.00$g++ -g -o demo -L../../ -I../include -locci -lclntsh -lthread occidml.cpp ERROR: Undefined first referenced symbol in file __1cG__CrunKpure_error6F_v_ ../
-
How add a image in the banner portlet like 'my links' in favourite portlet
How can I add a image in the banner of a portlet, like the 'my links' image in the Favourite Portlet? Thanks in advance
-
Convert numeric values in colomn into names
Hi experts, Here's the situation (probably very easy to solve but could only sort it out for month's, date's etc); Colomn name: Gender Values: 0 (=female), 1 (=male) I want to convert these 0 and 1 into a new colomn with the genders in names instead