Posts

Showing posts from March, 2015

Configure RMAN Backup On Windows

Image
Database is supported on windows and some people using Windows As Production and RMAN need to be configured to ensure backup for Database in such failure or something to do this follow the below steps :-


Create first text file called backup and change the format to "bat", inside the file add the following lines :- C:
cd E:\app\ADM-BSS01\product\11.2.0\dbhome_1\BIN
rman @E:\RMAN\Scripts\backup.rman
Create 3 folders in E for example :-backupArchivelogControlfileCreate second file name it Backup.rman and add the Rman Script like below  connect target /
run
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk;
ALLOCATE CHANNEL c2 DEVICE TYPE disk;
ALLOCATE CHANNEL c3 DEVICE TYPE disk;
ALLOCATE CHANNEL c4 DEVICE TYPE disk;
backup AS COMPRESSED BACKUPSET tag Full_database_open format 'E:\RMAN\backup\db_%t_%s_p%p.bkp' database;
backup AS COMPRESSED BACKUPSET archivelog all format 'E:\RMAN\backup\archivelog\al_%t_%s_p%p.arch' delete all input;
backup AS COMPRESSED BACKUPSET current…

Install Oracle grid infrastructure On Linux 6.6

This Post will explain Step by step provide with Screenshot how to install Oracle grid infrastructure 11.2.0.4 On Linux 6.6

Link From here

Cheers
Osama

Configure ASMLIB On Oracle Linux 6.6

In this post will show you how to configure Oracle ASMLIB On Linux 6.6

I uploaded the document on Slideshare , check it from here


Cheers
Osama Mustafa

Enable/Disable SSH For Root User

Sometimes for any reason you want to enable root ssh using any SSH Client such as putty and only the administrator can login to do this follow the below steps :-


vi /etc/ssh/sshd_configsearch for line as follow :-PermitRootLogin yes and change it to -->  PermitRootLogin noSearch for the following lines as well :-DenyUsers root user2 user3Remove the root from Deny UserDenyUsers user2 user3/etc/init.d/sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ]
If you want to disable the SSH login for root just keep everything like the above.

Cheers
Osama Mustafa

Oracle Streams ORA-44001: invalid schema

SQL> SQL> SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 job finished
  DECLARE
*
ERROR at line 1:
ORA-23616: Failure in executing block 7 for script
13F5CD569383406C82E7F63EE3F927E0 with
ORA-44001: invalid schema
ORA-06512: at "SYS.DBMS_RECO_SCRIPT_INVOK", line 139
ORA-06512: at "SYS.DBMS_STREAMS_RPC", line 465
ORA-06512: at "SYS.DBMS_RECOVERABLE_SCRIPT", line 659
ORA-06512: at "SYS.DBMS_RECOVERABLE_SCRIPT", line 682
ORA-06512: at "SYS.DBMS_STREAMS_MT", line 7972
ORA-06512: at "SYS.DBMS_STREAMS_ADM", line 2674
ORA-06512: at line 5
The error related to apply_queue parameter in oracle stream is not set with valid value, therefore set the parameter correctly like the below
apply_queue_user => 'STREAM_ADMIN' 
Cheers
Osama Mustafa

Enterprise Manager : Performance Across Enterprise Databases

The below link is very to understand the performance under #EM12c Provided by oracle, This demonstration shows you how to use AWR Warehouse a new feature of Oracle Enterprise Manager 12c Release 4.

https://www.youtube.com/watch?v=StydMitHtuI&feature=youtu.be

Cheers
Osama Mustafa

[INS-30131] Initial setup required for execution of installer validation failed.

When trying to install Oracle client 12c the above error appeared , this issue can happened on windows Or linux.

The cause i really simple :-

On linux there is no enough space under /tmp.

On windows the solution like the following :-


Open Windows Services.Stop Oracle Services --> OracleRemExecRemove the OracleRemExecServicethen try to install Oracle client again
Thank you  Osama Mustafa

ldap utility BINDASAPPUSER FAILED DUE TO INVALID PASSWORD Siebel

ldap utility BINDASAPPUSER FAILED DUE TO INVALID PASSWORD
The above error happened to Siebel CRM.

the solution is so simple :-

In my version Siebel configured as SSO because of this OID hold all the application user after check o i found that orcladmin have only one week for password expiration Siebel consider this as error so i increase password policy in OID.

Cheers
Osama

Creating a Local Yum Repository Using ISO Image

In this post i will show you how to create Yum repository Using ISO Image, will save more time :-


Download The ISO Image and Upload it to the server.Create Folder Under Root User Like the below cp /OEL6.6. iso /ISOs
now create mount point for this ISO. mkdir p /var/ISO/OEL6.6
Run the below command to mount it :-

mount o loop,ro /ISOs/OEL6.6. iso /var/ISO/OEL6.6
Now under /etc/yum.respos.d you can rename it or set enable=0 Create the following file /etc/yum.respos.d/OEL66.repoEdit the file and add 
[OL66]
name=Oracle Linux 6.6
baseurl=file:///var/ISO/OEL6.6
gpgkey=file:///etc/pki/rpmgpg/
RPMGPGKEY
gpgcheck=1
enabled=1
Run the below command to clean yum yum clean all
yum respolist

The output should be like the below :-


repo id repo name status
OL66 Oracle Linux 6.6 25,459 

Thank you
Osama Mustafa

New Features in ORAchk 12.1.0.2.3

The new ORAchk release 12.1.0.2.3 is now available to download from http://support.oracle.com


Is your database healthy ?

ORAchk can be used with any database depend on your Platform Solaris Intel, Solaris SPARC, ,HP , Linux , you can check the Oracle Support Document :-

ORAchk - Health Checks for the Oracle Stack (Doc ID 1268927.2)

That include the userGuide and how to Use ORAchk with any platforms,

New Features :-

Database performance, install, scalability & ASM
Cross stack checks for Oracle Applications running on Solaris & Oracle Hardware
Enterprise Manager Agents performance and failure to run
Oracle EBS Accounts Payables

Usually the usage like the below :-

./orachk  ---> regular healtcheck  + HA best practices
./orachk-c hacheck ---> HA best practices Only Cheers
Osama Mustafa

Apply Jdeveloper Patch

This blog post will show you how to apply Patch on Jdeveloper :-


Download the latest version of Opatch from http://support.oracle.comUnzip the Patch Folder.Set/export ORACLE_HOME to Jdeveloper hope depend on Operating systemFinally Opatch Apply to Jdeveloper Home.
If you faced any error with opatch commad try the below :-

opatch apply -jdk /u01/app/oracle/JDK/160_24
Cheers
Osama Mustafa

OPATCH : Problems with the lock file

Problems with the lock file
Lock file exists, details are:
Interim Patch is holding the lock from ......
probably due to previous unsuccessful operation

Seems the Opatch has been interrupted or hanged therefore the .opatch_storage still exists under Oracle Home

ls -ltr $ORACLE_HOME

Search for .patch_storage and delete it

Try Again..

Osama Mustafa

Prerequisite check "CheckActiveFilesAndExecutables" failed

Oracle Home       : /u01/app/oracle/product/11.2.0/db_home1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_home1/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_home1/cfgtoollogs/opatch/opatch2015-03-09_16-45-09PM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:

Following executables are active :
/u01/app/oracle/product/11.2.0/db_home1/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/app/oracle/product/11.2.0/db_home1/cfgtoollogs/opatch/opatch2015-03-09_16-45-09PM_1.log
When trying to apply OPatch the above error appear , 
Some process hanged 

oracle@--:~/database_patches/19769496$ fuser /u01/app/oracle/product/11.2.0/db_home1/lib/libclntsh.so.11.1
/u01/app/oracle/product/11.2.0/db_…

APPLY PSU PATCH ON RAC Database

This post describe how to apply PSU PATCH on Grid and DB Home Step by Step , I wrote earlier how to apply PSU Patch on single Node Read here

To Read How to APPLY PSU PATCH ON RAC Database Here 

Configure DBConsole as Active/passive

Sometimes Database Configured as Active/Passive ( Cluster ) Which mean one node working/time and regarding to this if the failover happened on 2nd node the customer will expected that everything will be the same as it was on node 1 include to this Dbconsole.

To do this follow the below steps :-


Database should be configured on VIP.Listener should be configured on VIP.Database , Configuration should be installed on Shared Storageinventory Files should be on shared storage as well.ORACLE_HOSTNAME Should be set to VIP Hostname.
Listener example :-

LISTENER  =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = VIP-HOST )(PORT = 1521))
)Don't forget to set the LOCAL_LISTENER Parameter :-

SQL> alter system set local_listener='LISTENER';
Or

SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = VIP-HOST )(PORT = 1521)) '; Now

export ORACLE_HOSTNAME=VIP-HOSTNAME
emca -config dbcontrol db -repos create
Test the failover on node #2

if for some reason when …

Shutdown Immediate Hangs

Today i faced Strange issue with Shutdown immediate command on cluster database which is when run shutdown immediate the command hangs and take so long and sometimes it's working and most of the time not working.

the below command was working without any problem :-

SQL > shutdown abort
to solve this issue & trace the error since the alertlog not indicating to anything interesting i have to dump systemstate every 5 minutes  to know what going on :-

connect / as sysdba
alter session set events '10400 trace name context forever, level 1'; 
After this you can kill the session that preventing shutdown.

The hangs usually happened for two reasons :-

Query running on Database.Transaction happened while you are trying to shutdown database. For the first reason :
use v$session_longops Read more here. Run the below query to check the query.
select count(*) from v$session_longops where time_remaining>0;
Second reason you can use

v$transaction Read from here.

Useful Document :…

Oracle Database Patches Information

A number of questions has been asked here and in Oracle Community Forum When/What/Date for Next Database patches ?

in the all way you should have valid account for http://support.oracle.com.

I see it's worth it to post and share the information how to find the desire patch number and how to know next patch release, i will only share MOS document number that will help you understand what i mean.

How to Find Patch ? 



Oracle Recommended Patches -- Oracle Database (Doc ID 756671.1)Quick Reference to Patch Numbers for Database PSU, SPU(CPU), Bundle Patches and Patchsets [1454618.1]Release Schedule of Current Database Releases [742060.1]Introduction to Oracle Recommended Patches [756388.1]Oracle Database Patchset Information, Versions 10.2.0 to 12.1.0 (Doc ID 268895.1)ALERT: Oracle 11g Release 1 (11.1) Support Status and Alerts (Doc ID 454507.1)
The above MOS document will guide you and help you to know the next release of database patch, also as you see i included some document that hel…

Dealing with Crontab

Schedule tasks under Linux is an powerful procedure which is used by almost everyone, and to do this using program called cron. more about it here .


Procedure :

make a new text file, and enter this line in that text file like the below :-

crontab myfirstjob

Formatting crontab file :-

what this file contains

Number Meaning Allowed range 1 Minutes 0-59 2 Hours 0-23

Sort process depend on memory

Image
top - display top CPU processes



Once top starts, press F to switch to the sort field screen. Choose one of the fields listed by pressing the key listed on the left; you probably want N for MEMORY


Done


ORA-27102: out of memory

Operating system : Solaris Sparc 11.2
Database Version : 11.2.0.3.0

When Trying to startup the database the following error appeared :-

SQL> startup nomount ;
ORA-27102: out of memory
SVR4 Error: 22: Invalid argument
Even when trying to know which instance process do this :-

SQL> oradebug setmypid
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory 
SQL> oradebug ipc
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory 
After investigation i found the cause for this error, the solaris SHMMAX was not set correctly on OS level which mean the database was configured more than permitted memory on OS.

to solve the above error

Fin…

Apply psu on single database

This post describes how to apply PSU Patch on Single Node Oracle Database With Screenshot

To view the document from here

Cheers
Osama Mustafa