Thursday, May 30, 2013

How to update JDK on Oracle Enterprise Linux from version 1.6 to 1.7

JDK is the environment to develop Java programs and updating java on Linux boxes is a requirement which often comes up. The following lists the steps required to update the JDK from version 1.6.0_22 to 1.7.0_21.


Step 1: Download the JDK rpm from the following link:

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Step 2: The current JDK version is:

[root@test software]# java -version
java version “1.6.0_22″
OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.41.1.10.4.el6-i386)
OpenJDK Client VM (build 20.0-b11, mixed mode)

Step 3: Run the following command to update the JDK:

rpm -Uvh jdk-7u21-linux-i586.rpm
[root@test software]# rpm -Uvh jdk-7u21-linux-i586.rpm
Preparing…                ########################################### [100%]
1:jdk                    ########################################### [100%]
Unpacking JAR files…
rt.jar…
jsse.jar…
charsets.jar…
tools.jar…
localedata.jar…
plugin.jar…
javaws.jar…
deploy.jar…

Step 4: Check the version:

[root@test software]# java -version
java version “1.6.0_22″
OpenJDK Runtime Environment (IcedTea6 1.10.4) (rhel-1.41.1.10.4.el6-i386)
OpenJDK Client VM (build 20.0-b11, mixed mode)

Step 5: So the version is still pointing to the old one. We have to use the alternatives here to update the version. The newly installed Java is at this location /usr/java/jdk1.7.0_21/ :

[root@test bin]# pwd
/usr/java/jdk1.7.0_21/bin
[root@test bin]# /usr/sbin/alternatives –install /usr/bin/java java /usr/java/jdk1.7.0_21/bin/java 17021

Step 5: Now it should point to the latest version:

[root@test bin]# java -version
java version “1.7.0_21″
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing)

That’s it !!!

Wednesday, May 8, 2013

gv$cell_thread_history ; A Nice View

There are certain dictionary views available to monitor the Exadata cells from the database.One of the view is gv$cell_thread_history. This view is very interesting as it delves down to the session level with its serial number, SQL, specific cell, instance and also which Exadata object was waited and every entry is logged with the time. Looks very cool:

SQL> desc gv$cell_thread_history
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 INST_ID                                                        NUMBER
 CELL_NAME                                                      VARCHAR2(1024)
 SNAPSHOT_ID                                                    NUMBER
 SNAPSHOT_TIME                                                  DATE
 THREAD_ID                                                      NUMBER
 JOB_TYPE                                                       VARCHAR2(32)
 WAIT_STATE                                                     VARCHAR2(32)
 WAIT_OBJECT_NAME                                               VARCHAR2(32)
 SQL_ID                                                         VARCHAR2(13)
 DATABASE_ID                                                    NUMBER
 INSTANCE_ID                                                    NUMBER
 SESSION_ID                                                     NUMBER
 SESSION_SERIAL_NUM                                             NUMBER

Here is a sample code snippet:

SQL> select wait_object_name,count(*) cnt from gv$cell_thread_history group by wait_object_name order by cnt;

WAIT_OBJECT_NAME                        CNT
-------------------------------- ----------
UserThread Cond                           4
PredicateDisk-113                         4
bwresv Q_1/2k                             4
bufWaitObjQ_8k                            4
PredicateDiskRead IO Completion           4
bwresv Q_8k                               4
FSA: cache replacementQ_1MHugePa          4
CachePut Fence                            4
NetworkDirectory ReqHandle                4
PredicateCacheGetJob                      4
Flash Cache LRU                           4
FSA: Cache Get Job                        4
DiskDirectory HT                          4
GenTimeStats Operation                    4
in use Q_8k                               4
Completed Map Element List                4
gdisk ext                                 4
FSA: fcCtxt                               8
FSA: cache replacementQ_8k                8
FlashCache HT buckets                     8
PredicateDisk-110                         8
FC outstanding IOs                        8
IOContext                                 8
Cache Completed Jobs                      8
PredicateDisk-32                         12
PredicateDisk-56                         12
PredicateDisk-50                         12
PredicateDisk-22                        12

Log Buffer #318, A Carnival of the Vanities for DBAs

News and views are an integral part of our modern daily life. When it comes to the information-hungry roles such as database professionals, such need becomes more pressing. Log Buffer is one way to keep abreast of news and views from the world of Oracle, SQL Server, and MySQL.

Oracle:

There is a significant update SLOB 2, Kevin Closson informs.
Charles Hooper is grouping Data Sets by Week Number of the Month.
Chris Antognini has shared a script that is used to demo ITL deadlocks.
As Exadata Storage Indexes (SI) are purely memory only structures located on the Exadata storage servers, care needs to be taken in how much memory they can potentially consume.
Connon McDonald says that its not about the outage, but….

SQL Server:

Richard Douglas is giving information about SQL Server events in UK.
Thomas LaRock has been involved in a virtualization projects for almost ten years now.
Kendra Little has five things about Fillfactor.
Kevin Kline suggests to use TPC database benchmarks to save money.
Here’s a quick mystery. You have a SQL Server with several jobs that appear to be running properly and on schedule, but many of them show no history.

MySQL:

How does InnoDB behave without a Primary Key? Jeremy Cole asks.
The MariaDB project is pleased to announce the immediate availability of the MariaDB Java Client 1.1.2.
Normal 0 false false false EN-US X-NONE X-NONE Everybody loves free. It is the best marketing term one could use.
MySQL Cluster Manager 1.2.3 is now available to download from My Oracle Support.
When is a Subquery Executed?  Øystein Grøvlen writes.

This post appeared at Pythian Blog initially.