Sunday, May 6, 2018

NLS boot file not found or invalid opmnctl ping – EBS 12.2 ADCFGCLONE FAIL

Error: adcfgclone.pl failed while performing clone of EBS 12.2 instance. This occurred while ohsT2PApply is in progress.

INST_TOP/admin/log/clone/run/ohsT2PApply/CLONE2016-02-02_13-10-02_599255196.error:
2015-12-02T3:10:04-06:00] [opmn] [ERROR:1] [] [internal]...
2015-12-02T13:10:04-06:00] [opmn] [ERROR:1] [] [internal] lxlinit - NLS boot file not found or invalid
opmnctl ping: error parsing /u01/tech_st/fs1/FMW_Home/webtier/instances/EBS_web_EBDEV_OHS1/config/OPMN/opmn/opmn.xml
[2015-12-02T3:10:04-06:00] [opmn] [ERROR:1] [105] [internal] XML parser init: character set initialization failed.
SEVERE : Dec 2, 2016 03:10:04 - ERROR - CLONE-20218   Cloning is not successful.
SEVERE : Dec 2, 2016 03:10:04 - CAUSE - CLONE-20218   An internal operation failed.
SEVERE : Dec 2, 2016 03:10:04 - ACTION - CLONE-20218   Provide the clone log and error file for investigation.

Cause: adcfgclone started in the same session where previous environment is set.

Solution:
The issue is because of existing environment variables. Before executing the adcfgclone verify any of the environment is set. If already set please try to unset and run adcfgclone.

Else, Unset the following environment:

ORA_NLS10
TNS_ADMIN
ORACLE_HOME


Start a fresh session always for refresh

Monday, February 8, 2016

How to check Oracle Application Home Versions in R12

 10.1.2 Oracle Home Version:

/u01/app/applmgr/apps/tech_st/10.1.2

-bash-4.1$ frmcmp_batch
Forms 10.1 (Form Compiler) Version 10.1.2.3.0 (Production)

Forms 10.1 (Form Compiler): Release  - Production

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

PL/SQL Version 10.1.0.5.0 (Production)
Oracle Procedure Builder V10.1.2.3.0 - Production
Oracle Virtual Graphics System Version 10.1.2.0.0 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle Tools Integration Version 10.1.2.0.2 (Production)
Oracle Tools Common Area Version 10.1.2.0.2
Oracle CORE     10.1.0.5.0      Production

10.1.3 Oracle Home Version:

-bash-4.1$ pwd
/u01/app/applmgr/apps/tech_st/10.1.3/Apache/Apache/bin
-bash-4.1$ cd /u01/app/applmgr/apps/tech_st/10.1.2
-bash-4.1$ httpd -version
Server version: Oracle-Application-Server-10g/10.1.3.5.0 Oracle-HTTP-Server
Server built:   Jul 21 2009 11:12:22

CPU, PSU, SPU - Oracle Critical Patch Update Terminology Update


It all started in January 2005 with Critical Patch Updates (CPU).  Then Patch Set Updates (PSU) were added as cumulative patches that included priority fixes as well as security fixes.  As of the October 2012 Critical Patch Update, Oracle has changed the terminology to better differentiate between patch types.  This terminology will be used for the Oracle Database, Enterprise Manager, Fusion Middleware, and WebLogic.
Critical Patch Update (CPU) now refers to the overall release of security fixes each quarter rather than the cumulative database security patch for the quarter.  Think of the CPU as the overarching quarterly release and not as a single patch.
Patch Set Updates (PSU) are the same cumulative patches that include both the security fixes and priority fixes.  The key with PSUs is they are minor version upgrades (e.g., 11.2.0.1.1 to 11.2.0.1.2).  Once a PSU is applied, only PSUs can be applied in future quarters until the database is upgraded to a new base version.
Security Patch Update (SPU) terminology is introduced in the October 2012 Critical Patch Update as the term for the quarterly security patch.  SPU patches are the same as previous CPU patches, just a new name.  For the database, SPUs can not be applied once PSUs have been applied until the database is upgraded to a new base version.
Bundle Patches are the quarterly patches for Windows and Exadata which include both the quarterly security patches as well as recommended fixes.
References: New Patch Nomenclature for Oracle Products [ID 1430923.1]

Friday, January 1, 2016

Add/Increase swap space in Linux

[root@myhost ~]# dd if=/dev/zero of=/swapfile1 bs=1024 count=10485760
10485760+0 records in
10485760+0 records out
10737418240 bytes (11 GB) copied, 110.084 s, 97.5 MB/s
[root@myhost ~]# chown root:root /swapfile1
[root@myhost ~]# chmod 0600 /swapfile1
[root@myhost ~]# mkswap /swapfile1
Setting up swapspace version 1, size = 10485756 KiB
no label, UUID=a7a5c45b-d56a-424f-8c50-41149fdd0935
[root@myhost ~]# swapon /swapfile1
[root@myhost ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:          15456        7999          87         161        7369        7132
Swap:         17919           0       17919
[root@myhost ~]# vi /etc/fstab
add the following line



/swapfile1 none swap sw 0 0

[root@myhost ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:          15456        8573          89         161        6793        6553
Swap:         17919           0       17919

Wednesday, December 30, 2015

JRE Version in R12

To find the JRE/Java version used by Client Machine,

-bash-4.1$ cat $FORMS_WEB_CONFIG_FILE|grep sun_plugin_version
sun_plugin_version=1.6.0_45

(or)

-bash-4.1$ grep plugin $CONTEXT_FILE

                        1.6.0_45</sun_plugin_ver>
                        jdk
-bash-4.1$
 


(or)

cd $COMMON_TOP/webapps/oacore/util/jinitiator

-bash-4.1$ ls -ltr
-rwxrwxr-x 1 applmgr applmgr 17090992 Aug 10  2013 j2se16045.exe

-bash-4.1$


j2se16045.exe means client machine uses jre1.6.0_45.

The name  j2se16045.exe as when we do jre upgrade, will move as follows

 mv jre-6u45-windows-i586.exe $COMMON_TOP/webapps/oacore/util/jinitiator/j2se16045.exe

Sunday, November 29, 2015

Install Oracle EBS rpms

  1. Download and copy the appropriate yum configuration file in place, by running the following commands as root:

    Oracle Linux 7

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ol7.repo

    Oracle Linux 6

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ol6.repo

    Oracle Linux 5

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-el5.repo

    Oracle Linux 4, Update 6 or Newer

    # cd /etc/yum.repos.d
    # mv Oracle-Base.repo Oracle-Base.repo.disabled
    # wget http://public-yum.oracle.com/public-yum-el4.repo

    Oracle OpenStack for Oracle Linux 2.0

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ol7.repo
    # yum install yum-plugin-priorities
    Note: Make sure to enable ol7_optional_latest repository before installing yum-plugin-priorities on your system

    Oracle OpenStack for Oracle Linux 1.0

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-openstack-ol6.repo

    Oracle VM 2

    # cd /etc/yum.repos.d
    # wget http://public-yum.oracle.com/public-yum-ovm2.repo
  2. By default, the latest repository is enabled. If you want to change the default, you can enable an alternative repository by editing the yum configuration file.
    • Open the yum configuration file in a text editor
    • Locate the section in the file for the repository want to enable, e.g. [el4_u6_base]
    • Change enabled=0 to enabled=1

[root@r122prod ~]# cd /etc/yum.repos.d/
[root@r122prod yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo
--2015-11-29 23:49:20--  http://public-yum.oracle.com/public-yum-el5.repo
Resolving public-yum.oracle.com... 123.176.32.146, 123.176.32.178
Connecting to public-yum.oracle.com|123.176.32.146|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5274 (5.2K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[===========================================================================================================================>] 5,274       --.-K/s   in 0s


2015-11-29 23:49:20 (195 MB/s) - `public-yum-el5.repo' saved [5274/5274]

Edit the public-yum-ol6.repo file to enable the ol5_addons channel.
Find the ol6_addons section and change enabled=0 to enabled=1.
[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol5
gpgcheck=1
enabled=1
Save the file.


[root@r122prod yum.repos.d]# yum install oracle-ebs-server-R12-preinstall -y
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
el5_addons                                                                                                                                    | 1.2 kB     00:00
el5_addons/primary                                                                                                                            | 108 kB     00:01
el5_addons                                                                                                                                                   418/418
el5_latest                                                                                                                                    | 1.4 kB     00:00
el5_oracle_addons                                                                                                                             |  951 B     00:00
el5_oracle_addons/primary                                                                                                                     | 1.7 kB     00:00
el5_oracle_addons                                                                                                                                                7/7
ol5_UEK_latest                                                                                                                                | 1.2 kB     00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-ebs-server-R12-preinstall.x86_64 0:1.0.0-6.el5 set to be updated
el5_addons/filelists                                                                                                                          | 686 kB     00:05
el5_latest/filelists                                                                                                                          |  41 MB     06:16

Monday, June 29, 2015

fnd_concurrent_queues table control_code column meaning

Concurrent Manger queues Status code meaning
SQL> select lookup_code,meaning from apps.fnd_lookups where lookup_type = 'CP_CONTROL_CODE' order by lookup_code;

LOOKUP_CODE                    MEANING
------------------------------ -------------------------------------------------
A                              Activating
B                              Activated
D                              Deactivating
E                              Deactivated
N                              Target node/queue unavailable
O                              Suspending concurrent manager
P                              Suspended
Q                              Resuming concurrent manager
R                              Restarting
T                              Terminating
U                              Updating environment information

LOOKUP_CODE                    MEANING
------------------------------ -------------------------------------------------
V                              Verifying
X                              Terminated

13 rows selected.

Bounce Concurrent Manager from backend or using SQL

I have a requirement to bounce Receiving Transaction Manager everyday. So, I was trying to automate this activity. I found below way to bounce it from backend using a script. I had put all the below statements in a script and scheduled in cron.
Find out the short name of the concurrent manager to be bounced, in my case it is Receiving Transaction Manager
SQL> select CONCURRENT_QUEUE_NAME from  apps.fnd_concurrent_queues_tl where USER_CONCURRENT_QUEUE_NAME='Receiving Transaction Manager';
CONCURRENT_QUEUE_NAME
---------------------
RCVOLTM
Check the status of the concurrent manager before bouncing it.
SQL>select control_code,running_processes,MAX_PROCESSES from fnd_concurrent_queues where concurrent_queue_name='RCVOLTM';
Deactivating the concurrent manager:When you deactivate a manager all requests (concurrent programs) currently running are allowed to complete before the manager(s) shut down.
SQL>update fnd_concurrent_queues set control_code='D' where concurrent_queue_name='RCVOLTM';
Set max and target processes to 0
SQL>update fnd_concurrent_queues set running_processes=0,MAX_PROCESSES=0 where concurrent_queue_name='RCVOLTM';
commit;
see the status of the Manager
SQL>select control_code,running_processes,MAX_PROCESSES from fnd_concurrent_queues where concurrent_queue_name='RCVOLTM';
Activating the concurrent manager:
SQL>update fnd_concurrent_queues set control_code='R' where concurrent_queue_name='RCVOLTM';
commit;
See the status of the Manager
SQL>select control_code,running_processes,MAX_PROCESSES from fnd_concurrent_queues where concurrent_queue_name='RCVOLTM';

Click here for status code meaning 


Thursday, June 25, 2015

View Contents of .zip file without Extracting

View Contents of .zip file without Extracting:
To see the contents of zips is to use the familiar ‘unzip’ command with a simple -l flag. The reported information is not as detailed as ‘zipinfo’ but it still includes meaningful details including individual file size, file modification date and time, total file count, and file names.
$ unzip -l archive_name.zip
Sample output of the command is shown below:
[root@R12PRODDB R122_Stage]# unzip -l V29764-01.zip
Archive:  V29764-01.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
    20863  12-20-2011 03:14   readme.htm
        0  12-19-2011 13:39   Disk1/
        0  12-19-2011 13:41   Disk1/install/
        0  12-19-2011 13:39   Disk1/install/linux64/
      686  07-19-2011 05:26   Disk1/install/linux64/oraparam.ini
        0  12-19-2011 13:39   Disk1/install/linux64/resource/
    14341  12-01-2010 16:37   Disk1/install/linux64/resource/cons_pt_BR.nls
    14601  12-01-2010 16:36   Disk1/install/linux64/resource/cons_es.nls
    15518  12-01-2010 16:36   Disk1/install/linux64/resource/cons_ko.nls
    15228  12-01-2010 16:36   Disk1/install/linux64/resource/cons_de.nls
    16440  12-01-2010 16:36   Disk1/install/linux64/resource/cons_ja.nls
    15557  12-01-2010 16:36   Disk1/install/linux64/resource/cons_fr.nls
    14691  12-01-2010 16:36   Disk1/install/linux64/resource/cons_it.nls
    13366  12-01-2010 16:36   Disk1/install/linux64/resource/cons.nls
    12110  12-01-2010 16:37   Disk1/install/linux64/resource/cons_zh_CN.nls
    12175  12-01-2010 16:37   Disk1/install/linux64/resource/cons_zh_TW.nls
   145976  12-01-2010 16:37   Disk1/install/linux64/unzip
   161745  12-01-2010 16:37   Disk1/install/linux64/runInstaller
        0  12-19-2011 13:39   Disk1/plugins/
        0  12-19-2011 13:39   Disk1/plugins/sjsws/

Wednesday, June 24, 2015

MD5 Checksums for R12.2 Rapid Install Media

MD5 Checksums for R12.2 Rapid Install Media
After staging the Rapid Install software with the buildStage.sh script the md5 checksums for the staged directory structure can be used to validate the software integrity. Do this by running the md5sum program against the stage area using the Oracle-created checksum file.

MD5 Checksums for R12.2 Rapid Install Media (Doc ID 1505510.1).

Which checksums need to run.
In my case, I need to run  Based on startCD 48.

Download the md5sum txt to Stage area and run it.
[root@R12PRODDB ~]# cd R122_Stage/
[root@R12PRODDB R122_Stage]# vi R12.2_Linux_64.txt
[root@R12PRODDB R122_Stage]#  md5sum --check R12.2_Linux_64.txt  > md5sum_result.txt
md5sum: WARNING: 1 of 12868 computed checksums did NOT match
Search for any errors in md5sum
[root@R12PRODDB R122_Stage]# grep -v OK md5sum_result.txt
EBSInstallMedia/AppDB/VISION/Disk7/data/stage/06nrdhe4_1_1: FAILED
[root@R12PRODDB R122_Stage]#
Or

[root@R12PRODDB R122_Stage]# grep FAILED md5sum_result.txt
EBSInstallMedia/AppDB/VISION/Disk7/data/stage/06nrdhe4_1_1: FAILED
[root@R12PRODDB R122_Stage]#

R12.2 Installation Fails with the error "Database pre-install checks failed"

Issue: 

R12.2 Installation Fails with the error "Database pre-install checks failed"


Cause: 

 I have created R12 Stage directory under root $HOME where as I am performing a single node installation with oracle user. Oracle user could not write to /root directory and the error message is populating continuously. The permissions issue was not reported anywhere in the logs.

Solution:

Moved the Stage directory from /root to /u01 and given ownership to oracle user then the installation moved further.

[root@R12PRODDB ~]# pwd

/root
[root@R12PRODDB ~]# cd R122_Stage
[root@R12PRODDB R122_Stage]# pwd
/root/R122_Stage
[root@R12PRODDB /]# mv /root/R122_Stage/ /u01
[root@R12PRODDB /]# cd /u01
[root@R12PRODDB u01]# ls
app  R122_Stage
[root@R12PRODDB u01]# ls -ltr
total 8
drwxr-xr-x. 3 root   root     4096 Jun  6 10:01 app
drwxrwxrwx. 6 oracle oinstall 4096 Jun 25 17:01 R122_Stage


If this error encounters, check for the permissions on stage area. Oracle & applmgr user should be able to read/write to the stage directory. cd to stage area with oracle & application users. 

Thursday, July 17, 2014

NTP daemon slewing option check failed on some nodes

When I run the runcluvfy.sh got the below error. To fix the issue followed the below steps.

Checking NTP daemon command line for slewing option "-x"
Check: NTP daemon command line
  Node Name                             Slewing Option Set?
  ------------------------------------  ------------------------
  oel5-11g-rac2                         no
  oel5-11g-rac1                         no
Result:
NTP daemon slewing option check failed on some nodes
PRVF-5436 : The NTP daemon running on one or more nodes lacks the slewing option "-x"
Result: Clock synchronization check using Network Time Protocol(NTP) failed.
 
To perform the below steps need root access. Stop ntpd process
[root@oel5-11g-rac1 ~]# service ntpd stop
Shutting down ntpd:                                        [  OK  ]
[root@oel5-11g-rac1 ~]#
Edit the file /etc/sysconfig/ntpd the line OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid" Add -x before -u in the above line.
[root@oel5-11g-rac1 ~]# cat /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"

# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no

# Additional options for ntpdate
NTPDATE_OPTIONS=""


[root@oel5-11g-rac1 ~]# cat /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"

# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no

# Additional options for ntpdate
NTPDATE_OPTIONS=""
[root@oel5-11g-rac1 ~]#
Start the ntpd service
[root@oel5-11g-rac1 ~]#  service ntpd start
ntpd: Synchronizing with time server:                      [  OK  ]
Starting ntpd:                                             [  OK  ]
[root@oel5-11g-rac1 ~]#
Now run the runcluvfy.sh to check the re-test the issue.
Result: Clock synchronization check using Network Time Protocol(NTP) passed

Wednesday, July 16, 2014

Recommended Browsers for Oracle E-Business Suite Release 12 (Doc ID 389422.1)

Certification Matrix for Internet Explorer (64-bit) Browsers

The table below outlines the certified combinations of 64-bit Internet Explorer Browser, Windows Desktop Client Operating System and JRE (64-bit) streams with minimum versions, where applicable. Please also review this document for further specific certification information and requirements:

Browser
Version
Windows 8 (Desktop Mode) 
(64-bit)
Windows 7
(64-bit)
IE 10 (64-bit)JRE 1.6.0_37 (64-bit) and higher
JRE 1.7.0_10 (64-bit) and higher
JRE 1.6.0_32 (64-bit) and higher
JRE 1.7.0_10 (64-bit) and higher
IE 9 (64-bit)Not CertifiedJRE 1.6.0_32 (64-bit) and higher
JRE 1.7.0_10 (64-bit) and higher
IE 8 (64-bit)Not CertifiedJRE 1.6.0_32 (64-bit) and higher
JRE 1.7.0_10 (64-bit) and higher

Certification Matrix for Internet Explorer (32-bit) Browsers

The table below outlines the certified combinations of 32-bit Internet Explorer Browser, Windows Desktop Client Operating System and JRE (32-bit) streams with minimum versions, where applicable. Please also review this document for further specific certification information and requirements:

Browser
Version
Windows 8 (Desktop Mode) 
(32-bit & 64-bit)
Windows 7 
(32-bit & 64-bit)
Windows Vista
(32-bit)
Windows XP
(32-bit)
IE 10JRE 1.6.0_37 and higher
JRE 1.7.0_10 and higher
JRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
Not CertifiedNot Certified
IE 9Not CertifiedJRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
JRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
Not Certified
IE 8Not CertifiedJRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
JRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
JRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
IE 7Not CertifiedNot CertifiedJRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
JRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher
IE 6Not CertifiedNot CertifiedNot CertifiedJRE 1.6.0_03 and higher
JRE 1.7.0_10 and higher

Monday, July 7, 2014

VirtualBox-4.2 installation on OEL 5

1. Download Virtaulbox software by running the below command.

wget http://download.virtualbox.org/virtualbox/4.2.16/VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm
[root@appsR12 ~]# wget http://download.virtualbox.org/virtualbox/4.2.16/VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm
--2014-07-07 09:22:24--  http://download.virtualbox.org/virtualbox/4.2.16/VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm
Resolving download.virtualbox.org... 137.254.120.26
Connecting to download.virtualbox.org|137.254.120.26|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://dlc.sun.com.edgesuite.net/virtualbox/4.2.16/VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm [following]
--2014-07-07 09:22:25--  http://dlc.sun.com.edgesuite.net/virtualbox/4.2.16/VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm
Resolving dlc.sun.com.edgesuite.net... 122.165.249.8, 122.165.249.40
Connecting to dlc.sun.com.edgesuite.net|122.165.249.8|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 87237668 (83M) [application/x-redhat-package-manager]
Saving to: `VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm.1'

 100% [                                                                                                                 ] 756,155      151K/s  eta 9m 18s  
[root@appsR12 ~]#
2. Now install it.
[root@appsR12 ~]# rpm -iUvH VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm
warning: VirtualBox-4.2-4.2.16_86992_el5-1.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 98ab5139
Preparing packages for installation...
VirtualBox-4.2-4.2.16_86992_el5-1

Creating group 'vboxusers'. VM users must be member of that group!

No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Stopping VirtualBox kernel modules [  OK  ]
Recompiling VirtualBox kernel modules [  OK  ]
Starting VirtualBox kernel modules [  OK  ]

Saturday, July 5, 2014

ERROR: ORA-12162: TNS:net service name is incorrectly specified


I just installed oracle software and trying to connect sqlplus

When I say sqlplus, it was giving an error.

-bash-3.00$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 6 00:54:32 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
I forgot to export ORACLE_SID
I exported the ORACLE_SID and tried again, it was successful


-bash-3.00$ export ORACLE_SID=prod


-bash-3.00$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 6 01:04:52 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> exit
Disconnected
It was just a thought to share, to those who forgets like me !

Error 6 initializing SQL*Plus

When I tried to connect sqlplus was giving an error.


-bash-3.00$ sqlplus '/as sysdba'
Error 6 initializing SQL*Plus
Message file sp1.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory


Log out from the user and login again. Don't source any environment variables yet.
Check the location of your correct oracle home by going into the directory. Export the oracle home
-bash-3.00$ export ORACLE_HOME=/u01/oracle/product/10.2.0/db_1
-bash-3.00$ export PATH=$ORACLE_HOME/bin:$PATH:.

Now try log in again

-bash-3.00$ sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 6 01:04:52 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> exit

Thursday, July 3, 2014

Concurrent Manager Status from Sql

How to find all the concurrent managers status from sql prompt?

To find this I need to launch oracle application forms which almost takes 5minutes for me. So I was thinking a way which gives the info quicker and also without launching forms. 

Below is the query somehow I found somewhere and I want to share this with you all.

select q.concurrent_queue_name || ' - ' || target_node qname,
       q.running_processes actual,
       q.max_processes target,
       sum(decode(r.phase_code,'R',1,0)) - sum(decode(r.status_code,'W',1,0)) running,
       sum(decode(r.phase_code,'P',1,0)) pending,
       nvl(sum(decode(r.status_code,'W',1,'H',1,'S',1,'A',1,'Z',1,0)),0) paused,
       nvl(sum(decode(r.status_code,'F',1,'Q',1,'B',1,'T',0)),0) influx,
       avg((nvl(r.actual_start_date,r.requested_start_date) - r.requested_start_date)*1440) avgqtime
  from applsys.fnd_concurrent_requests r,
       applsys.fnd_concurrent_processes p,
       applsys.fnd_concurrent_queues q
 where r.controlling_manager (+) = p.concurrent_process_id
   and p.queue_application_id = q.application_id
   and p.concurrent_queue_id = q.concurrent_queue_id
   and q.max_processes > 0
   group by q.concurrent_queue_name || ' - ' || target_node, q.running_processes, q.max_processes;
   
Activated Concurrent Queue           Actual  Target  Running  Pending   Paused   InFlux  AvgQtime
----------------------------------- ------- ------- -------- -------- -------- -------- ---------
INVMGR - DEVCM                           3       3        0        0        0        0       .56
Alerts - DEVCM                           4       4        0        0        0        0    248.44
PODAMGR - DEVCM                          6       6        0        0        0        0
INVTMRPM - DEVCM                         5       5        0        0        0        0
RCVOLTM - DEVCM                          3       3        0        0        0        0
IEU_WL_CS - DEVCM                        1       1        0        0        0        0
FNDICM - DEVCM                           1       1        0        0        0        0
WFMLRSVC - DEVCM                         1       1        0        0        0        0
Debug_Service - DEVCM                    1       1        0        0        0        0
MRPMGR - DEVCM                           1       1        0        1        0        1  -1307.38
WFALSNRSVC - DEVCM                       1       1        0        0        0        0
OAMCOLMGR - DEVCM                        1       1        0        0        0        0
IEXCONMGR - DEVCM                        1       1        0        0        0        0
XDP_Q_EVENT_SVC - DEVCM                  1       1        0        0        0        0
FNDCRM - DEVCM                           1       1        0        0        0        0
XDP_MANAGER - DEVCM                      2       2        0        0        0        0    279.66
FNDCPOPP - DEVCM                         5       5        0        0        0        0
XDP_Q_IN_MSG_SVC - DEVCM                 1       1        0        0        0        0
STANDARD - DEVCM                        30      30        0        1        0        0     61.78
CEMLIQM - DEVCM                         10      10        0        0        0        0       .17
IEU_SH_CS - DEVCM                        1       1        0        0        0        0
WFWSSVC - DEVCM                          1       1        0        0        0        0
PASMGR - DEVCM                           1       1        0        0        0        0    -12.54
C_AQCT_SVC - DEVCM                       1       1        0        0        0        0
FNDSM_DEVCM - DEVCM                     1       1        0        0        0        0
                                    ------- ------- -------- --------
sum                                      84      84        0        2   


Monday, June 30, 2014

Estimate RMAN Backup Size

I got a task to estimate RMAN backup size.

How much 3days RMAN backup occupy?

How long it will take to complete?

Is the backup size is reasonable?

Is there a way to reduce the backup size?


I have used the below query to find the size and time taken for backup.
set lines 220
set pages 1000
col cf for 9,999
col df for 9,999
col elapsed_seconds heading "ELAPSED|SECONDS"
col i0 for 9,999
col i1 for 9,999
col l for 9,999
col output_mbytes for 9,999,999 heading "OUTPUT|MBYTES"
col session_recid for 999999 heading "SESSION|RECID"
col session_stamp for 99999999999 heading "SESSION|STAMP"
col status for a10 trunc
col time_taken_display for a10 heading "TIME|TAKEN"
col output_instance for 9999 heading "OUT|INST"
select
  to_char(j.start_time, 'yyyy-mm-dd hh24:mi:ss') start_time,
  to_char(j.end_time, 'yyyy-mm-dd hh24:mi:ss') end_time,
  (j.output_bytes/1024/1024) output_mbytes, j.status, j.input_type,
  decode(to_char(j.start_time, 'd'), 1, 'Sunday', 2, 'Monday',
                                     3, 'Tuesday', 4, 'Wednesday',
                                     5, 'Thursday', 6, 'Friday',
                                     7, 'Saturday') dow,
  j.elapsed_seconds, j.time_taken_display,
  x.cf, x.df, x.i0, x.i1, x.l,
  ro.inst_id output_instance
from v$RMAN_BACKUP_JOB_DETAILS j
  left outer join (select
                     d.session_recid, d.session_stamp,
                     sum(case when d.controlfile_included = 'YES' then d.pieces else 0 end) CF,
                     sum(case when d.controlfile_included = 'NO'
                               and d.backup_type||d.incremental_level = 'D' then d.pieces else 0 end) DF,
                     sum(case when d.backup_type||d.incremental_level = 'D0' then d.pieces else 0 end) I0,
                     sum(case when d.backup_type||d.incremental_level = 'I1' then d.pieces else 0 end) I1,
                     sum(case when d.backup_type = 'L' then d.pieces else 0 end) L
                   from
                     v$BACKUP_SET_DETAILS d
                     join v$BACKUP_SET s on s.set_stamp = d.set_stamp and s.set_count = d.set_count
                   where s.input_file_scan_only = 'NO'
                   group by d.session_recid, d.session_stamp) x
    on x.session_recid = j.session_recid and x.session_stamp = j.session_stamp
  left outer join (select o.session_recid, o.session_stamp, min(inst_id) inst_id
                   from Gv$RMAN_OUTPUT o
                   group by o.session_recid, o.session_stamp)
    ro on ro.session_recid = j.session_recid and ro.session_stamp = j.session_stamp
where j.start_time > trunc(sysdate)-&NUMBER_OF_DAYS
order by j.start_time
/

Enter value for number_of_days: 1                                                                                                                                                           
                                                                                                                                                           
                                            OUTPUT                                       ELAPSED TIME                                            OUT       
START_TIME          END_TIME                MBYTES STATUS     INPUT_TYPE    DOW          SECONDS TAKEN          CF     DF     I0     I1      L  INST       
------------------- ------------------- ---------- ---------- ------------- --------- ---------- ---------- ------ ------ ------ ------ ------ -----       
2014-06-28 13:18:05 2014-06-28 13:18:08     13,512 FAILED     DB FULL       Saturday           3 00:00:03        1      0      0      0      0     1       
2014-06-28 13:26:11 2014-06-28 13:26:15     11,348 FAILED     DB FULL       Saturday           4 00:00:04        1      0      0      0      0     1       
2014-06-28 17:30:58 2014-06-28 19:07:44     21,370 COMPLETED  DB FULL       Saturday        5806 01:36:46        3      4      0      0      0     1       
2014-06-28 19:08:09 2014-06-28 19:08:16          0 FAILED     ARCHIVELOG    Saturday           7 00:00:07                                          1       
2014-06-28 20:26:00 2014-06-28 20:51:46      5,112 COMPLETED  ARCHIVELOG    Saturday        1546 00:25:46        1      0      0      0      4     1 


This is how estimated the size of the backup from Database.

SQL> select sum(bytes)/1024/1024 from v$datafile;                                                                                                          
                                                                                                                                                           
SUM(BYTES)/1024/1024                                                                                                                                       
--------------------                                                                                                                                       
             50387.5                                                                                                                                       
                                                                                                                                                           
SQL> select sum(bytes)/1024/1024 from dba_free_space;                                                                                                      
                                                                                                                                                           
SUM(BYTES)/1024/1024                                                                                                                                       
--------------------                                                                                                                                       
          23501.5625                                                                                                                                       
                                                                                                                                                           
SQL>                           

50387.5 - 23501.5625 = 26885.9375 = 26GB
I reviewed the below notes for the same.
How to estimate the size of an RMAN database backup (Doc ID 1274720.1)
A Complete Understanding of RMAN Compression (Doc ID 563427.1)

Sunday, June 29, 2014

ouicli.pl INSTE8_APPLY 255 (or) ERROR: Failed to execute adclone.pl

I got the below issue while Cloning ORACLE HOME from source to target. I have copied the binaries from source and initiated adcfclone. It failed 
with below errror.



[oradev@host01 bin]$ perl adcfgclone.pl dbTechStack

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adcfgclone Version 120.31.12010000.8

Enter the APPS password :

Running:
/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/../jre/bin/java
u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/xmlparserv2.jar:
pps.ad.context.CloneContext -e /u01/app/oradev/product/11.2.0/dbhome_1/apps
29191.lst -stage /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone -db

Log file located at /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/

Provide the values required for creation of the new Database Context file.

Beginning rdbms home Apply - Sat Jun 28 16:27:21 2014

/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true  -Doracle.installer.oui_loc=/u01/app/oradev/product/11.2.0/dbhome_1/oui -classpath /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/xmlparserv2.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/ojdbc5.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/java:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/OraInstaller.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/ewt3.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/share.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/srvm.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/ojmisc.jar   oracle.apps.ad.clone.ApplyDBTechStack -e /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/DEV_host01.xml -stage /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone   -showProgress
APPS Password : Log file located at /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/log/DEV_host01/ApplyDBTechStack_06281527.log
  \      0% completed       RC-00110: Fatal: Error occurred while relinking of ApplyDBTechStack

ERROR while running Apply...
Sat Jun 28 16:27:53 2014

 ERROR: Failed to execute /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/adclone.pl

Checked for the exact log file located u01/app/oradev/product/11.2.0/dbhome_1/appsutil/log/DEV_host01/ApplyDBTechStack_06281527.log


  [APPLY PHASE]
  AutoConfig could not successfully execute the following scripts:
    Directory: /u01/app/oradev/product/11.2.0/dbhome_1/perl/bin/perl -I /u01/app/oradev/product/11.2.0/dbhome_1/perl/lib/5.8.3 -I /u01/app/oradev/product/11.2.0/dbhome_1/perl/lib/site_perl/5.8.3 -I /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/perl /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone
      ouicli.pl               INSTE8_APPLY       255
AutoConfig is exiting with status 1

RC-50013: Fatal: Instantiate driver did not complete successfully.
I have checked the perl version installed in ORACLE HOME and on the /usr/bin.
The versions are different.



[oradev@host01 bin]$ /u01/app/oradev/product/11.2.0/dbhome_1/perl/bin/perl --version

This is perl, v5.10.0 built for x86_64-linux-thread-multi

Copyright 1987-2007, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[oradev@host01 bin]$ perl --version

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[oradev@host01 clone]$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/u01/app/oradev/bin
[oradev@host01 clone]$ which perl
/usr/bin/perl

Exported the ORACLE_HOME perl into PATH variable and the issue was resolved.



Solution:
---------
[oradev@host01 bin]$ export PATH=/u01/app/oradev/product/11.2.0/dbhome_1/perl/bin/perl:$PATH:.

[oradev@host01 bin]$ echo $PATH
/u01/app/oradev/product/11.2.0/dbhome_1/perl/bin/perl:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/u01/app/oradev/bin:.
And then dbTechStack went successful.


[oradev@host01 bin]$ perl adcfgclone.pl dbTechStack /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/DEV_host01.xml

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adcfgclone Version 120.31.12010000.8

Enter the APPS password :


Running Rapid Clone with command:
perl /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/adclone.pl java=/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/../jre mode=apply stage=/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone component=dbTechStack method=CUSTOM dbctxtg=/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/DEV_host01.xml showProgress contextValidated=false
Running:
perl /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/adclone.pl java=/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/../jre mode=apply stage=/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone component=dbTechStack method=CUSTOM dbctxtg=/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/DEV_host01.xml showProgress contextValidated=false
APPS Password :

Beginning rdbms home Apply - Sat Jun 28 16:39:08 2014

/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/u01/app/oradev/product/11.2.0/dbhome_1/oui -classpath /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/xmlparserv2.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/ojdbc5.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/java:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/OraInstaller.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/ewt3.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/share.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/oui/srvm.jar:/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone/jlib/ojmisc.jar   oracle.apps.ad.clone.ApplyDBTechStack -e /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/DEV_host01.xml -stage /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/clone   -showProgress
APPS Password : Log file located at /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/log/DEV_host01/ApplyDBTechStack_06281539.log
  |      0% completed
Log file located at /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/log/DEV_host01/ApplyDBTechStack_06281539.log
  \      0% completed

Completed Apply...
Sat Jun 28 16:41:08 2014

Starting database listener for DEV:
Running:
/u01/app/oradev/product/11.2.0/dbhome_1/appsutil/scripts/DEV_host01/addlnctl.sh start DEV
Logfile: /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/log/DEV_host01/addlnctl.txt

You are running addlnctl.sh version 120.1.12010000.4


Starting listener process DEV ...


LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 28-JUN-2014 16:41:10

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Starting /u01/app/oradev/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /u01/app/oradev/product/11.2.0/dbhome_1/network/admin/DEV_host01/listener.ora
Log messages written to /u01/app/oradev/product/11.2.0/dbhome_1/admin/DEV_host01/diag/tnslsnr/host01/DEV/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host01.demo.com)(PORT=1534)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.demo.com)(PORT=1534)))
STATUS of the LISTENER
------------------------
Alias                     DEV
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                28-JUN-2014 16:41:11
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oradev/product/11.2.0/dbhome_1/network/admin/DEV_host01/listener.ora
Listener Log File         /u01/app/oradev/product/11.2.0/dbhome_1/admin/DEV_host01/diag/tnslsnr/host01/DEV/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host01.demo.com)(PORT=1534)))
Services Summary...
Service "DEV" has 1 instance(s).
  Instance "DEV", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u01/app/oradev/product/11.2.0/dbhome_1/appsutil/log/DEV_host01/addlnctl.txt for more information ...

NLS boot file not found or invalid opmnctl ping – EBS 12.2 ADCFGCLONE FAIL

Error: adcfgclone.pl failed while performing clone of EBS 12.2 instance. This occurred while ohsT2PApply is in progress. INST_TOP/adm...