Enable Automatic Memory Management (AMM)

SQL> show parameter target

NAME                                               TYPE        VALUE
———————————— ———–       ——-
archive_lag_target                                     integer     0
db_flashback_retention_target                  integer     1440
fast_start_io_target                                   integer     0
fast_start_mttr_target                                integer     0
memory_max_target                                 big integer 26048M
memory_target                                         big integer 0
parallel_servers_target                              integer     2048
pga_aggregate_target                               big integer 6502M
sga_target                                                big integer 19520M

SQL> ALTER SYSTEM SET MEMORY_MAX_TARGET = 16384M scope=spfile ;

SQL > SHUTDOWN IMMEDIATE;
SQL > STARTUP ;
SQL> ALTER SYSTEM SET SGA_TARGET = 0 scope=spfile ;
System altered.
SQL> ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0 scope=spfile ;
System altered.
SQL> ALTER SYSTEM SET MEMORY_TARGET=12288M scope=spfile ;
System altered.
Thank you 
Osama Mustafa

Create Group using Em12c

Sometimes you need to create Certain group for Enterprise manager to make monitor more easy , sepcially if you have lot of agent and components such as database , Host , application server … so if you want to manage them individually it will consume time and seems to be impossible.

Enterprise manager provide you with Group Features to combine components, and there’s two type :

  • Target at the same type 
  • Target contain different components such as database, Application server , Host.

Check the below screenshot :

From Setup –> Add Target –> Group

you have five tab each one of them contain different parameters, Choose the right option that works with your Work:

After Choose the name for the group you need to add Agents, from search button new popup screen will be open choose which agent type you want.

Another example on Chart tab :

After Create Group :

For More information about Enterprise Manager 12c Group Read Oracle Documentation Here
Thank you 
Osama mustafa

unpack.sh Error -name=Value

The pack command creates a template archive (.jar) file that contains a snapshot of either an entire domain or a subset of a domain. You can use a template that contains a subset of a domain to create a Managed Server domain directory hierarchy on a remote machine.

The unpack command Creates a full domain or a subset of a domain used for a Managed Server domain directory on a remote machine. You may use unpack only with a template compatible with your current installation. The template can be any of the following:

  •  A domain template provided by BEA and packaged with your current installation
  •  A domain template created using the Domain Template Builder or WLST Offline
  •  A domain template created using the pack command
  •  A Managed Server template created using the pack command. A Managed Server template, by default, contains only the files necessary for creating a Managed Server domain directory.
You Can Check Oracle Documentation here for more information about the above commands.
When Trying to use unpack command with the below command:

./unpack.sh -domain=/u01/app/oracle/domains/IDMDomains -template=/u01/shared/IDMdomains.jar

The below error appear :

ERROR !!! ./unpack.sh -name=Value Missing

The Solution is simple :

-template attribute should come first. 

./unpack.sh  -template=/u01/shared/IDMdomains.jar -domain=/u01/app/oracle/domains/IDMDomains

Thank you
Osama Mustafa

Managed Server BI_Server Unable To Start After Create Node manager Service

Problem Description :

After Install Weblogic and BI On Windows, And Create Admin Server as Services BI_server unable to start, Node manager Created Service Created Without Any Error.

Cause & Solution : 

After Investigation I found Class Path is too Long So what i did like the following, Edit installSVC.cmd To set Classpath  to be Short

you will find the below line in the InstallSvc.cmd all you have to do is change it to be like Line in Red Color :

@echo off

echo %CLASSPATH% > %USERDOMAIN_HOME%\cp.properties

if “%ADMIN_URL%” == “” goto runAdmin
@echo on
set CMDLINE=”%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS%
-classpath @%USERDOMAIN_HOME%\cp.properties 
-Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER%
-Dweblogic.management.server=\”%ADMIN_URL%\”
-Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE%
-Djava.security.policy=\”%WL_HOME%\server\lib\weblogic.policy\” weblogic.Server”

goto finish

Thank you
Osama Mustafa

Step by Step Configure SSO Using Oracle Fusion Middle-ware

I would like to share this document , which is describe step by step dealing with :

  • WebLogic
  • Oracle Internet Directory
  • Oracle Content Server
  • Oracle Access manager 
Every thing mentioned with Installation &  Configuration Steps.
I tried To make it simple as i can, Included with Screen Shots ,Step By Step how to install The above Oracle Products and how to configure them to prepare your application for Single-Sing-On 
Please if you would like to share this document ask me before.

You can View and Download the Document from Here
Thank you 
Osama mustafa

Mount NFS Device Is Busy

This Error Appear On Solaris when you try to mount filesystem :

mount -F nfs IP:/export/home/oracle/test /export/home/oracle/test

Output :

nfs mount: mount: /export/home/oracle/test : Device busy

Check why it’s Busy using :

fuser -u /export/home/oracle/test

/export/home/oracle/test :     1432c(oracle)

Kill the process :

kill – 9 1432 

Thank you
Osama mustafa 

Adopting NON-CDB to CBD

This article describe steps to Adopt non-container database 12c to container 12c 

[oracle@test12c Desktop]$ ps -ef | grep pmon

oracle    3230     1  0 04:04 ?        00:00:09 ora_pmon_db12c
oracle   12112     1  0 08:20 ?        00:00:07 ora_pmon_NonCDB
oracle   29621  3203  0 18:47 pts/1    00:00:00 grep pmon

Where :
db12c : Container database
NonCDB : Non Container Database
Let Start

[oracle@test12c Desktop]$ export ORACLE_SID=NonCDB

SQL> select instance_name from v$instance ;
INSTANCE_NAME
—————-
NonCDB

SQL> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount exclusive
ORACLE instance started.
Total System Global Area  939495424 bytes
Fixed Size    2295080 bytes
Variable Size  348130008 bytes
Database Buffers  583008256 bytes
Redo Buffers    6062080 bytes
Database mounted.

SQL> alter database open read only;

Database altered.

Run the below procedure to generate the manifest file. 

SQL> exec dbms_pdb.describe(pdb_descr_file=>’/u01/noncdb.xml’);

PL/SQL procedure successfully completed.

SQL> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.

 I already working on the same host so no need to copy datafiles,if you are not working on same host copy datafiles to same location.

Let’s Work On Container Database .

after copy datafiles to folder, On Os Level , Create directory to use file_name_convert.

[oracle@test12c oradata]$ mkdir newnoncdb
[oracle@test12c newnoncdb]$ pwd
/u01/app/oracle/oradata/newnoncdb

[oracle@test12c Desktop]$ export ORACLE_SID=db12c
[oracle@test12c Desktop]$ sqlplus / as sysdba

 

SQL> create pluggable database non_cdb as clone
  2  using ‘/u01/noncdb.xml’
  3  file_name_convert=(‘/u01/app/oracle/oradata/NonCDB’,’/u01/app/oracle/oradata/newnoncdb’) copy;

Pluggable database created.

 Where

  1.  using ‘/u01/noncdb.xml’ : file that should be generated using dbms_pdb.describe
  2. ‘/u01/app/oracle/oradata/NonCDB’ : location for Copied Non_CDB datafile
  3. ,’/u01/app/oracle/oradata/newnoncdb’ : location for created directory.

SQL> alter pluggable database non_cdb open ;        
Pluggable database altered.

SQL> alter pluggable database non_cdb close ;
Pluggable database altered.

SQL> alter pluggable database non_cdb open ;
Pluggable database altered.

NAME       OPEN_MODE
—————————— ———-
PDB$SEED       READ ONLY
NEWDB_PLUG MOUNTED
NEW_PLUG_COPY MOUNTED
NEW_PLUG_MOVE MOUNTED
NON_CDB       READ WRITE

Now you plugged NON-CDB to Container Database successfully without any problems and it will works fine.
the below step is optional but recommanded for production to move all thing from non-cdb to cdb. ( specially for upgrade 12c later ) 

SQL> alter session set container=Non_cdb;
Session altered.

OR 

[oracle@test12c newnoncdb2]$ sqlplus sys/sys@test12c:1521/Non_cdb as sysdba  ;

SQL> @$ORACLE_HOME/rdbms/admin/noncdb_to_pdb.sql   

Thank you
Osama Mustafa

Flashback version query/Operation Column is Unknown

SQL > SELECT START_SCN,OPERATION,LOGON_USER,XID FROM  FLASHBACK_TRANSACTION_QUERY WHERE TABLE_NAME=’TEST’;

The Output will be like this :

XID              TABLE_OWNER TABLE_NAME OPERATION           LOGON_USER UNDO_SQL
—————- ———– ———- ——————————– ———-              —————
0600090064030000              TX         UNKNOWN                          TEST
0600090064030000              TX         UNKNOWN                          TEST

To avoid Unknown Status enable  supplemental logging by

SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA ;

Database altered.

Thank you
Osama mustafa

" java.lang.UnsatisfiedLinkError" When Run Oracle EBS

Exception in thread “main” java.lang.UnsatisfiedLinkError: /u01/media/StageR12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.6.0/lib/i386/xawt/libmawt.so: libXi.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.(Unknown Source)
at java.awt.Component.(Unknown Source

This error appear while trying to  ./rapidwiz in Oracle EBS , and it’s regarding to Wrong packager version

First you need to remove the old package using :

rpm -e –nodeps

Install the required package from the below link :

Package libXi 32bit Here
Package libXi 64bit Here

Re Run the Installer again

Enjoy

Thank you
Osama Mustafa

Step By Step Remove Oracle Table Lock

All your query should be done using sys user or system user, after that you need to find Session SID with below query :

SQL> SELECT SESSION_ID
  2  FROM DBA_DML_LOCKS
  3  WHERE NAME = ‘EMP_INFORMATION’;

Where EMP_INFORMATION is Table_name

Output :

SID
___
424

Next step it’s talking about How to find Serial# :

SELECT SID,SERIAL#
FROM V$SESSION
WHERE SID IN (SELECT SESSION_ID
FROM DBA_DML_LOCKS
WHERE NAME = ‘EMP_INFORMATION’)

Output :

SID                SERIAL#
—-                 ——-
424                 1103

Use Alter system To kill this session :
ALTER SYSTEM KILL SESSION ‘SID,SERIALl#’;

Thank you
Osama mustafa