Thursday, January 26, 2017

ORA-00845: MEMORY_TARGET not supported on this system

Cause:

Memory Target  error come due to lack of tmp space on server .



[oracle@rac1 ~]$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/vg_rac1-lv_root   26G   20G  5.0G  80% /
tmpfs                        1.5G  442M  1.1G  31% /dev/shm
/dev/sda1                    477M   55M  397M  13% /boot
[oracle@rac1 ~]$
[oracle@rac1 ~]$


Solution :

Need to increase temp space on server

# umount tmpfs
# mount -t tmpfs shmfs -o size=4048m /dev/shm

Make entry in fstab file on /etc/fstab 


[root@rac1]$ cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sun Sep 18 01:17:50 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_rac1-lv_root /                       ext4    defaults        1 1
UUID=b6ddbb52-c2ca-43c3-b9ac-10bb01e90d27 /boot                   ext4    defaults        1 2
/dev/mapper/vg_rac1-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
shmfs                   /dev/shm                tmpfs   size=4048m      0 0
[oracle@rac1 trace]$

reboot server
init 6

start database .


Tuesday, September 20, 2016

PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system





[root@rac1 bin]# ./oifcfg getif
*  192.168.1.0  global  public
*  192.168.0.0  global  cluster_interconnect
eth0  192.168.1.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
Only in OCR: eth0  192.168.1.0  global  cluster_interconnect,public
PRIF-51: interface [eth0] is set to both public and cluster_interconnect
PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg setif -global eth0/192.168.1.0:public
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg setif -global eth1/192.168.0.0:cluster_interconnect
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg getif
*  192.168.1.0  global  public
*  192.168.0.0  global  cluster_interconnect
eth0  192.168.1.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg delif -global */192.168.1.0
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg delif -global */192.168.0.0
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg getif
eth0  192.168.1.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
[root@rac1 bin]#
[root@rac1 bin]#


after restart cluster

CHANGE VIP STATUS FROM INTERMEDIATE STATE TO BACK ONLINE IN RAC

CHANGE VIP STATUS FROM INTERMEDIATE STATE TO BACK ONLINE
==================================================================


[root@rac1 bin]# ./crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.DATA2.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.LISTENER.lsnr
               ONLINE  OFFLINE      rac1
               ONLINE  ONLINE       rac2
ora.asm
               ONLINE  ONLINE       rac1                     Started
               ONLINE  ONLINE       rac2                     Started
ora.gsd
               OFFLINE OFFLINE      rac1
               OFFLINE OFFLINE      rac2
ora.net1.network
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.ons
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1
ora.cvu
      1        ONLINE  ONLINE       rac1
ora.oc4j
      1        ONLINE  ONLINE       rac2
ora.rac1.vip
      1        ONLINE  INTERMEDIATE rac2
ora.rac2.vip
      1        ONLINE  ONLINE       rac2
ora.scan1.vip
      1        ONLINE  ONLINE       rac1
ora.scan2.vip
      1        ONLINE  ONLINE       rac1
ora.scan3.vip
      1        ONLINE  ONLINE       rac1
[root@rac1 bin]# crsctl status resource ora.rac1.vip
-bash: crsctl: command not found
[root@rac1 bin]#
[root@rac1 bin]# ./crsctl status resource ora.rac1.vip
NAME=ora.rac1.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=INTERMEDIATE on rac2

[root@rac1 bin]# ./crsctl stop resource ora.rac1.vip
CRS-2673: Attempting to stop 'ora.rac1.vip' on 'rac2'
CRS-2677: Stop of 'ora.rac1.vip' on 'rac2' succeeded
[root@rac1 bin]#
[root@rac1 bin]# ./crsctl start resource ora.rac1.vip
CRS-2672: Attempting to start 'ora.rac1.vip' on 'rac1'
CRS-2676: Start of 'ora.rac1.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'rac1'
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'rac1' succeeded
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./crsctl status resource ora.rac1.vip
NAME=ora.rac1.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=ONLINE on rac1

[root@rac1 bin]#
[root@rac1 bin]# ./crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.DATA2.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.asm
               ONLINE  ONLINE       rac1                     Started
               ONLINE  ONLINE       rac2                     Started
ora.gsd
               OFFLINE OFFLINE      rac1
               OFFLINE OFFLINE      rac2
ora.net1.network
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.ons
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1
ora.cvu
      1        ONLINE  ONLINE       rac1
ora.oc4j
      1        ONLINE  ONLINE       rac2
ora.rac1.vip
      1        ONLINE  ONLINE       rac1
ora.rac2.vip
      1        ONLINE  ONLINE       rac2
ora.scan1.vip
      1        ONLINE  ONLINE       rac1
ora.scan2.vip
      1        ONLINE  ONLINE       rac1
ora.scan3.vip
      1        ONLINE  ONLINE       rac1
[root@rac1 bin]#
[root@rac1 bin]#


Possible resource state :-
==============================

Tuesday, August 30, 2016

How to Restore database using Cold Backup in Noarchivelog Mode Without Online Redo Logs

Restoring a Cold Backup in Noarchivelog Mode Without Online Redo Logs
====================================================================

1. Shut down the instance.
2. Copy the control files and data files back from the backup.
3. Start up the database in mount mode.
4. Open the database with the OPEN RESETLOGS clause.



Step 1. Shut Down the Instance
--------------------------------------------------------------------------------------


$ sqlplus / as sysdba
SQL> shutdown abort;


Step 2. Copy the Files Back(datafiles and controlfiles) from the Backup without redo logfiles backup
----------------------------------------------------------------------------------------------------

$ cp <backup directory>/*.* < database file directory>


Step 3. Start Up the Database in Mount Mode
----------------------------------------------------------------------------------------------------

$ sqlplus / as sysdba
SQL> startup mount



Step 4. Open the Database with the OPEN RESETLOGS Clause
--------------------------------------------------------------------------------------------------

SQL> alter database open resetlogs;

you will get error


ORA-01139: RESETLOGS option only valid after an incomplete database recovery


{SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery}


SQL>


SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required


SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> recover database until cancel;
Media recovery complete.
SQL>

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL>


Now, attempt to open your database with the OPEN RESETLOGS clause:
SQL> alter database open resetlogs;



==========================================
>>> Error you will get:-
==========================================


SQL> startup
ORACLE instance started.

Total System Global Area 1043886080 bytes
Fixed Size                  2259840 bytes
Variable Size             654312576 bytes
Database Buffers          381681664 bytes
Redo Buffers                5632000 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 10280
Session ID: 1 Serial number: 5

***Need shut abort and go step 3

In alert log you will get below error:
---------------------------------------------
ALTER DATABASE OPEN
Errors in file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_lgwr_10259.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/bsnl/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_lgwr_10259.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/bsnl/redo01.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_ora_10280.trc:
ORA-00313: open failed for members of log group 1 of thread
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/bsnl/redo01.log'
System state dump requested by (instance=1, osid=10280), summary=[abnormal instance termination].
System State dumped to trace file /u01/app/oracle/diag/rdbms/bsnl/bsnl/trace/bsnl_diag_10249_20160829041454.trc
USER (ospid: 10280): terminating the instance due to error 313
Dumping diagnostic data in directory=[cdmp_20160829041454], requested by (instance=1, osid=10280), summary=[abnormal instance termination].
Instance terminated by USER, pid = 10280