Friday, January 4, 2013
Error while loading shared libraries: libdb.so.2 - After Migrating REHL4 to REHL5
We have migrated Oracle Agile application from RedHat Linux 4 to RedHat Linux 5 and while starting up the Agile application we have received following error.
$ opmnctl startall
opmnctl: starting opmn and all managed processes...
================================================================================
opmn id=agile:6201
1 of 2 processes started.
ias-instance id=plm922.etna.corp.intusurg.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------------------------------------
ias-component/process-type/process-set:
HTTP_Server/HTTP_Server/HTTP_Server/
Error
--> Process (index=1,uid=6575556334,pid=75645)
failed to start a managed process after the maximum retry limit
Log:
/oracle/product/10.1.3.1/OracleAS/opmn/logs//HTTP_Server~1.log
From HTTP Serve log, we have found that Apache service failed while coming up. We have found below error message
/oracle/product/10.1.3.1/OracleAS/Apache/Apache/bin/apachectl startssl: execing httpd
/oracle/product/10.1.3.1/OracleAS Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory
There is no shared library/usr/lib/ libdb.so.2 and found that the soft link is missing.
You may see this error with applications that are using Oracle Application services after cloning or migrating from REHL 4 to REHL5.
To resolve the issue follow the steps
1. Stop the Oracle Application Service
2. Login as root and create the soft link
# ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
3. Start the Oracle Application Service.
Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com
Tuesday, November 13, 2012
Convert Single Instance to RAC – Part2: Manually Convert to RAC
Hi Everyone,
My articles published in Oracle Experts website media "Allthingsoracle.com" by RedGate
Please view the article using below link.
Convert Single Instance to RAC – Part2: Manually Convert to RAC
I hope you will like the article and it will be helpful to you.
Please leave your valuable comments.
Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com
My articles published in Oracle Experts website media "Allthingsoracle.com" by RedGate
Please view the article using below link.
Convert Single Instance to RAC – Part2: Manually Convert to RAC
I hope you will like the article and it will be helpful to you.
Please leave your valuable comments.
Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com
Friday, November 2, 2012
RMAN Debug and Trace
If any RMAN operation fails, then you can use RMAN Debug to collect and diagnosis the failure. The RMAN Debug command generates more extensive output, use debugging for the following purposes.
RMAN Debug Command
$ rman target / catalog xxx/xxxx@rmancat debug trace = /tmp/rman.trc log=/tmp/rman.log
Once you are connected to RMAN, you can run the commands that you want to debug.
The log file will shows how much percentage (%) completed and time left, It will help to estimate the time.
The rman.log file will look like below.
orclsr@oracle> cat rman.log
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Oct 11 15:21:05 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-06005: connected to target database: ORCL (DBID=2284874908408)
RMAN>
The trace file will have all information running behind the screen.
The “rman.trc” will look like below
orclsr@oracle> cat rman.trc |more
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Oct 11 15:21:05 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ORACLE_HOME = /oracle/ORCL/112_64
DBGMISC: ENTERED krmksimronly [15:21:06.175]
DBGSQL: CHANNEL> alter session set events '19737 trace name context forever'
You can refer mentalink note 375386.1 for more information.
Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com
- To see the actual programs generated by RMAN
- To determine the failure of RMAN Command
The RMAN Debug command will be available in from Oracle 8i onwards.
RMAN Debug Command
$ rman target / debug trace rman.trc log rman.log
Or $ rman target / catalog xxx/xxxx@rmancat debug trace = /tmp/rman.trc log=/tmp/rman.log
Once you are connected to RMAN, you can run the commands that you want to debug.
The log file will shows how much percentage (%) completed and time left, It will help to estimate the time.
The rman.log file will look like below.
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Oct 11 15:21:05 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-06005: connected to target database: ORCL (DBID=2284874908408)
RMAN>
RMAN-03090: Starting backup at 11-OCT-12
RMAN-06009: using target database control file instead of recovery catalog
RMAN-08030: allocated channel: ORA_DISK_1
RMAN-08500: channel ORA_DISK_1: SID=618 device type=DISK
RMAN-08008: channel ORA_DISK_1: starting full datafile backup set
RMAN-08010: channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-08522: input datafile file number=00071 name=/oracle/ORCL/sapdata8/prd_57/prd.data57
RMAN-08522: input datafile file number=00073 name=/oracle/ORCL/sapdata9/prd_59/prd.data59
RMAN-08522: input datafile file number=00078 name=/oracle/ORCL/sapdata9/prd701_8/prd701.data8
RMAN-08522: input datafile file number=00069 name=/oracle/ORCL/sapdata4/prd_55/prd.data55
RMAN-08522: input datafile file number=00006 name=/oracle/ORCL/sapdata1/prd_3/prd.data3
RMAN-08522: input datafile file number=00001 name=/oracle/ORCL/sapdata1/system_1/system.data1
RMAN-08522: input datafile file number=00003 name=/oracle/ORCL/sapdata1/sysaux_1/sysaux.data1
RMAN-08522: input datafile file number=00030 name=/oracle/ORCL/sapdata1/prdusr_1/prdusr.data1
RMAN-08522: input datafile file number=00011 name=/oracle/ORCL/sapdata2/prd_8/prd.data8
RMAN-06731: command backup:1.0% complete, time left 03:27:06
RMAN-06731: command backup:1.9% complete, time left 03:32:09
The “rman.trc” will look like below
orclsr@oracle> cat rman.trc |more
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Oct 11 15:21:05 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ORACLE_HOME = /oracle/ORCL/112_64
System name: Linux
Node name: sapORCL
Release: 2.6.18-194.17.1.el5
Version: #1 SMP Mon Sep 20 07:12:06 EDT 2010
Machine: x86_64
Starting with debugging set to level=9, types=ALLDBGMISC: ENTERED krmksimronly [15:21:06.175]
DBGSQL: CHANNEL> alter session set events '19737 trace name context forever'
DBGSQL: sqlcode = 0
DBGSQL: CHANNEL> select decode(archiver, 'FAILED', 1, 0) into :archstuck from v$instance
DBGSQL: sqlcode = 0
DBGSQL: D :archstuck = 0
You can refer mentalink note 375386.1 for more information.
Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com
Tuesday, October 16, 2012
Time for Change: Migrate your Non-RAC Database to RAC
Hi Everyone,
One of my articles published in "IOUG Select Journal" and distributed at Oracle Open World 2012.
Time for Change: Migrate your Non-RAC Database to RAC - Page 25
By Satishbabu Gunukula
Please view the IOUG 2012 Q3 article using below link.
http://www.ioug.org/p/do/sd/sid=2371&fid=2133&req=direct
I hope you will like the article and it will be helpful to you.
Please leave your valuable comments.
Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com
One of my articles published in "IOUG Select Journal" and distributed at Oracle Open World 2012.
Time for Change: Migrate your Non-RAC Database to RAC - Page 25
By Satishbabu Gunukula
Please view the IOUG 2012 Q3 article using below link.
http://www.ioug.org/p/do/sd/sid=2371&fid=2133&req=direct
I hope you will like the article and it will be helpful to you.
Please leave your valuable comments.
Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com
Send mails using UTL_SMTP in Oracle
The UTL_SMTP Oracle package provides capability to send emails from PL/SQL program using Simple Mail Transfer Protocol. UTL_MAIL is easy to use as it eliminates steps of formatting the message body and explicit coding of details required by SMTP protocol.
Use below simple example to send mails using UTL_MAIL
begin
utl_mail.send(
sender => 'fromuser@oracleracexpert.com',
recipients => 'touser@oracleracexpert.com',
message => 'Test mail for UTL_MAIL'
);
end;
If you can want to use UTL_MAIL refer “Send EMAILs using UTL_MAIL”
UTL_SMTP it is more fine-grained API that enables the attachments of larger size and it is very powerful utility.
Use below simple example to send mails using UTL_SMTP
DECLARE
mailhost VARCHAR2(64) := ‘localsmtp.oracleracexpert.com;
sender VARCHAR2(64) := 'fromuser@oracleracexpert.com';
recipient VARCHAR2(64) := 'touser@ oracleracexpert.com';
smtp_mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection (mailhost, 25);
utl_smtp.helo (smtp_mail_conn, mailhost);
utl_smtp.mail (smtp_mail_conn, sender);
utl_smtp.rcpt (smtp_mail_conn, recipient);
utl_smtp.data (smtp_mail_conn, 'This is a test mail using UTL_SMTP '
chr(10));
utl_smtp.quit (smtp_mail_conn);
END;
/
You can write multiple line messages using the UTL_SMTP.WRITE_DTA command, use following example
CREATE OR REPLACE PROCEDURE send_mail_smtp(recipient IN VARCHAR2,
sender IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2,
mailhost IN VARCHAR2,
smpt_port IN NUMBER DEFAULT 25)
AS
smtp_mail_conn UTL_SMTP.connection;
BEGIN
Smtp_mail_conn := UTL_SMTP.open_connection(mailhost, smtp_port);
UTL_SMTP.helo(smtp_mail_conn, mailhost);
UTL_SMTP.mail(smtp_mail_conn, sender);
UTL_SMTP.rcpt(smtp_mail_conn, recipient);
UTL_SMTP.open_data(smtp_mail_conn);
UTL_SMTP.write_data(smtp_mail_conn, 'To: '||recipient||UTL_TCP.crlf);
UTL_SMTP.write_data(smtp_mail_conn, 'From: '||sender||UTL_TCP.crlf);
UTL_SMTP.write_data(smtp_mail_conn, 'Subject: '||subject||UTL_TCP.crlf);
UTL_SMTP.write_data(smtp_mail_conn, message||UTL_TCP.crlf||UTL_TCP.crlf);
UTL_SMTP.close_data(smtp_mail_conn);
UTL_SMTP.quit(smtp_mail_conn);
END;
/
Call the procedure by providing the below details
BEGIN
send_mail_smtp(recipient => 'touser@mycompany.com',
sender => 'fromuser@oracleracexpert.com',
subject => 'Test mail',
message => 'This is a test mail using UTL_SMTP.',
mailhost => localsmtp.oracleracexpert.com');
END;
/
To send emails to multiple recipients use UTL_SMTP.rcpt procedure for each separate email
For more information you can also refer Oracle Documentation http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/u_smtp.htm#ARPLS074
Common errors when using UTL_SMTP:-
1. The UTL_SMTP package requires the ORACLE xmldb component, please install the same to fix below error
ERROR at line 1:
ORA-24248: XML DB extensible security not installed
ORA-06512: at "SYS.UTL_TCP"
2. You may receive below error if the “mailhost” was not set correctly
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 20
3. You will receive below error if ACL is not assigned to target host and necessary privileges are not granted
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_TCP", line 17
ORA-06512: at "SYS.UTL_TCP", line 246
ORA-06512: at "SYS.UTL_SMTP", line 127
ORA-06512: at "SYS.UTL_SMTP", line 150
ORA-06512: at line 7
Use below simple example to send mails using UTL_MAIL
begin
utl_mail.send(
sender => 'fromuser@oracleracexpert.com',
recipients => 'touser@oracleracexpert.com',
message => 'Test mail for UTL_MAIL'
);
end;
If you can want to use UTL_MAIL refer “Send EMAILs using UTL_MAIL”
UTL_SMTP it is more fine-grained API that enables the attachments of larger size and it is very powerful utility.
Use below simple example to send mails using UTL_SMTP
DECLARE
mailhost VARCHAR2(64) := ‘localsmtp.oracleracexpert.com;
sender VARCHAR2(64) := 'fromuser@oracleracexpert.com';
recipient VARCHAR2(64) := 'touser@ oracleracexpert.com';
smtp_mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection (mailhost, 25);
utl_smtp.helo (smtp_mail_conn, mailhost);
utl_smtp.mail (smtp_mail_conn, sender);
utl_smtp.rcpt (smtp_mail_conn, recipient);
utl_smtp.data (smtp_mail_conn, 'This is a test mail using UTL_SMTP '
chr(10));
utl_smtp.quit (smtp_mail_conn);
END;
/
You can write multiple line messages using the UTL_SMTP.WRITE_DTA command, use following example
CREATE OR REPLACE PROCEDURE send_mail_smtp(recipient IN VARCHAR2,
sender IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2,
mailhost IN VARCHAR2,
smpt_port IN NUMBER DEFAULT 25)
AS
smtp_mail_conn UTL_SMTP.connection;
BEGIN
Smtp_mail_conn := UTL_SMTP.open_connection(mailhost, smtp_port);
UTL_SMTP.helo(smtp_mail_conn, mailhost);
UTL_SMTP.mail(smtp_mail_conn, sender);
UTL_SMTP.rcpt(smtp_mail_conn, recipient);
UTL_SMTP.open_data(smtp_mail_conn);
UTL_SMTP.write_data(smtp_mail_conn, 'To: '||recipient||UTL_TCP.crlf);
UTL_SMTP.write_data(smtp_mail_conn, 'From: '||sender||UTL_TCP.crlf);
UTL_SMTP.write_data(smtp_mail_conn, 'Subject: '||subject||UTL_TCP.crlf);
UTL_SMTP.write_data(smtp_mail_conn, message||UTL_TCP.crlf||UTL_TCP.crlf);
UTL_SMTP.close_data(smtp_mail_conn);
UTL_SMTP.quit(smtp_mail_conn);
END;
/
Call the procedure by providing the below details
BEGIN
send_mail_smtp(recipient => 'touser@mycompany.com',
sender => 'fromuser@oracleracexpert.com',
subject => 'Test mail',
message => 'This is a test mail using UTL_SMTP.',
mailhost => localsmtp.oracleracexpert.com');
END;
/
To send emails to multiple recipients use UTL_SMTP.rcpt procedure for each separate email
For more information you can also refer Oracle Documentation http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/u_smtp.htm#ARPLS074
Common errors when using UTL_SMTP:-
1. The UTL_SMTP package requires the ORACLE xmldb component, please install the same to fix below error
ERROR at line 1:
ORA-24248: XML DB extensible security not installed
ORA-06512: at "SYS.UTL_TCP"
2. You may receive below error if the “mailhost” was not set correctly
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 20
3. You will receive below error if ACL is not assigned to target host and necessary privileges are not granted
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_TCP", line 17
ORA-06512: at "SYS.UTL_TCP", line 246
ORA-06512: at "SYS.UTL_SMTP", line 127
ORA-06512: at "SYS.UTL_SMTP", line 150
ORA-06512: at line 7
Subscribe to:
Posts (Atom)