Stay at Home!! Be Safe!! Take Care!!

For Any queries, please mail us at support@funoracleapps.com

How to mount a Folder from another Partition in Linux

How to mount a Folder from another Partition in Linux


In case we want to mount a folder located in other partition, below steps can be followed.

mkdir /stage

mount --bind /u01/stage /stage

To make this permanent add in your /etc/fstab like this:

/u01/stage    /stage    none    bind

Check the mount now.

[himanshu@ebs122 ~]$ df -aTh
Filesystem     Type         Size  Used Avail Use% Mounted on
/dev/sda1      ext4         9.8G  3.6G  5.8G  39% /
proc           proc            0     0     0    - /proc
sysfs          sysfs           0     0     0    - /sys
devpts         devpts          0     0     0    - /dev/pts
tmpfs          tmpfs        7.3G     0  7.3G   0% /dev/shm
none           binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
sunrpc         rpc_pipefs      0     0     0    - /var/lib/nfs/rpc_pipefs
/dev/sdb       ext4         394G   77G  318G  20% /u01
/u01/stage     none         394G   77G  318G  20% /stage

Oracle APPS R12.2 Installation on Google Cloud VM

Oracle APPS R12.2 Installation on Google Cloud VM

In this post I am going to share steps to install Oracle Apps R12.2 in Google Cloud.


Server Preparation:

Google cloud VM creation with 500 GB storage and make sure host name length is small. I have used RHEL 6 image for Operation system.

VNC server installation- Refer link to check the steps


Once above tasks are done, we have to start with installation and pre-requisites.

1) I will install RPM's using oracle public repository.

cd /etc/yum.repos.d

Move all present repo files to backup directory.

mkdir bkp
mv * bkp/

Download oracle public repository repo file.

wget http://public-yum.oracle.com/public-yum-ol6.repo

Using a text editor, change the field ‘enabled=0’ to ‘enabled=1’ for the repositories corresponding to the machine’s operating system while also enabling the ‘addons’ channel. Here’s an example of a repo file’s entries:
[ol6_latest]

name=Oracle Linux $releasever Latest ($basearch)

baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/

gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6

gpgcheck=1

enabled=1

[ol6_addons]

name=Oracle Linux $releasever Add ons ($basearch)

baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/

gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6

gpgcheck=1

enabled=1

[ol6_UEK_latest]

name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)

baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/

gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6

gpgcheck=1

enabled=1

2) Install the RPMS now using below command.

yum install oracle-ebs-server-R12-preinstall.x86_64

Once the pre-reqs are installed. We can verify the users.


[himanshu@ebs122 stage]$ id oracle

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)
[himanshu@ebs122 stage]$ id applmgr
uid=54322(applmgr) gid=54321(oinstall) groups=54321(oinstall)

Add appplmgr to dba group as well.


[himanshu@ebs122 stage]$ sudo usermod -aG dba applmgr

[himanshu@ebs122 stage]$ id applmgr
uid=54322(applmgr) gid=54321(oinstall) groups=54321(oinstall),54322(dba)

Also change password for oracle and applmgr user.

Install java using below command

yum install java

3) Make the below changes in limits.conf.

/etc/security/limits.conf:
---------------
 * hard nofile 65536
 * soft nofile 4096
 * hard nproc 16384
 * soft nproc 2047
 * hard stack 16384
 * soft stack 10240

4) Add a swap file of 20 GB Size

sudo fallocate -l 20G /u01/swapfile
sudo chmod 600 /u01/swapfile
sudo mkswap /u01/swapfile
sudo swapon /u01/swapfile

edit /etc/fstab and add below

/u01/swapfile swap swap defaults 0 0

check available swap size.

[himanshu@ebs122 stage]$ free -g
             total       used       free     shared    buffers     cached
Mem:            14         12          2          0          0         11
-/+ buffers/cache:          0         14
Swap:           19          0         19
[himanshu@ebs122 stage]$ grep SwapTotal /proc/meminfo
SwapTotal:      20971516 kB

5) Create /etc/oraInst.loc file and put below content in it.

inventory_loc=/u01/oracle/oraInventory 
inst_group=dba 

Note: Make sure no space character are there in file content.

6) Setup ingress firewall rule for Google Cloud VM to enable connectivity to database port. I have decided to use port pool as 10 and 20, so my database port would be 1531(1521+10)





7) Map the hostname with Cloud external IP to be able to access.

[himanshu@ebs122 stage]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
34.93.86.157 ebs122.lab ebs122

8)Download the and keep the software on server and proceed with installation of EBS as normal.

Please follow link for  stage and installation screens.



9) Once Installation is Completed, Please verify by opening the login screen.
Also not you have to enable firewall for access http/weblogic ports as done in step 6.


For any doubts, please feel to ask.

Adding a DISK on GOOGLE Cloud VM

Adding a DISK on GOOGLE Cloud VM


In this post we are going to see how to attach a DISK on Google Cloud VM.

Steps:


1) Attaching a New Disk to VM

Go to your Google Cloud Console and navigate to Compute >> VM Instances.

Click the name of the instance where you want to add a disk.

Click Edit, at the top of the instance details page.

Scroll down to Additional disks and click Add item.

Configure the disk’s properties and click Create.

Scroll down to the bottom of the page and click Save to apply your changes to the instance and attach the new disk.




2) Check the new disk on VM. sbd is the new disk.

[himanshu@ebs122 ~]$ sudo lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   10G  0 disk 
└─sda1   8:1    0   10G  0 part /
sdb      8:16   0  400G  0 disk

3) Format the Disk

sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/[DEVICE_ID]

Note: RHEL 6 and CentOS 6 do not accept the lazy_journal_init=0 argument. Remove this parameter when formatting zonal persistent disks on instances with these images.

sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,discard /dev/sdb

4) Mounting the DISK. Create a directory and mount the disk on that.

[himanshu@ebs122 ~]$ sudo mkdir /u01
[himanshu@ebs122 ~]$ sudo mount -o discard,defaults /dev/sdb /u01

5) Change read write permission

sudo chmod a+w /u01

6) Edit the fstab to make sure the mount is permanent after server reboot.

sudo blkid /dev/sdb


echo UUID=`sudo blkid -s UUID -o value /dev/sdb` /u01 ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab

7) Verify Mount Point

[himanshu@ebs122 ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.8G  3.5G  5.8G  38% /
tmpfs           7.3G     0  7.3G   0% /dev/shm
/dev/sdb        394G   71M  394G   1% /u01


Installing VNC server on Google Cloud

Installing VNC server on Google Cloud


In this post we are going to see how can we setup GUI in google cloud VM using vncserver. I would be using the same for installing EBS R12.2 in future posts.

Steps:

1. Setup a VM on Google Cloud. I am using RHEL 6.

[himanshu@ebs122 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)

2. Install the required RPMS

yum install tigervnc-server

yum install twm

yum install xterm

yum install xsetroot
yum install xclock

3. Start the VNC server using below command

[himanshu@ebs122 ~]$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth:  file /home/himanshu/.Xauthority does not exist

New 'ebs122:1 (himanshu)' desktop is ebs122:1

Creating default startup script /home/himanshu/.vnc/xstartup
Starting applications specified in /home/himanshu/.vnc/xstartup
Log file is /home/himanshu/.vnc/ebs122:1.log

4. Now install any vnc viewer and try to access.
























Query to find Concurrent Program Details based on Program Name

Query to find Concurrent Program Details based on Program Name


Scripts:

SELECT
    fcp.concurrent_program_id,
    fcp.concurrent_program_name,
    fcpt.user_concurrent_program_name,
    fcpt.description,
    fe.executable_name,
    fet.user_executable_name,
    fe.execution_file_name
FROM
    apps.fnd_concurrent_programs fcp,
    apps.fnd_concurrent_programs_tl fcpt,
    apps.fnd_executables fe,
    apps.fnd_executables_tl fet
WHERE
        fe.executable_id = fet.executable_id
    AND
        fcp.concurrent_program_id = fcpt.concurrent_program_id
    AND
        fcpt.language = fet.language
    AND
        fcp.executable_id = fe.executable_id
    AND
        fcp.executable_application_id = fe.application_id
    AND
        fcpt.language = 'US'
  AND
    upper(fcpt.user_concurrent_program_name) LIKE  upper('%%')
      -- and upper(fcp.concurrent_program_name) LIKE  upper('%%');

Query for Redo log Files and finding various details

Query for Redo log Files and finding various details



Script to find redo log file members.

select GROUP#,TYPE,MEMBER from v$logfile;

Script to find redo log file size

select GROUP#,THREAD#,SEQUENCE#,bytes/1024/1024 as "Size in MB",MEMBERS,STATUS from v$log;

Script to find both log file and its size

SELECT
    a.group#,
    a.thread#,
    a.sequence#,
    a.archived,
    a.status,
    b.member AS redolog_file_name,
    ( a.bytes / 1024 / 1024 ) AS "Size in MB"
FROM
    v$log a
    JOIN v$logfile b ON a.group# = b.group#
ORDER BY a.group#

Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle error while installing Oracle Pre-install RPM

Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle error while installing Pre-install RPM


When trying to install oracle rpm on RHEL 6 Operating system on Google Cloud VM getting below error.

Error:

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle


GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle


Cause :

GPG key mising.

Solution:

Download GPG key.

Command:

get http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle