Wednesday, September 29, 2010

yum to update your system kernel Unbreakable Enterprise Kernel

Oracle has released the Unbreakable Enterprise Kernel for x86_64 servers via the Oracle Public Yum Server. We can review Oracle Linux features.

Ensure that your system is running
Oracle Linux 5 Update 5 (x86_64) before installing the Unbreakable Enterprise Kernel.

But I tested on Enterprise Linux Server release 5.4. (just test ^ ^)
# cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 5.4 (Carthage)

# uname -a
Linux oel 2.6.18-164.el5 #1 SMP Thu Sep 3 04:15:13 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo
--2010-09-29 11:18:45-- http://public-yum.oracle.com/public-yum-el5.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2083 (2.0K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[===============================================================================>] 2,083 --.-K/s in 0s

2010-09-29 11:18:46 (76.4 MB/s) - `public-yum-el5.repo' saved [2083/2083]

# vi public-yum-el5.repo
# yum install kernel
# cat /boot/grub/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Enterprise Linux Enterprise Linux Server (2.6.32-100.0.19.el5)
root (hd0,0)
kernel /vmlinuz-2.6.32-100.0.19.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.32-100.0.19.el5.img
title Enterprise Linux (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-164.el5.img

# reboot

# uname -a
Linux oel 2.6.32-100.0.19.el5 #1 SMP Fri Sep 17 17:51:41 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
That is on Enterprise Linux Server release 5.4, then tested on Enterprise Linux Server release 5.5
Steps:
1. Ensure that your system is running Oracle Linux 5 Update 5 (x86_64) before installing the Unbreakable Enterprise Kernel.
2. Download and install the Oracle Linux 5 repo file to your system.
# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo
3. Enable both the [el5_u5_base] and the [ol5_u5_base] repositories in the yum configuration file by changing enable=0 to enable=1 in those sections.
4. To update your system kernel to the Unbreakable Enterprise Kernel, use the following yum command:
# yum install kernel
OR To upgrade all recommended packages associated with the Unbreakable Enterprise Kernel, use the following yum command:
# yum install oracle-linux
5. Reboot your system to run the newly-installed Unbreakable Enterprise Kernel.
Start to Test on OEL5.5:
# cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)

# uname -a
Linux oel 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-el5.repo
--2010-09-29 18:59:52-- http://public-yum.oracle.com/public-yum-el5.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2083 (2.0K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[===================================================================================================================>] 2,083 --.-K/s in 0s

2010-09-29 19:00:09 (90.3 MB/s) - `public-yum-el5.repo' saved [2083/2083]

# vi public-yum-el5.repo

[el5_u5_base]
name=Enterprise Linux $releasever U5 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

[ol5_u5_base]
name=Oracle Linux $releasever - U5 - x86_64 - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/5/base/x86_64/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

# yum install kernel
.
.
.
Complete!

# reboot
# uname -a
Linux oel 2.6.32-100.0.19.el5 #1 SMP Fri Sep 17 17:51:41 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

# yum install oracle-linux
.
.
.
Complete!
After I updated Kernel... It can mount btrfs, that is good.

Reference:
http://www.oracle.com/us/technologies/linux/025994.htm
http://public-yum.oracle.com

Monday, September 27, 2010

11.2.0.2 EDITION Attribute of a Database Service

I read 11g Release 2 (11.2.0.2) New Features and interested EDITION Attribute of a Database Service then tested it.

The EDITION attribute of a database service specifies the initial session edition for a session that is started using that service. If the program that creates a new session does not specify the initial session, then the edition name specified by the service is used. If the service does not specify the edition name, then the initial session edition is the database default edition.

When an edition-based redefinition exercise is implemented to support hot rollover, some clients to the database will want to use the pre-upgrade edition and others will want to use the post-upgrade edition. In this scenario, the database default edition is insufficient because, by definition, it denotes a single edition. The EDITION attribute of a database service provides a way to allow the client to specify the edition it wants using environment data rather than by changing the client code.

Before tested, I create procedure on ORA$BASE and VERSION2 editions.
SQL> connect demo

SQL> SELECT SYS_CONTEXT ('userenv','current_edition_name') ce FROM DUAL;

CE
--------------------------------------------------------------------------------
ORA$BASE

SQL> create or replace procedure my_procedure
as
begin
dbms_output.put_line ( 'I am version 1.0' );
end;
/

SQL> alter session set edition=version2;

Session altered.

SQL> SELECT SYS_CONTEXT ('userenv','current_edition_name') ce FROM DUAL;

CE
--------------------------------------------------------------------------------
VERSION2

SQL> create or replace procedure my_procedure
as
begin
dbms_output.put_line ( 'I am version 2.0' );
end;
/
then created and started new Database service by using DBMS_SERVICE
SQL> exec DBMS_SERVICE.CREATE_SERVICE(service_name => 'orcl_v2',network_name => 'orcl_v2', edition => 'VERSION2');

PL/SQL procedure successfully completed.

SQL> select edition from dba_services where name='orcl_v2';

EDITION
------------------------------
VERSION2

SQL> exec DBMS_SERVICE.START_SERVICE(service_name => 'orcl_v2', instance_name => 'orcl');

PL/SQL procedure successfully completed.
Check and test connect from Client.
$ lsnrctl service | grep orcl_v2
Service "orcl_v2" has 1 instance(s).
Note: tnsnames.ora file:
ORCL=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oratest)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))

ORCL_V2=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oratest)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl_v2)))

Test:
SQL> connect demo@orcl
Enter password:
Connected.

SQL> SELECT SYS_CONTEXT ('userenv','current_edition_name') ce FROM DUAL;

CE
--------------------------------------------------------------------------------
ORA$BASE

SQL> exec my_procedure;
I am version 1.0

PL/SQL procedure successfully completed.

SQL> connect demo@orcl_v2
Enter password:
Connected.

SQL> SELECT SYS_CONTEXT ('userenv','current_edition_name') ce FROM DUAL;

CE
--------------------------------------------------------------------------------
VERSION2

SQL> exec my_procedure;
I am version 2.0

PL/SQL procedure successfully completed.
Reference: Oracle Documents
http://download.oracle.com/docs/cd/E11882_01/server.112/e17128/toc.htm
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_serv.htm

Saturday, September 25, 2010

Oracle Database 11gR2 (11.2.0.2) is available on Solaris SPARC (64-bit/32bit), x86-64

Oracle announced to change Oracle Database Patch Sets Starting With 11.2.0.2 [1189783.1] and I wrote about patch[10098816] for Linux x86-64, x86.
Today, We can download patch[10098816] or 11.2.0.2 on Solaris.
We can read Patch Set Notes 11g Release 2 (11.2.0.2) Patch Set 1 (E15732-03). However if we check patch[10098816] SPARC (32-bit), We will see 2 files only.
How about them?
Installation Type Zip File

Oracle Database Client

p10098816_112020_platform_1of2.zip

Deinstall

p10098816_112020_platform_2of2.zip

Friday, September 24, 2010

Oracle Siebel CRM 8 Installation and Management book

The world's most complete customer relationship management (CRM) solution, Oracle's Siebel CRM helps organizations differentiate their businesses to achieve maximum top-and bottom-line growth. It delivers a combination of transactional, analytical, and engagement features to manage all customer-facing operations.
If you would like to install, configure, and manage a robust Customer Relationship Management system using Siebel CRM. I mention book titles Oracle Siebel CRM 8 Installation and Management written by Alexander Hansal (blog). He works as a technical instructor and consultant for Siebel CRM and Oracle Business Intelligence in Europe.

This book has 16 chapters and explains about installation, configuration and practical(management) Siebel CRM on windows and linux.

What we will learn from this book :
- Understand Siebel Web Architecture
- Plan and prepare Siebel CRM infrastructure
- Install and configure Siebel CRM software on Microsoft Windows and Linux
- Install and configure Siebel Charts and Oracle BI Publisher for Siebel
- Implement load balancing and support multi-language environments
- Manage the Siebel servers from the Siebel Web Client and the command line
- Implement LDAP authentication and Web Single-Sign-On
- Understand Siebel Access Control and Personalization
- Manage organizations, positions, and user accounts
- Install the Siebel Management Server infrastructure and use ADM to migrate configuration changes
- Monitor Siebel CRM environments for usage and performance
- Use Siebel Remote to support developers and mobile users

This book is useful to prepare for setting up Siebel CRM. You will learn ideas and tricks from expert. When you are looking for some book to help about Installation, Configuration and Management Siebel CRM, I suggest this book.

Sunday, September 19, 2010

Perl DBD-Oracle 1.25 support for DRCP (Database Resident Connection Pool)

John Scoles from the Pythian Group released Perl DBD::Oracle 1.25. We will find something Changes. It supports DRCP. How to code it? we can check from "perldoc DBD::Oracle".
Oracle DRCP
DBD::Oracle now supports DRCP (Database Resident Connection Pool) so if you have an 11.2 database and the DRCP
is turned on you can now direct all of your connections to it simply adding ":POOLED" to the SID or setting a
connection attribute of ora_drcp, or set the SERVER=POOLED when using a TNSENTRY style connection or even by
setting an environment variable ORA_DRCP. All of which are demonstrated below;

$dbh = DBI->connect("dbi:Oracle:DB:POOLED","username","password")

$dbh = DBI->connect("dbi:Oracle:","username@DB:POOLED","password")

$dbh = DBI->connect("dbi:Oracle:DB","username","password",{ora_drcp=>1})

$dbh = DBI->connect("dbi:Oracle:DB","username","password",{ora_drcp=>1, ora_drcp_class=>"my_app", ora_drcp_min=>10})

$dbh = DBI->connect("dbi:Oracle:host=foobar;sid=ORCL;port=1521;SERVER=POOLED", "scott/tiger", "")

$dbh = DBI->connect("dbi:Oracle:", q{scott/tiger@(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST= foobar)(PORT=1521))
(CONNECT_DATA=(SID=ORCL)(SERVER=POOLED)))}, "")

if ORA_DRCP environment var is set the just this

$dbh = DBI->connect("dbi:Oracle:DB","username","password")
Check perl module version and then start example for DRCP:
$ perl -e 'use DBI; print $DBI::VERSION,"\n";'
1.614
$ perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
1.25
tnsnames.ora file. -- we can read more... Configuring Database Resident Connection Pooling
ORCL_POOL=
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linuxtest01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)(SERVER=POOLED)))
Code 1: (testdrcp.pl)
#!/usr/bin/perl -w
use DBI;
my $dbh = DBI->connect("dbi:Oracle:orcl_pool","scott","tiger")
||
die( $DBI::errstr . "\n" );
my $sth = $dbh->prepare("begin dbms_lock.sleep(5); end;");
$sth->execute();
test code 1:
$ perl testdrcp.pl
DBI connect('orcl_pool','scott',...) failed: ORA-28547: connection to server failed, probable Oracle Net admin error (DBD ERROR: OCISessionBegin) at testdrcp.pl line 4 ORA-28547: connection to server failed, probable Oracle Net admin error (DBD ERROR: OCISessionBegin)
because we don't start connection pool on database.
SQL> execute dbms_connection_pool.start_pool;

PL/SQL procedure successfully completed.
test code 1 again:
$ perl testdrcp.pl
-- NO ERROR --

SQL> select username, status, server, program from v$session where username='SCOTT'; -- while code running

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT ACTIVE POOLED perl@linuxtest01 (TNS V1-V3)

SQL> select username, status, server, program from v$session where username='SCOTT'; -- code finished

no rows selected
That mean, database created connection pooling and closed after executed.
Code 2: (testdrcp.pl) -- use "ora_drcp"
#!/usr/bin/perl -w
use DBI;
my $dbh = DBI->connect("dbi:Oracle:orcl_pool","scott","tiger",{ora_drcp=>1})
||
die( $DBI::errstr . "\n" );
my $sth = $dbh->prepare("begin dbms_lock.sleep(5); end;");
$sth->execute();
test code 2:
$ perl testdrcp.pl
-- NO ERROR --

SQL> select username, status, server, program from v$session where username='SCOTT'; -- while code running

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT ACTIVE POOLED perl@linuxtest01 (TNS V1-V3)

SQL> select username, status, server, program from v$session where username='SCOTT'; -- code finished

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT INACTIVE POOLED perl@linuxtest01 (TNS V1-V3)

$ perl testdrcp.pl -- test again
-- NO ERROR --

SQL> select username, status, server, program from v$session where username='SCOTT'; -- while code running

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT INACTIVE POOLED perl@linuxtest01 (TNS V1-V3)
SCOTT ACTIVE POOLED perl@linuxtest01 (TNS V1-V3)

SQL> select username, status, server, program from v$session where username='SCOTT'; -- code finished

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT INACTIVE POOLED perl@linuxtest01 (TNS V1-V3)
SCOTT INACTIVE POOLED perl@linuxtest01 (TNS V1-V3)
From code, ora_drcp=>1, that make connection pooling be "INACTIVE" after executed (hold connection), but it created new connection class every time when connect database.
SQL> select * from V$CPOOL_CC_INFO;

POOL_NAME CCLASS_NAME
-------------------------------------------------- --------------------------------------------------
SYS_DEFAULT_CONNECTION_POOL SCOTT.OCI:SP:kJxcQGCWisTgQKjAIwEaOB
SYS_DEFAULT_CONNECTION_POOL SCOTT.OCI:SP:kJxcq/eyU8PgQKjAIwEaOD
Then How to reuse connection class?
Code 3:
#!/usr/bin/perl -w
use DBI;
my $dbh = DBI->connect("dbi:Oracle:orcl_pool","scott","tiger",{ora_drcp=>1, ora_drcp_class=>"my_app", ora_drcp_min=>10})
||
die( $DBI::errstr . "\n" );
my $sth = $dbh->prepare("begin dbms_lock.sleep(5); end;");
$sth->execute();
test code 3:
$ perl testdrcp.pl
-- NO ERROR --

SQL> select username, status, server, program from v$session where username='SCOTT'; -- while code running

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT ACTIVE POOLED perl@linuxtest01 (TNS V1-V3)

SQL> select username, status, server, program from v$session where username='SCOTT'; -- code finished

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT INACTIVE POOLED perl@linuxtest01 (TNS V1-V3)

$ perl testdrcp.pl --test again
-- NO ERROR --

SQL> select username, status, server, program from v$session where username='SCOTT'; -- while code running

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT ACTIVE POOLED perl@linuxtest01 (TNS V1-V3)

SQL> select username, status, server, program from v$session where username='SCOTT'; -- code finished

USERNAME STATUS SERVER PROGRAM
------------------------------ -------- --------- ------------------------------------------------
SCOTT INACTIVE POOLED perl@linuxtest01 (TNS V1-V3)
From code, we use connection class, so connection reused connection class (my_app).
SQL> select * from V$CPOOL_CC_INFO;

POOL_NAME CCLASS_NAME
------------------------------ ------------------------------
SYS_DEFAULT_CONNECTION_POOL SCOTT.my_app
- Connect Attributes for DRCP :
ora_drcp - If you have an 11.2 or greater database your can utilize the DRCP by setting this attribute to 1 at connect time.
For convenience I have added support for a "ORA_DRCP" environment variable that you can use at the OS level to set this value.

ora_drcp_class - If you are using DRCP, you can set a CONNECTION_CLASS for your pools as well. As sessions from a DRCP cannot be shared by users, you can use this setting to identify the same user across different applications. OCI will ensure that session belonging to a "class" are not shared outside the class".
The values for ora_drcp_class cannot contain an "*" and must be less than 1024 characters.
This value can be set at the environment level with "ORA_DRCP_CLASS".

ora_drcp_min - Is an optional value that specifies the minimum number of sessions that are initially opened. New sessions are only opened after this value has been reached.
The default value is "4" and any value above "0" is valid.
Generally, it should be set to the number of concurrent statements the application is planning or expecting to run.
This value can be set at the environment level with "ORA_DRCP_MIN".

ora_drcp_max - Is an optional value that specifies the maximum number of sessions that can be open at one time. Once reached no more session can be opened until one becomes free. The default value is "40" and any value above "1" is valid. You should not set this value lower than ora_drcp_min as that will just waste resources.
This value can be set at the environment level with "ORA_DRCP_MAX".

ora_drcp_incr - Is an optional value that specifies the next increment for sessions to be started if the current number of sessions are less than ora_drcp_max. The default value is "2" and any value above "0" is valid as long as the value of ora_drcp_min + ora_drcp_incr is not greater than ora_drcp_max.
This value can be set at the environment level with "ORA_DRCP_INCR".

- Configuration Parameters for DRCP (Database)
- Data Dictionary Views for DRCP

read more ...about DBD-Oracle

Friday, September 17, 2010

run root.sh script to configure Oracle Grid Infrastructure 11.2.0.2

After I struggled to Upgrade Oracle Database 11.2.0.1 to 11.2.0.2, I fixed some... for using "rootupgrade.sh" and done with oracle database upgrading. but I felt curious some
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
My database is 11.2.0.2, but some...
$ /oracle/product/11.2.0/grid_new/bin/crsctl stat res ora.orcl.db -p | grep VERSION
VERSION=11.2.0.1.0
# /oracle/product/11.2.0/grid_new/bin/crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.2.0]
# /oracle/product/11.2.0/grid_new/bin/crsctl query has softwareversion
Oracle High Availability Services version on the local node is [11.2.0.1.0]
so, I'd like to run "root.sh" and add old resources.
$ /oracle/product/11.2.0/grid_new/bin/crsctl stat res -p > /tmp/old_resourses
start to run "root.sh"
# mv /etc/oracle/olr.loc /etc/oracle/olr.loc.bak
# /oracle/product/11.2.0/grid_new/root.sh
Running Oracle 11g root script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/11.2.0/grid_new

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/product/11.2.0/grid_new/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.
PROT-29: The Oracle Cluster Registry location is already configured
Replace of older local-only OCR failed
CRS-4664: Node oel successfully pinned.
Adding daemon to inittab
ACFS-9459: ADVM/ACFS is not supported on this OS version: '2.6.35.4'
oel 2010/09/18 00:03:28 /oracle/product/11.2.0/grid_new/cdata/oel/backup_20100918_000328.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
then add resources by manual, Example:
$ export ORACLE_HOME=/oracle/product/11.2.0/grid_new
$ export CRS_HOME=/oracle/product/11.2.0/grid_new
$ export ORA_CRS_HOME=/oracle/product/11.2.0/grid_new
$ /oracle/product/11.2.0/grid_new/bin/srvctl add listener -l LISTENER -o /oracle/product/11.2.0/grid_new
$ /oracle/product/11.2.0/grid_new/bin/srvctl add asm -l LISTENER -p +DATA/asm/asmparameterfile/registry.253.729824635 -d +DATA
$ /oracle/product/11.2.0/grid_new/bin/srvctl add database -d orcl -o /oracle/product/11.2.0/dbhome_2 -p +DATA/orcl/spfileorcl.ora -y AUTOMATIC
and then check
# /oracle/product/11.2.0/grid_new/bin/crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.2.0]
# /oracle/product/11.2.0/grid_new/bin/crsctl query has softwareversion
Oracle High Availability Services version on the local node is [11.2.0.2.0]
$ /oracle/product/11.2.0/grid_new/bin/crsctl stat res ora.orcl.db -p | grep VERSION
VERSION=11.2.0.2.0
After used this idea, I feel everything well for me. However this post, I just curious about Oracle HAS version on the local node.

Oracle Fusion Middleware Patterns book

Oracle Fusion Middleware is the application infrastructure. It enables enterprises to create and run agile, intelligent business applications while maximizing IT efficiency through full utilization of modern hardware and software architectures.I mention a book titles Oracle Fusion Middleware Patterns written by Leading IT Professionals (Harish Gaur, Markus Zirn, Srikant Subramaniam, Nam Doan-Huy , YiHong Xu , Narshimha Rao Kondapaka, Melody Wood, Matjaz B. Juric, Ross Sharman, Juliana Button, Matt Miller, Mark Simpson, Kiran Dattani, Milind Pandit, Nikhilesh Chitnis, Sandeep Banerjie, Mark Farabaugh, Sri Ayyeppen, John Chung, Mike Blackmore, Hamza Jahangir, Basheer Khan, Rex Thexton, Nishidhdha Shah).

This book is written about ten real-world case studies - agile applications using SOA, BPM, Enterprise 2.0, Business Intelligence, Identity Management, and Application Infrastructure. This book shows how to design and develop business processes efficiently.

What we will learn from this book:
- Examine the key building blocks of Enterprise 2.0 architectures and then outline important integration considerations
- Align IT with business processes that benefit from process-driven SOA development
- Create a unified platform for fast, flexible data analysis by integrating relational and multi-dimensional data
- Combine SOA and BI to build intelligent processes with insight-driven agility
- Inject high performance into data services by using data-tier caching for SOA performance
- Bring about change without developing code for application extensions and integrations
- Provide next generation integrated real-time intelligence using Oracle WebCenter, Oracle Coherence, and Oracle Business Activity Monitoring
- Build an automated reporting platform with SOA and Oracle Business Intelligence Publisher
- Govern business demands and requirements by building agile applications using Fusion Development and Oracle Enterprise Architecture Principles

This book has 10 chapters in 3 sections: Process Improvement, Business Visibility and Collaboration and Security. If you are responsible for planning, designing, providing, and operating software solutions, you have to read this book, this book can help you for ideas and solutions.

Thursday, September 16, 2010

ORA-27154: post/wait create failed ORA-27300: OS system dependent operation:semget failed with status: 28

I started ASM instance, it crashed and found error.
ORA-27154: post/wait create failed
ORA-27300: OS system dependent operation:semget failed with status: 28
ORA-27301: OS failure message: No space left on device
ORA-27302: failure occurred at: sskgpsemsper
if check from OS
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 129G 27G 103G 21% /oradata
/dev/sda2 49G 33G 14G 72% /oracle
then check about Semaphore Limits.
# ipcs -la
------ Semaphore Limits --------
max number of arrays = 200
max semaphores per array = 250
max semaphores system wide = 100
max ops per semop call = 100
semaphore max value = 32767
my value wrong, check Document and then modify /etc/sysctl.conf file.
kernel.sem = 250 32000 100 200
run sysctl and check.
# sysctl -p
# sysctl kernel.sem
kernel.sem = 250 32000 100 128
# ipcs -la
------ Semaphore Limits --------
max number of arrays = 200
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 100
semaphore max value = 32767
and then startup ASM instance again. (ASM instance started)

Wednesday, September 15, 2010

struggle to Upgrade Oracle Database 11.2.0.1 to 11.2.0.2

After I wrote about Oracle Database 11gR2 (11.2.0.2) is available on Linux x86-64, x86. It's time to test for upgrading. On my test system, I install Oracle Grid Infrastructure for Standalone Server (ASM) and Database 11.2.0.1, then test to upgrade 11.2.0.1 => 11.2.0.2:
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 use ASM instance, So I have to upgrade Oracle Grid Infrastructure before, check and stop HAS
# /oracle/product/11.2.0/grid/bin/crsctl stat res
NAME=ora.DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on oel

# /oracle/product/11.2.0/grid/bin/crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oel'
.
.
.
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oel' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Grid infrastructure Upgrading uses p10098816_112020_Linux-x86-64_3of7.zip file and database use p10098816_112020_Linux-x86-64_1of7.zip, p10098816_112020_Linux-x86-64_2of7.zip files. On step, use "runInstaller" to install (choose Upgrade)
Find warning!!! I can not install to replace old Grid Home.
I have to use new Home.
then press Install, find step to run "rootupgrade.sh" script.
# /oracle/product/11.2.0/grid_new/rootupgrade.sh
Running Oracle 11g root script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/11.2.0/grid_new

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/product/11.2.0/grid_new/crs/install/crsconfig_params
Creating trace directory

Error while detecting Oracle Grid Infrastructure. ASMCA needs Oracle Grid Infrastructure to configure ASM.

ASM upgrade failed, see logs for details
Failed to upgrade ASM for Oracle Restart configuration at /oracle/product/11.2.0/grid_new/crs/install/crsconfig_lib.pm line 12653.
/oracle/product/11.2.0/grid_new/perl/bin/perl -I/oracle/product/11.2.0/grid_new/perl/lib -I/oracle/product/11.2.0/grid_new/crs/install /oracle/product/11.2.0/grid_new/crs/install/roothas.pl execution failed
So, run "asmca" but find error.

One idea, copy orapw+ASM file from old grid home :
# cp -a /oracle/product/11.2.0/grid/dbs/orapw+ASM /oracle/product/11.2.0/grid_new/dbs/
then run "rootupgrade.sh" again.
# /oracle/product/11.2.0/grid_new/rootupgrade.sh
Running Oracle 11g root script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/11.2.0/grid_new

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/product/11.2.0/grid_new/crs/install/crsconfig_params
Creating trace directory

Error while detecting Oracle Grid Infrastructure. ASMCA needs Oracle Grid Infrastructure to configure ASM.

ASM upgrade failed, see logs for details
Failed to upgrade ASM for Oracle Restart configuration at /oracle/product/11.2.0/grid_new/crs/install/crsconfig_lib.pm line 12653.
/oracle/product/11.2.0/grid_new/perl/bin/perl -I/oracle/product/11.2.0/grid_new/perl/lib -I/oracle/product/11.2.0/grid_new/crs/install /oracle/product/11.2.0/grid_new/crs/install/roothas.pl execution failed
but can not solve, try to start ASM instance to check:
$ export ORACLE_HOME=/oracle/product/11.2.0/grid_new
$ export ORACLE_SID=+ASM
$ /oracle/product/11.2.0/grid_new/bin/sqlplus / as sysasm
SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 16 03:04:04 2010
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters ORA-29701: unable to connect to Cluster Synchronization Service
From error, I have to start CSS before, then idea "run rootupgrade.sh again"-> fixed by modified /etc/oracle/olr.loc and run "rootupgrade.sh" again:
# vi /etc/oracle/olr.loc
Old:
crs_home=/oracle/product/11.2.0/grid
New:
crs_home=/oracle/product/11.2.0/grid_new
# /oracle/product/11.2.0/grid_new/rootupgrade.sh
Running Oracle 11g root script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/11.2.0/grid_new

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /oracle/product/11.2.0/grid_new/crs/install/crsconfig_params
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node oel successfully pinned.
Adding daemon to inittab
PRKO-3226 : Upgrade from version 11.2.0.1.0 to version 11.2.0.1.0 using srvctl upgrade model command of version 11.2.0.2.0 is not supported
srvctl upgrade model -first ... failed
PRKO-3226 : Upgrade from version 11.2.0.1.0 to version 11.2.0.1.0 using srvctl upgrade model command of version 11.2.0.2.0 is not supported
srvctl upgrade model -last ... failed
ACFS-9459: ADVM/ACFS is not supported on this OS version: '2.6.35.4'
oel 2010/09/16 03:17:37 /oracle/product/11.2.0/grid_new/cdata/oel/backup_20100916_031737.olr
oel 2010/09/16 01:00:46 /oracle/product/11.2.0/grid/cdata/oel/backup_20100916_010046.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Everything look ok... and press install to continue...

after upgraded Grid Infrastructure, check
# /oracle/product/11.2.0/grid_new/bin/crsctl stat res
NAME=ora.DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.asm
TYPE=ora.asm.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on oel

NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE

NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on oel
Note: error from rootupgrade.sh, I fixed by 1. copy password ASM file from old home to new home(for start ASM instance ) 2. modified /etc/oracle/olr.loc file (crs_home) after I used "ps -aef" and other idea to check.

Then install Oracle Database 11.2.0.2 by "runInstaller" (use Upgrade)
and found warning(oracle recommends to install out-of-place)
install new home
and then upgrade database.

After upgraded, check
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
but ohasd, init.ohasd files still wrong about CRS_HOME.
# cd /etc/init.d/
# cp ohasd ohasd.org
# cp init.ohasd init.ohasd.org
Change /oracle/product/11.2.0/grid to /oracle/product/11.2.0/grid_new in ohasd, init.ohasd files.

We may find error from "rootupgrade.sh", we should solve it before (try to use "rootupgrade.sh" with no error). If find "The current version of Oracle Grid Infrastructure is 11.2.0.1.0... " while upgrade database(dbua), make sure step rootupgrade.sh done.

ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200] lsts[0]]

When we created spfile in ASM instance and found ORA-29786.
SQL> create spfile='+DATA' from memory;
create spfile='+DATA' from pfile
*
ERROR at line 1:
ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
lsts[0]]
If we check oracle support 976075.1:
11gR2, ASM instance is a resoure in CRS repository also in single instance installations. Hence, it must be registered to OCR before.
then, check and solve:
$ crsctl stat res | grep NAME\= |grep asm
I had no asm in my OCR.
$ srvctl add asm -l LISTENER -p '+DATA' -d +DATA
PRCR-1001 : Resource ora.LISTENER.lsnr does not exist
$ srvctl add listener -l LISTENER -s -o /u01/app/oracle/product/11.2.0/grid_1
$ srvctl add asm -l LISTENER -p '+DATA' -d +DATA
$ crsctl stat res | grep NAME\= |grep asm
NAME=ora.asm
then try to create spfile again:
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string

SQL> create spfile='+DATA' from memory;
File created.

SQL> shutdown
this case, I used "srvctl" to help (start)
$ srvctl start asm
check spfile in ASM instance.
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/asm/asmparameterfile/registry.253.729779795
So, ORA-29786 error, we can solve to register ASM in OCR.

Tuesday, September 14, 2010

Oracle Database 11gR2 (11.2.0.2) is available on Linux x86-64, x86

Oracle announced to change Oracle Database Patch Sets Starting With 11.2.0.2 [1189783.1].
In past releases, Oracle Database patch sets consisted of a set of files that replaced files in an existing Oracle home. Beginning with Oracle Database 11g Release 2, patch sets are full installations that replace existing installations.
Today, we can download Patch Sets at Oracle Support patch#[10098816] for Linux x86-64, x86.
We will find 7 files for download:
Installation Type Zip File

Oracle Database (includes Oracle Database and Oracle RAC)

Note: you must download both zip files to install Oracle Database.

p10098816_112020_platform_1of7.zip

p10098816_112020_platform_2of7.zip

Oracle Grid Infrastructure (includes Oracle ASM, Oracle Clusterware, and Oracle Restart)

p10098816_112020_platform_3of7.zip

Oracle Database Client

p10098816_112020_platform_4of7.zip

Oracle Gateways

p10098816_112020_platform_5of7.zip

Oracle Examples

p10098816_112020_platform_6of7.zip

Deinstall

p10098816_112020_platform_7of7.zip


We can check Bugs fixed in the 11.2.0.2 Patch Set at Oracle Support [1179583.1] and review more about New Features.

Reference:
http://support.oracle.com
http://www.oracle.com/pls/db112/homepage

Friday, September 10, 2010

CLSR-0002 ORA-01003 in IMON logs

Failed to start the service with "srvctl" command-line.
$ srvctl start service -d db -i db1 -s servicedb
PRKP-1030 : Failed to start the service servicedb.
CRS-0215: Could not start resource 'ora.db.servicedb.db1.srv'.
So, check imon* file.
$ tail -f imon_db.log
2010-09-10 00:16:51.561: [ RACG][1252133216] [29774][1252133216][ora.db.servicedb.db1.srv]: CLSR-0002: Oracle error encountered while executing clsrcsngtsn: open cursor
2010-09-10 00:16:51.561: [ RACG][1252133216] [29774][1252133216][ora.db.servicedb.db1.srv]: ORA-01003: no statement parsed
2010-09-10 00:16:51.566: [ RACG][1252133216] [29774][1252133216][ora.db.servicedb.db1.srv]: CLSR-0002: Oracle error encountered while executing clsrcsngtsn: open cursor
2010-09-10 00:16:51.566: [ RACG][1252133216] [29774][1252133216][ora.db.servicedb.db1.srv]: ORA-01003: no statement parsed
2010-09-10 00:16:52.676: [ RACG][1252133216] [29774][1252133216][ora.db.servicedb.db1.srv]: CLSR-0002: Oracle error encountered while executing clsrcsngtsn: open cursor
2010-09-10 00:16:52.676: [ RACG][1252133216] [29774][1252133216][ora.db.servicedb.db1.srv]: ORA-01003: no statement parsed
2010-09-10 00:19:31.233: [ RACG][1252133216] [29774][1252133216][ora.db.db1.inst]: CLSR-0002: Oracle error encountered while executing clsrcsngtsn: open cursor
2010-09-10 00:19:31.233: [ RACG][1252133216] [29774][1252133216][ora.db.db1.inst]: ORA-01003: no statement parsed

then checked metalink ID 818997.1 : ORA-1003 is caused by unpublished Bug 5556555(fixed 11.1.0.6 and will be fixed in 10.2.0.5) . Idea: • either kill racgimon using kill -9 • restart the rac instance. So, I choose to kill:

[ RACG][1252133216] [29774][1252133216][ora.db.servicedb.db1.srv]: ORA-01003: no statement parsed
$ ps -aef | grep 29774
oracle 29774 1 0 2009 ? 01:56:57 /oracle/10gR2/bin/racgimon startd db

$ kill -9 29774
and then started service again.
$ srvctl start service -d db -i db1 -s servicedb

$ tail -f imon_db.log
2010-09-10 00:22:22.214: [ RACG][2540875008] [2334][2540875008][ora.db.servicedb.db1.srv]: racgimon started
Everything fine. I can start service.

Sunday, September 05, 2010

Compare & Synchronize Toad®for Data Analysts

Toad® for Data Analysts is a great tool from Quest Software. It's helpful to query and report on data; check features and benefits and download trial.
Toad for Data Analysts, we can:
- Gather data from any source: with a single tool that natively supports Oracle, SQL Server, DB2, Sybase, MySQL, Microsoft Access, and Microsoft Excel, and all other platforms, including Teradata and Netezza, through ODBC
- Investigate data: with built-in database browsing, ER diagram, and compare and sync functionality
- Deliver data faster: through one-click data export to Excel, easy report creation and automated distribution
- Improve productivity: by simplifying, automating and scheduling repetitive tasks
then test to compare and synchronize data on Oracle:
use Wizard to help.
then choose Source/Target
then choose objects to compare
after compare then synchronize by using Wizard.
we can sync data source -> target or target -> source.
then generate script -> open script file, run or no action.
we can compare and synchronize different databases.

Wednesday, September 01, 2010

Convert Ext3 to Btrfs

After I make kernel 2.6.35.4 on Oracle Enterprise Linux 5.4 support Btrfs.
# cd /usr/src
# tar jxvf linux-2.6.35.4.tar.bz2
# cd linux-2.6.35.4
# cp /boot/config-2.6.18-164.el5 .config
# make && make modules_install headers_install install
# mkinitrd /boot/initrd-2.6.35.4 2.6.35.4
# reboot
then installed btrfs-progs-0.19 program.
# cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 5.4 (Carthage)

# rpm -q enterprise-release
enterprise-release-5-0.0.20

# uname -a
Linux oel 2.6.35.4 #1 SMP Wed Sep 1 20:37:04 ICT 2010 x86_64 x86_64 x86_64 GNU/Linux
and then tested to convert ext3 to btrfs (read):
# mount | grep /dev/sda6
/dev/sda6 on /data type ext3 (rw)

# ls /data
linux-2.6.35.4.tar.bz2

# umount /data

# fsck.ext3 /dev/sda6
e2fsck 1.39 (29-May-2006)
/data: ...

# btrfs-convert /dev/sda6
creating btrfs metadata.
creating ext2fs image file.
cleaning up system chunk.
conversion complete.

# mount -t btrfs /dev/sda6 /data

# mount | grep /dev/sda6
/dev/sda6 on /data type btrfs (rw)

# ls /data
ext2_saved linux-2.6.35.4.tar.bz2
we will see ext3/4 snapshot (ext2_saved). we can mount loopback for image in snapshot:
# mount -t ext3 -o loop,ro /data/ext2_saved/image /mnt

# ls /mnt
linux-2.6.35.4.tar.bz2
check some command-line:
# btrfs-show
Label: /data uuid: 7721003c-adcb-4706-8238-68946a5e2547
Total devices 1 FS bytes used 8.73GB
devid 1 size 128.79GB used 128.79GB path /dev/sda6

Btrfs Btrfs v0.19
However, if we need to roll back the conversion(we should backup). we can:
# umount /mnt
# umount /data
# btrfs-convert -r /dev/sda6