Pages

Subscribe:

Ads 468x60px

Friday 1 February 2013

Real Application Testing



Oracle Database Management System 11g introduced a new extension to the world which quickly became indispensable for many of the leading companies of world because of its high applicability and practicality. What does it do? In short and simple terms, Real Application Testing provides a real-time analysis of the effects of a system upgrade or movement of data from one database from another and then suggests ways and means to prevent any potential problems that may arise from such movement of data. This helps make the movement to the new system smooth and glitch free which used to be a huge problem earlier and not only saves a lot of unnecessary trial runs but also reduces the downtime significantly, thus increasing the performance of the companies.

There are two main components of Oracle Real Application Testing. The first is Database Replay which allows a completely test the changes which would be brought about on your system because of the upgrade/system change by running it at full capacity unlike other simulation programs which only use small samples and therefore, may miss a lot of glitches which would then haunt the real run.

The second is the SQL Performance Analyser which shows the actual impact of the system upgrade/change on the SQL running mechanisms and any effect due to their performance change. SQL statements and programs usually run into thousands of lines of codes and system upgrades or patches tend to mess around with their functionality a lot. SQL Performance Analyser not only points out potential problems with the SQL execution, it also suggests possible remediation techniques on the SQL statements. With Real Application Testing, it is possible to run full scale simulation tests for all system upgrades, patches and even configuration changes, raise potential problems which might occur and also suggest remedial measures to sort out all the kinks before the upgrade is applied.

These all analyzers are machine specific and those are not aware of real server statistics especially there would be more load or more than one database running. Human handled statistics are more important for finding out accurate results of performance testing. High experienced and Oracle specialists can find these all in remote dba work or remote dba services. If you are not knowledge about database administration then you should need to hire either good experienced DBA or hire remote services.


Wednesday 23 January 2013

Calculating Response Time and Statistics


Calculating Response Time and Statistics for Oracle Performance Tuning




According to so many books, the response time R correspond to a SQL trace file is identified as the sum of the elapsed time exhausted in database calls (e values) at recursive call depth 0 (dep=0) plus the sum of all elapsed values from inter and recursive database call wait events. The wait time (elapsed values) collected while routing a database call is rolled up into the parameter e of the database call that stimulated the wait. The classification of wait events is pertained in the calculation of R. Time used up waiting for intra database call wait events (all calls including recursive) must not be added to R, since this would outcome in double calculating. The e values of a database call already include the wait time of all intra database call wait events. Database calls are produced to trace files upon conclusion. This is why WAIT entries for intra database call wait events become visible before the PARSE, EXEC, and FETCH entries that engendered them. Runtime statistics, such as consistent reads, physical writes, and db block gets at recursive call depths other than zero are rolled up into PARSE, EXEC, and FETCH calls at recursive call depth 0. Just like ela values of intra database call wait events, these must not be double calculated. To promote a thorough understanding of how an extended SQL trace profiler calculates a resource, we should need to understand properly its mechanism. Then and only we are able to calculate total response time matrix as well as root cause of SQL statement for performing poor.


Database call statistics at recursive call (internal calls implicit cursors) deepness other than zero are revolved up into the statistics at recursive call depth 0. To determine the total number of db block gets in the trace file, we must think only cu parameter values of PARSE, EXEC, and FETCH entries with dep=0. The database call parameter cu (for current read) keep in touches to the statistic db block gets. The fact that the total number of db block gets as determined by querying V$SESSTAT was nine confirms that database call statistics at lower levels are rolled up into statistics at recursive call depth 0. This is methodology of calculation of response time from v$sesstat and if you get trace file then you can get whole idea about response time matrix of problematic SQL.


 

Tuesday 11 December 2012

Implicit Connection Cache



Implicit Connection Cache called as ICC in Oracle RAC. ICC is an advanced JDBC 3.0–compliant connection cache completion for DataSource, which can position to dissimilar fundamental databases. The cache is facilitated by invoking setConnectionCacheEnabled(true) on OracleDataSource. Cache is generated when the first correlation is demanded from the OracleDataSource. ICC produces and preserves physical connections to the database and enfolds them with logical connection. One cache is enough to service all connection requests, and any number of caches can be generated. Preferably, more than one cache is produced when there is necessitate accessing more than one DataSource. While the ICC creates and preserves physical connections to the database, the Connection Cache Manager creates the cache and administers the connection demands to the cache. ICC provides a number of advantages:

It can be employed with both thin and OCI drivers.

OCI clients can register to accept notifications about RAC high availability occurrences and respond when events occur.

During DOWN event giving out, OCI ceases affected connections at the client.

Eliminates connections from the OCI connection pool and the OCI session pool-the session pool maps each session to a physical connection in the connection pool, and there can be multiple sessions per connection.
Another feature is Fails over the connection if TAF has been arranged. If TAF is not configured, then the client only receives an error.

OCI does not currently handle UP events.

There is a one-to-one mapping between the OracleDataSource instance and the cache. When the application call ups the close()method to close the connection, all connections acquired through the datasource are revisited to the cache for reuse. The cache either returns an existing connection or creates a new connection.

The connection cache holds all properties specified by the JDBC 3.0 connection pool specification. The support for these properties allows the application to fine-tune the cache to maximize the performance for each application.

It also supports a mechanism to recycle and refresh stale connections. This helps refresh old physical connections.
Only one cache manager is present per virtual machine (VM) to manage all the caches. The Oracle Connection Cache Manager provides a rich set of APIs to manage the connection cache.

It provides a connection cache callback mechanism. The callback feature provides a mechanism for users to define cache actions when a connection is returned to the cache, when handling abandoned connections, and when a connection is requested but none is available in the cache.

Public boolean handleAbandonedConnection(OracleConnection oracleConnection, Object 0): This function is called when a connection is abandoned.

Public void releaseConnection(OracleConnection oracleConnection, Object o: This function is called when releasing a connection. 

This mechanism offers the capability for the application to describe the cache performance when the events occur.

It supports user-defined connection attributes that conclude which connections are retrieved from the cache. The user characteristics are a name-value pair and are not validated by the implicit connection cache.
There are two methods can retrieve connections based on these properties:
getConnection(java.util.Properties
cachedConnectionAttributes)
getConnection(java.lang.String user, java.lang.String passwd,
java.util.Properties cachedConnectionAttributes)