Friday 22 August 2014

BACKUP Failure - TAPE Issue

When I run Backup,

i got the following error.

Starting backup at 
executing global script: ll1
current log archived
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03015: error occurred in stored script ll1

Additional information: 2
ORA-27211: Failed to load Media Management Library
ORA-19554: error allocating device, device type: SBT_TAPE, device name: 
RMAN-03002: failure of backup command at 


when I check,


]$sbttest test
The sbt function pointers are loaded from oracle.static library.
libobk.so could not be loaded. Check that it is installed

Backup has not happened after database upgrade.

Solution:


After upgarde DB will have new home.

In the new home path,  libobk.so should be linked to backup vendor supplied rman library.

Then we have made a link,

]$ cd $ORACLE_HOME/lib
]$ln -s /usr/lib/libora.so libobk.so


Now if i check,

]$ls -lrt lib*
lrwxrwxrwx 1 oracle oinstall     libobk.so -> /usr/lib/libora.so



After that backup was running fine. Even sbttest libora.so succeeded.






Tuesday 1 July 2014

returning error ORA-16191

Hi,

Issue - Standby not in sync

Version - oracle 11g

Error in alert log file -

PING[ARC1]: Heartbeat failed to connect to standby ‘STANDBY’. Error is 16191.
Sat Aug 06 02:06:52 2011
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191

If you face the above error in your 11g standby setup, then do not waste your time with investigating unnecessary things. First check listener status at both sites and then check remote_login_passwordfile.
It should be shared or exclusive.

Most probably the above said things would be fine.

So just copy your primary password file to standby passwordfile location.($ORACLE_HOME/dbs).

Now check your RFS & MRP process it would be running.

If not just restart the MRPO process. :)

To Stop MRP

SQL>alter database recover managed standby database cancel

To Start MRP (If your environment is real time apply then use second command to restart MRP)

SQL>alter database recover managed standby database disconnect from session;

SQL>alter database recover managed standby database using current logfile disconnect from session;

Thank u..


Monday 23 June 2014

RAC Nodes Time Difference issue bcoz of NTP in 11gR2

In One of our client Time difference between the nodes were keep on increasing drastically.

I fed up by setting that manually between the nodes.

Finally Got a permanent Solution.

We have configured time synchronization using NTP network protocol. But late we have decided oracle to manage the time sync.

For this we have to stop NTP & enable CTSS thats it.. :)

CTSS - Cluster time synchronization Service.


 Time Synchronization – Steps

(Needs to be tested on a test Setup  -  Not tested)

1.       Stop the database

Oracle]$srvctl stop database –d erpdb –o immediate

2.Stop all cluster related services on both the nodes (stopping HAS would stop all the services)
Grid]$crsctl stop has

3.Stop ntp process and remove all the configuration files related to ntpd
# /sbin/service ntpd stop
#/sbin/service ntpd status
#chkconfig ntpd off
#mv  /etc/ntp.conf   /etc/ntp.conf_bkp

Remove the ntpd.pid file.
#rm  /var/run/ntpd.pid
Or  #mv /var/run/ntpd.pid /var/run/ntpd.pid_bkp

4.Now set the date by using date command in Linux by keeping 3 seconds difference between both Nodes
For Example:
Node1]date –s   12:00:00
Node]date –s  12:00:03

       5.As of Now ctss is in observer Mode.
       Reboot Both Nodes, Start high availability Service,

      6. Now check ctss status
      Grid]$crsctl check ctss
      It should be in Active Mode

      7.Start the database and related Services.

Friday 20 June 2014

Creating a Manual Standby from RMAN Backup and switching it to primary

Please find the steps that I have followed,
1.Move Rman backup to Standby Server,
sql>startup nomount;
>rman target /
rman > restore standby controlfile from '/backup/rman/hhhhh';
rman> sql "alter database mount standby database"
rman > catalog backuppiece '/backup/rman/hhhh';
rman > catalog backuppiece '/backup/rman/hhhh';
run
{
set newname for datafile 4 to '/oradata1/db/data/users01.dbf';
set newname for datafile 3 to '/oradata1/db/data/undotbs01.dbf'; 
set newname for datafile 2 to '/oradata1/db/data/sysaux01.dbf';        
set newname for datafile 1 to '/oradata1/db/data/system01.dbf';
set newname for datafile 5 to '/oradata1/db/data/undotbs02.dbf';
set newname for datafile 6 to '/oradata1/db/data/indx_1.dbf';    
set newname for datafile 7 to '/oradata1/db/data/16k.dbf';
set newname for datafile 8 to '/oradata1/db/data/bs.dbf';
set newname for datafile 9 to '/oradata1/db/data/er.dbf';        
set newname for datafile 10 to '/oradata1 db/data/prod.dbf'; 
set newname for datafile 11 to '/oradata2/db/data/prod_2.dbf';
set newname for datafile 12 to '/oradata2/db/data/prod_3.dbf';
set newname for datafile 13 to '/oradata2/db/data/prod_4.dbf';
set newname for datafile 14 to '/oradata2/db/data/rman.dbf';
set newname for datafile 15 to '/oradata2/db/data/om.dbf';
set newname for datafile 16 to '/oradata2/db/data/om_1.dbf';
set newname for datafile 17 to '/oradata2/db/data/ys.dbf';
set newname for datafile 18 to '/oradata2/db/data/example.dbf';
set newname for datafile 19 to '/oradata2/db/data/prod_5.dbf';
set newname for datafile 20 to '/oradata2/db/data/01.dbf';
set newname for datafile 21 to '/oradata2/db/data/system02.dbf';
set until scn 2281756927;
Restore database;
Switch datafile all;
Recover database;
}
sql> Recover standby database;
2.To open the database,
sql> Alter database recover managed standby database finish force;
sql>Alter database commit to switchover to primary;
sql>alter database open;
(While opening the database, it will try to create redologs on the specified path in controlfile.
If that path physically does not exist, it will fail.. We can create new redolgs here by specifying rename command -SQL)

>lsnrctl start