Saturday, April 16, 2016

Oracle R12 frmweb: error while loading shared libraries

Problem

Are you receiving the following errors while launching Oracle R12 forms session after an instance cloning exercise ? One of the reasons why this could happen is when you have a Linux root / file system that is 100% full with no free space available.

formsweb: Forms session <1> aborted: runtime process failed during startup with errors. frmweb: error while loading shared libraries: libdeb.so.0: cannot open shared object file: No such file or directory.

Solution

1) Source the applications environment file of the Oracle R12 instance. i.e, BASE DIRECTORY/apps/apps_st/appl/APPSINSTANCENAME_appserver.env

2) cd  BASE DIRECTORY/apps/tech_st/10.1.2/bin
3) ldd frmweb.  Notice the libdeb.so.0 => not found error.

4) Now run the relink all command.

5) One of the reasons why the relink command may fail is due to the lack of free space on the root / file system on Linux operating system. If that is the case, please delete unnecessary files or directories in the root / file system.

6) Now retry running the relink all command and it should complete successfully. 

7) Verify the  ldd frmweb command output again. Notice that it now links libdeb.so.0 successfully.

ldd frmweb | grep -i "libdeb.so.0"
        libdeb.so.0 => BASE DIRECTORY/apps/tech_st/10.1.2/lib/libdeb.so.0

8) Re-launch the Oracle R12 forms session and this time you should not receive any more errors.

Friday, April 8, 2016

Oracle Execution of GI Install script is failed on nodes

Introduction

Are you facing errors during running root.sh in one of the cluster nodes managed by Oracle VirtualBox while installing Oracle 12c R1 Grid Infrastructure software ?


Cause - Installer has failed to execute the specified script on one or more nodes. This might be because of exception occurred while executing the script on nodes.  Action - Review the log files '/u01/app/oraInventory/logs/installActions2016-04-07_11-26-02PM.log' and '/u01/app/12.1.0/grid/cfgtoollogs/crsconfig/rootcrs_<nodename>_<timestamp>.log' for further details.  More Details
Execution of GI Install script is successful on nodes : [oraracn1]  Execution of GI Install script is failed on nodes : [oraracn2]  Exception details  - PRCZ-2009 : Failed to execute command "/u01/app/12.1.0/grid/root.sh" as root within 3,600 seconds on nodes "oraracn2"

The command '/u01/app/12.1.0/grid/perl/bin/perl -I/u01/app/12.1.0/grid/perl/lib -I/u01/app/12.1.0/grid/crs/install /u01/app/12.1.0/grid/crs/install/rootcrs.pl -auto' execution failed

This issue is known to occur with a combination of VirtualBox 5.x version and AMD CPU  (Phenom X4, AM3 slot) in conjunction with Oracle 12c R1 Grid Infrastructure.


Solution

1) Uninstall Oracle VM VirtualBox software from Control Panel of your PC.
2) Then install Oracle VM VirtualBox 4.3.36. This old build of VirtualBox can be downloaded here.
3) Now perform the installation of Oracle 12c R1 Grid Infrastructure software and it should be completed successfully on all the nodes of the cluster.

Oracle may fix this issue in one of the future versions of the VirtualBox hypervisor software.

Monday, April 4, 2016

Sony Vaio - How to enable virtualization in BIOS


In Sony Vaio laptop perform the following steps to enable virtualization in BIOS. These steps have been tested in Windows 7 operating system.

1) Shutdown the laptop
2) Restart using the Assist button
3) Then before startup of the operating system press F2 button. 
4) The Bios menu will come up. 
5) Now go to Advanced tab and enable virtualization.

Saturday, February 13, 2016

Oracle VirtualBox - Failed to open create the internal network

Introduction

Are you getting the error "Oracle VM VirtualBox - Failed to open create the internal network" for the VirtualBox Host-Only Ethernet Adapter while logging into a virtual machine created in Oracle VirtualBox with Windows 10 operating system ?  If so, please try the solution below.






















Solution

  1. Open Control Panel>>Device Manager.
  2. Expand “Network Adapters”.
  3. Notice that “Virtual Box hosts-only adapter” is present.
  4. Right click on the adapter and select “Uninstall”.
  5. Complete the uninstall process, by removing all supported files. (This is very important. If you do not remove all the files, virtual box will use same registry entries/drivers after reinstalling).
  6. After uninstalling the Virtual box host-only adapter, Uninstall Virtual box completely. This uninstalling should be done by “Virtual Box” installer. Do not do this directly from Control Panel>> Programs and Features/Add or remove programs”.
  7. Restart your PC.
  8. Do a complete fresh install of Oracle VM VirtualBox again.
  9. Open Control Panel>>Network and Internet>>Network Connections.
  10. Right click on the Virtual Box adapter and select “Properties”.
  11. Make sure “Virtual Box NDIS6 Bridged Networking Driver” is selected. If it is not selected, then check the checkbox and click on OK. 
  12. Open Virtual Box application and then try to startup the VM. It should start without any issues.



Tuesday, August 18, 2015

Apache Spark Training in DBA University

We have included Apache Spark topics as part of our Big Data with Hadoop training course. Spark is the most active Big Data open source project and has become a top level Apache project in Feb 2014. In our course, you get an opportunity to process large real world JSON data sets using Apache Spark both on a single node pseudo-distributed Hadoop cluster as well as three node Hadoop cluster in the cloud.

The Apache Spark topics along with lab work are below

1). How to use the Spark API in Python.
2). How to process large JSON data sets using the Spark SQL context in the spark shell. (Scala-based shell)
3). How to obtain data from external databases using the JDBC built-in data source library in Spark.
4) How to add the Spark service in a three node Hadoop cluster. 


If you are interested, please register at http://dbauniversity.webex.com/

The DBA University difference

1) All faculty based in USA and training through video enabled web conferencing software.
2) Custom written ebooks (About 300 pages training materials per course).
3) Cloud based remote lab server access for each student.
3) Our faculty and student video portal - http://video.dbauniversity.com
4) Taught using interactive white board technology.

Sunday, August 2, 2015

Oracle RMAN Active Database Duplication example

Introduction

Oracle RMAN Active Database Duplication is a new feature introduced in Oracle 11g R1. This option helps perform database copies without the need for relying on the source database backup. Oracle RMAN makes a copy of the source database (active database) at run time without the need of using its backup for the duplicate exercise. This option is very attractive when one is tasked with a “test database” to “test database” copy exercise (cloning exercise) as source test databases do not usually have backup jobs scheduled. Though it can be used for “production database” to “test database” copies as well, this method is not recommended because the RMAN duplicate command channels are launched on the source database host, thereby causing high load on the production database server.

Because the active database duplicate option does not rely on a backup, it cannot be used to perform Database Point-in-Time Recovery (“DBPITR”). Additionally, the source database must be in archive log mode if the duplication has to be performed without causing a downtime to the source database. Otherwise, the source database must be shutdown immediate and then startup mount.

Prerequisites

1) The source database must be in archivelog mode if one wants to duplicate it without shutting it down

2) If source database were a test database and enabling archive log mode is not necessary, then shutdown immediate and startup mount the source database.

3) When RMAN is connected to the auxiliary instance (destination to-be-duplicated instance), it must be provided with a net service name of it. This requirement applies even if the auxiliary instance is on the local host. Therefore, please add the tns entry  of the destination to-be-duplicated instance in the tnsnames.ora of the source database.

4) The source database and auxiliary instances must use the same SYS user password, which means that both instances must have password files.

5) The dynamic service registration cannot be used for the destination database while the RMAN active duplicate command is being executed. Hence only static service registration will work for the RMAN active duplicate to be successful.

6) Firewall access must be opened from source database server to destination database server  on the destination database's listener port number. (if they are on two different servers)

Assumptions

1) sys password is sys on both source and destination (to-be-duplicated) databases.
2) SRCDB and DESTDB are the names of the respective source and destination databases.
3) SRCDB has an spfile (server parameter file).

Prepare destination database (to-be-duplicated database)

1)  Login to oracle@target database server.

2) Create new directories on this server that exactly matches the source database's dignostic_dest folder and fast recovery area folder as the RMAN active database duplicate command in the next section specifically looks for the exact directory name on destination server too.

3)  Start the listener process.
4)   cd  $ORACLE_HOME/dbs
5)   rm  -f  orapwDESTDB     (Let us remove any existing password file. Replace DESTDB with the actual destination database name).

6)  orapwd  password=sys   file=orapwDESTDB     (Replace DESTDB with the actual destination database name).

7) cd $ORACLE_HOME/dbs

8) Remove  any spfile or pfile for the destination database (if exists)

9) Create a new initDESTDB.ora with just one parameter. ( (Replace DESTDB with the actual destination database name).

db_name = DESTDB

10) sqlplus   ‘/   as   sysdba’
11) startup   nomount;
12) exit;

Run the active database duplication command on source database server

1) Login to oracle@source database server
2) cd  $ORACLE_HOME/dbs

3) orapwd  password=sys   file=orapwSRCDB (If it does not exist already)
4) sqlplus   ‘/   as  sysdba’
5) alter   user   sys  identified  by  sys;
6) exit;

Note:  Please replace  DESTDB with the actual destination database name in the active duplicate command below.

7) tnsping   DESTDB   (make sure that the destination database listener can be accessible through SQL*Net from the source database server.  If not add an entry in tnsnames.ora and also make sure its listener is started on the destination server).
8) rman
9) connect   target   sys/sys@SRCDB;
10) connect   auxiliary   sys/sys@DESTDB;    
11)

run
{
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
allocate auxiliary channel a1 type disk;
allocate auxiliary channel a2 type disk;
set newname for database to '/u01/data/DESTDB/%b';
set newname for tempfile 1 to '/u01/data/DESTDB/temp01.tmp';
DUPLICATE TARGET DATABASE
  to DESTDB
  FROM ACTIVE DATABASE
  PASSWORD FILE
  SPFILE
  PARAMETER_VALUE_CONVERT 'SRCDB','DESTDB'
  SET CONTROL_FILES='/u01/data/DESTDB/c1.ctl'
  LOGFILE
  GROUP   1  ('/u01/data/DESTDB/redo1.log')   SIZE    50M,
  GROUP   2  ('/u01/data/DESTDB/redo2.log')   SIZE    50M ;
}


12) exit;

Friday, July 31, 2015

How to install Oracle database express edition on Linux

The instructions in this blog post are validated to work on CentOS 6.4 version for installing Oracle 11g R2 database express edition. The same instructions should work OK on other Linux operating systems such as Red Hat Enterprise Linux and Oracle Enteprise Linux etc. This blog host also assumes that Oracle software is being installed for the first time on the Linux server. Change or skip some instructions if otherwise.



1) Open a new terminal

2) sudo su - root
3) mkdir /u01  (If it does not exist)
4) useradd oracle (If it does not exist)
5) groupadd dba (If the group dba does not exist)

6) usermod -g dba oracle

7) chown -R oracle:dba /u01

8) Edit /etc/oraInst.loc and add the below content.

inventory_loc=/var/opt/oracle/oraInventory
inst_group=dba

9) mkdir -p /var/opt/oracle/oraInventory

10) chown -R oracle:dba /var/opt/oracle/oraInventory

11) Install any missing Linux packages (RPMs) that are missing on the server.  The list of Linux version 6 packages required for installing 11g R2 are specified in the quick installation guide https://docs.oracle.com/cd/E11882_01/install.112/e24326.pdf

12) Download Oracle database express edition software from http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html for Linux.

13) The downloaded file name is oracle-xe-11.2.0-1.0.x86_64.rpm.zip

14) Login as root
15) unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
16) cd Disk1
17) rpm -i oracle-xe-11.2.0-1.0.x86_64.rpm 
18) /etc/init.d/oracle-xe configure


19) ps -fu  oracle  (Verify the background processes are started for XE database instance)
20) sudo su  -  oracle  (Switch to oracle operating system user)
21) Edit /home/oracle/.bash_profile and add the below lines.

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=XE
export TNS_ADMIN=$ORACLE_HOME/network/admin

22) sqlplus ‘/ as sysdba’   (Login to the database with DBA privilege)
23) alter user hr account unlock;  (The sample HR schema is locked by default)
24) alter user hr identified by hr; (Reset the password of HR schema)

References: http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#XEINL123