Does Instant Client support client result caching?
Hi all,
couldn't find the answer to this question on the ic-FAQ (http://www.oracle.com/technetwork/database/features/oci/ic-faq-094177.html)
Does Instant Client support client result caching?
Kind regards, Sander.
Yes. Like any other OCI feature, Client Result Caching is supported by Instant Client.
Besides OCI documentation, here is a link to white paper on Client Result Caching and other OCI features: http://www.oracle.com/technetwork/topics/php/whatsnew/building-best-drivers-131920.pdf
Similar Messages
-
Does OCI client result cache and oracle UCP work together?
I'm using Oracle 11.2.1.0. I've set up FCF and enabled OCI result cache on server side, so on client side, I'm using UCP for failover.
this is my datasource configuration:
<Resource name="jdbc/MyPool"
auth="Container"
factory="oracle.ucp.jdbc.PoolDataSourceImpl"
type="oracle.ucp.jdbc.PoolDataSource"
connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
url="jdbc:oracle:oci:@dbhost:1521/myDb"
user="db_user"
password="db_password"
fastConnectionFailoverEnabled="true"
onsConfiguration=""
connectionPoolName="dbPool"
initialPoolSize="5"
minPoolSize="5"
maxPoolSize="25"
connectionWaitTimeout="10000"
inactiveConnectionTimeout="120000"
abandonConnectionTimeout="60"
validateConnectionOnBorrow="true"
sqlForValidateConnection="select user from dual"
maxStatements="30"/>
I've enabled OCI client result cache.
I use /*+ result_cache */ in my query to take advantage of the result cache.
so I execute the following scenario:
i) select /*+ result_cache */ value from myTable where id=1; (this returns a result.)
ii) update myTable to set a different value for id=1 record;
iii) run select query again; (this should return a different result. oci result cache gets updated when table changes.)
if I take out
"sqlForValidateConnection" and/or "validateConnectionOnBorrow" (i.e. disable sql validation on borrow), the 2nd query after table update doesn't show the latest result. it's still showing the old query result.
is this a bug? that UCP validation on borrow has an impact on OCI result cache function? this doesn't happen if using dbcp java connection pooling with OCI result cache.it turns out I ran the test against an oracle server that doesnt have FCF configured, nor ONS.
once i switched to a correct oracle cluster, my test passed. -
Client Result Cache for geometries
Hi,
we have experienced that Client Result Caches can not be used using SDO geometries or function calls. Does anybody know a workaround for using Client Result Caches with geometries (e.g. casting the geometries to varchar2).
Thanks in advance,
SimonThere is a Spatial forum here at OTN. Please delete this thread and repost there.
Thank you. -
Hello everyone,
I have a question regarding the use of the client result cache but first of all here are the informations about my database:
SQL> SELECT * FROM v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
I have installed the Oracle Client Tools on my clientmachine. It has a tnsnames.ora like this:
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = FEA11-119SRV)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl.local)
The Client Result Cache is configured in the sqlnet.ora.
ADR_BASE = /u01/app/oracle
OCI_RESULT_CACHE_MAX_SIZE= 2048000
OCI_RESULT_CACHE_MAX_RSET_SIZE = 1024000
NAMES.DIRECTORY_PATH = (EZCONNECT, TNSNAMES, HOSTNAME)
The Databaseserver is configured like that:
SQL> col name format a30
SQL> col value format a30
SQL> SELECT name, value
2 FROM v$system_parameter
3 WHERE name LIKE '%result_cache%';
NAME VALUE
result_cache_mode MANUAL
result_cache_max_size 0
result_cache_max_result 5
result_cache_remote_expiration 0
client_result_cache_size 1073741824
client_result_cache_lag 3000
After configuring client an server I try the followign SQL-Statement on the clientmachine:
sqlplus oracle/password@orcl
set autotrace traceonly explain
SELECT /*+ result_cache */ *
FROM testtable;
SQL
The execution plan show two operations: "SELECT STATEMENT" and "TABLE ACCESS FULL" but no the "RESULT CACHE" operation.
Did I miss something?
Any help would be appreciated
Florian W.result_cache_max_size 0
That means the result cache is disabled. You need to set it to a non-zero value. That is the maximum ammount of memory, in bytes, the database will allocate on the shared pool to dedicate it to the result cache for all requests.
By the way, OCI_RESULT_CACHE_MAX_SIZE is optional. By default the sessions will have the maximum size they can occupy on the cache determined by CLIENT_RESULT_CACHE parameter, the client (OCI) side parameters override that.
result_cache_mode MANUAL
Another thing to consider is RESULT_CACHE_MODE in MANUAL, that will cause only the statements with the RESULT_CACHE hint on it to be cached on the result cache. You can also set result cache to mode FORCE on specific tables with alter table command.
Regards -
Using the client result cache without the query result cache
I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
This is done using a result_cache hint in the query.
select /*+ result_cache */ * from table
As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
Thanks.e3a934c9-c4c2-4c80-b032-d61d415efd4f wrote:
I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
This is done using a result_cache hint in the query.
select /*+ result_cache */ * from table
As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
Thanks.
You haven't provided ANY information about how you configured the result cache. Different parameters are used for configuring the client versus the server result cache so you need to post what, if anything, you configured.
Post the code you executed when you set the 'client_result_cache_lag' and 'client_result_cache_size' parameters so we can see what values you used. Also post the results of querying those parameters after you set them that show that they really are set.
You also need to post your app code that shows that you are using the OCI statements are used when you want to use client side result cacheing.
See the OCI dev guide
http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci10new.htm#sthref1491
Statement Caching in OCI
Statement caching refers to the feature that provides and manages a cache of statements for each session. In the server, it means that cursors are ready to be used without the need to parse the statement again. Statement caching can be used with connection pooling and with session pooling, and will improve performance and scalability. It can be used without session pooling as well. The OCI calls that implement statement caching are:
OCIStmtPrepare2()
OCIStmtRelease() -
Hi,
i am not sure, whether the new feature "Client Result Cache" for OCI - Connections is an enterprise only feature or not.
The Licensing Information at http://docs.oracle.com/cd/E11882_01/license.112/e10594/editions.htm#CJACGHEB shows this three features are enterprise only:
Client Side Query Cache
Query Results Cache
PL/SQL Function Result Cache
Which of these are pointing to Client Result Cache? Is it the Query Results Cache? Or something else?
As an Hint, i am unable to activate the feature on standard edition databases, but i am not sure, if this is the reason or if i am just making some mistakes in configuration/testing.
Thanks in advance
Joergwe stopped all tests, because it seems to be a enterprise edition only feature.
-
Is it possible to use the Client Result Cache when you use ODP.NET?
With the client side query cache it should be possible to cache query results in client memory.Is it possible to use the Client Result Cache when you use ODP.NET?
Yes, absolutely. In fact, my next Oracle Magazine column is on just that subject... though you won't see it until the May/June 2008 issue is published.
- Mark -
Instant client support for oracle rac ?
My questions is does instant client support rac ?
example : tnsnames.ora
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DB1-VIP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = DB2-VIP)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = RAC)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)If you are asking if Instant Client can connect to a RAC cluster, the answer is yes. There is no functional difference between a full client and Instant Client. I hope that helps!
-
Instant Client SQL*Plus License Question
Can anyone shed some light on a license question for me? (I know that most license questions are for Oracle Sales to handle, but this involves a supposedly free product.)
I want to use SQL*Plus with the Instant Client in a production environment, but I am not sure whether I am entitled to. Does Instant Client "support" SQL*Plus only in the sense that if I already own a license for SQL*Plus I can use it with the Instant Client, or is the Instant Client SQL*Plus package also truly free to deploy and use?
The download page has links to download a basic Instant Client, plus several optional packages, one of which is SQL*Plus. However, the FAQ does not tell me whether the optional packages (specifically SQL*Plus) is also free to deploy and use in a production environment, and I could not find any other helpful document.
The FAQ says that "Instant Client is FREE for anyone to use in a development or production environment." It also says immediately following that "Instant Client can be used to run your OCI, OCCI, Pro*C, JDBC, and ODBC applications without installing a full Oracle Client. In addition, Instant Client supports SQL*Plus." [emphasis mine]
I would appreciate any help on this.
Thanks in advance,
AnthonyWhy don't you call Oracle sales? I guess they'll be happy to answer your question.
Yours,
Laurenz Albe -
How to run Pro*C application with Instant Client in Oracle 10g
i am try to run but Pro*C application give error orasql10.dll
i have downlod Instant Client in Oracle 10g from site. i have unzip and maked environmental virable in PC.
but application not run. given error orasql10.dll .......
my problem is thrat i want to run Pro*C application with Instant Client in Oracle 10g .....
oracle say that run but how........According to this thread, it does not work on Windows:
Does Instant Client 10.1.0.4 for Windows 32 support ProC ? -
I have some problems with a computer having Windows98. Does Instant Client work fine with this OS? If YES: how I can to set the Path and the TNS_ADMIN? (On Windows 2003, right-click "My Computer", click Properties, click the Advanced tab, click the "Environment Variables" button, select the "path" variable and click the Edit button. In Windows98 how can I do?)
ThanksAccording to Re: Instant Client does not work on Windows98, why?
Windows 98 is not supported.
-- CJ -
If sga_target set explicitly, result cache become disabled
hi all,
I am using 11g R2 and automatic memory management. I realized something. if I explicitly declare sga_target parameter in parameter file, result cache become disabled.
as you know if you use automatic memory management, sga_target is set to 0 automatically already but if I write that to the parameter file than whatever I set for result_cache_max_size parameter, instance always opens with result_cache_max_size=0 (I saw that in alert log).
is there any reason for that ?
here is my pfile contents.
orcl.__db_cache_size=922746880
orcl.__java_pool_size=33554432
orcl.__large_pool_size=16777216
orcl.__oracle_base='C:\app\paranoyakX'#ORACLE_BASE set from environment
orcl.__pga_aggregate_target=838860800
orcl.__sga_target=1258291200
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=251658240
orcl.__streams_pool_size=16777216
*.audit_file_dest='C:\app\paranoyakX\admin\orcl\adump'
*.audit_trail='DB_EXTENDED'
*.compatible='11.2.0.0.0'
*.control_files='C:\app\paranoyakX\oradata\orcl\control01.ctl','C:\app\paranoyakX\flash_recovery_area\orcl\control02.ctl'
*.db_16k_cache_size=0
*.db_4k_cache_size=0
*.db_block_size=8192
*.db_domain='oracle.com'
*.db_flashback_retention_target=1000
*.db_keep_cache_size=0
*.db_name='orcl'
*.db_recovery_file_dest='C:\app\paranoyakX\flash_recovery_area'
*.db_recovery_file_dest_size=10737418240
*.diagnostic_dest='C:\app\paranoyakX'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.memory_max_target=34359738368
*.memory_target=2097152000
*.nls_language='TURKISH'
*.nls_territory='TURKEY'
*.open_cursors=300
*.pga_aggregate_target=528482304
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.resource_limit=TRUE
*.undo_tablespace='UNDOTBS1'
*.result_cache_max_size=5000000
*.sga_target=0I would suggest that you pay more attention to documentation and don't jump to conclusion in a haste. Just because the parameter result_cache_max_size is set to 0, it does not mean that the result cache in itself is disabled. This is the maximum size of the result cache. See below,
[oracle@edbar2p0-orcl ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 14 08:35:00 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> sho parameter result
NAME TYPE VALUE
client_result_cache_lag big integer 3000
client_result_cache_size big integer 0
result_cache_max_result integer 5
result_cache_max_size big integer 1184K
result_cache_mode string MANUAL
result_cache_remote_expiration integer 0
SQL> show parameter sga
NAME TYPE VALUE
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 460M
sga_target big integer 0
SQL> set autot trace exp
selSQL> ect /*+ result_cache */ * from scott.dept;
Execution Plan
Plan hash value: 3383998547
| Id | Operation | Name | Rows | Bytes | Cost (
%CPU)| Time |
| 0 | SELECT STATEMENT | | 4 | 80 | 3
(0)| 00:00:01 |
| 1 | RESULT CACHE | 1c13q1afp56bq0jpnmysvywx7g | | |
| |
| 2 | TABLE ACCESS FULL| DEPT | 4 | 80 | 3
(0)| 00:00:01 |
Result Cache Information (identified by operation id):
1 - column-count=3; dependencies=(SCOTT.DEPT); name="select /*+ result_cache
*/ * from scott.dept"
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing optionsThe value for the result_cache parameter is automatically set by oracle depending on either you have Memory_target/SGA_TARGET or Shared_Pool parameter set. Please see oracle documentation for more information.
HTH
Aman.... -
Instant Client on 64-bit Windows 7: Driver does not appear in System DSN
Instant Client on 64-bit Windows 7: Driver does not appear in System DSN tab when creating a new Data source.
What I did so far:
I downloaded the basic and odbc zips for Window 64-bit.
Unzipped the basic zip.
Unzipped the odbc zip to the same directory.
Added the dir path to the System Environment Variable called Path.
Double-clicked on the odbc_install.exe to run it from Windows Explorer.
Then I tried to add the driver to create a new data source but it does not appear in the list of drivers.
From a cmd window, I navigated to the instant client directory and tried to run odbc_install again.
I got the message: Oracle ODBC Driver with same name already exists.
What am I missing?hello, I did it like that you say,but the result also is "oracle odbc driver with same name already exists". I don't kown what can I do it ,Thank you!
-
Does the oracle instant client support ASO?
The Oracle Advanced Security Administrator's Guide http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96573/toc.htm will walk through configuring the client & the server once you know how you want it to be configured.
-
11g Client result set caching in OCI
I'm trying out this feature in the 11.1.0.6 release. My understanding of this feature is that when enabled with the appropriate server-side init.ora parameters, a 11g OCI client connecting to the instance will cache SQL results locally in some fixed amount of RAM on the client. The idea is that network roundtrips would simply disappear in this situation.
I'm not sure if it's working--or how to tell if it is. I have a 11g instance running and put the 11g client incl. sqlplus on a separate box, setting up TNS connectivity from client to server. Pretty standard stuff. I can connect fine and run the same query over and over, but I see incrementing execution counts on the database side and network traffic between the client and server so I'm guessing that the client-side caching isn't happening. There doesn't seem to be a ton of clear documentation on this feature so I wanted to see if anyone else has kicked it around.
BobI am also facing the same issue (enabling client result set caching). I am using Oracle Database 11g Release 11.2.0.2.0.
I have made the below configuration changes
1. Enabled the client result set cache by setting the server side parameter 'client_result_cache_size' to 10485760 (10 MB)
2. Restarted the oracle instance after setting the above parameter
3. Added a table annotation by executing the statement ALTER TABLE emp RESULT_CACHE (MODE FORCE). I verified that the annotation is applied by query the user table later.
4. Enabled statement caching on the client side i.e. on the JDBC driver.
5. Used prepared statements to execute the query so that statement caching kicks in. From the driver logs I verified that execution of subsequent queries after the first one used the same statement handle.
After executing the select prepared statement query for three times I checked the CLIENT_RESULT_CACHE_STATS$ view. But this view didn't result in any rows.
As part of troubleshooting I even tried adding the /*+ RESULT_CACHE */ hint to the query but the view didn't gave any result.
Also on enabling sql trace I could see from tkprof that every execution of the query increased the number of rows fetched on the server which indicates that the client result set caching in OCI isn't working.
Are there any steps which I have missed?
Thanks in advance.
Maybe you are looking for
-
Erro ao atualizar pedidos de venda do ano de 2009 faturados parcialmente
Pessoal, Ao tentar fazer qualquer atualização em alguma linha que ainda está em aberto de um pedido de venda com data de lançamento e entrega de 2009 e que contém outra linha que já foi faturada, o SAP apresenta o seguinte erro: Data diferente do i
-
I get a message saying i dont have enough privileges when i try and download from the cloud
when i try and download music from the cloud, i get a message saying I "do not have enough access privileges for this operation" what am i doing wrong
-
Can't use macbook after installing 10.7.5
Yesterday I upgraded to 10.7.5 and today I can't use my macbook pro. It doesn't go past the start up screen. I can't use the curser. It's just sits there. I forced it to restart and the same issue occurs. Can someone please suggest what to do? I
-
Why Array.as class is made dynamic?
Why Array.as class is made dynamic? public dynamic class Array
-
the screen says error with download #49