How to catalog backup located on TAPE in RMAN?

If you are using Symantec Netbackup as a backup server, the following command will be useful for you:

1. To list available files located on tape taken by some client, run the following:

# /usr/openv/netbackup/bin/bplist -C r2n1 -t 4 -l -R /

where,

-C     client name
-t     is a policy type , where 4 means Oracle
-l     shows more details info
-R    recursively
/     root directory

–output

-rw-rw---- oracle oinstall 18939648K Aug 11 04:48 /al_dMEDIA_s3941_p1_t791009326_T20120811

2.  In my case this backuppiece is taken by r2n1 client and now I am cataloging it on orcl client. That’s why I need to pass additional parameters to channel. If these clients are the same , parameters are not necessary. (If you have some problem, like orcl can’t see r2n1’s backups see my post about alternate client)

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_CLIENT=r2n1,NB_ORA_SERV=JUS-BACKUP01)';

RMAN> catalog device type 'SBT_TAPE' backuppiece 'al_dMEDIA_s3941_p1_t791009326_T20120811';

3. If you want to clear your configuration do the following,or skip this step.

CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' CLEAR;

That’s all, good luck!

ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

Error description:

SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

Cause:

The database was crashed itself or you issued shutdown abort or startup force commands.

In my case I issued the following command, to take database into mount state.

SQL> startup mount force;

Solution:

SQL> select status from v$instance;

STATUS
————————————
MOUNTED

SQL> alter database open;

Database altered.

SQL> shutdown immediate;

Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 293601280 bytes
Fixed Size 1248600 bytes
Variable Size 88081064 bytes
Database Buffers 197132288 bytes
Redo Buffers 7139328 bytes
Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

 

 

 

ORA-29701: unable to connect to Cluster Synchronization Service

Error:

ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service

Solution:

[grid@orcl ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 20 21:26:26 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
SQL> exit

[grid@orcl ~]$ crsctl start resource ora.cssd
CRS-2672: Attempting to start ‘ora.cssd’ on ‘orcl’
CRS-2679: Attempting to clean ‘ora.diskmon’ on ‘orcl’
CRS-2681: Clean of ‘ora.diskmon’ on ‘orcl’ succeeded
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘orcl’
CRS-2676: Start of ‘ora.diskmon’ on ‘orcl’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘orcl’ succeeded

[grid@orcl ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Mon Aug 20 21:32:40 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ASM instance started

Total System Global Area 283930624 bytes
Fixed Size 2212656 bytes
Variable Size 256552144 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>

ASM disk mapping to physical device

To find which ASM disk maps to which physical device, run  the following:

[root@orcl ~]# /etc/init.d/oracleasm querydisk -p VOL1
Disk “VOL1″ is a valid ASM disk
/dev/sdd1: LABEL=”VOL1″ TYPE=”oracleasm”

Reducing a root LVM

In this post I want to reduce root volume to free up the space for other volumes. Let’s discuss it step by step:

1. Download Linux system rescue disk such as SYSTEMRESCUECD or KNOPPIX available as a bootable CD-ROM . I prefer systemrescuecd.

Official site for systemrescuecd: http://www.sysresccd.org . Direct download link is this.
Official site for knoppix: http://www.knoppix.net

2.  Boot  SYSTEMRESCUECD on start-up. This step is done because we need volume, that should be shrunk, to be unmounted. As you know root volume cannot be unmounted when the OS is running on it.

3.  Make all LVM volumes found available to the rescue kernel:

root@sysresccd ~ % lvm vgchange -a y

4. List logical volume names:

root@sysresccd ~ % ls /dev/VolGroup00/
LogVol00 LogVol01

5. Before shrinking file system , it is recommended to check file system and fix any errors:

root@sysresccd ~ %  e2fsck -f /dev/VolGroup00/LogVol00

6. After the check is successful, shrink the file system on LVM. I am reducing it to 50G.

root@sysresccd ~ % resize2fs -f /dev/VolGroup00/LogVol00 50G

7.  Re-run e2fsck.

root@sysresccd ~ %  e2fsck -f /dev/VolGroup00/LogVol00

8.  Now reduce the logical volume itself to 50G.

root@sysresccd ~ % lvm lvreduce -L50G /dev/VolGroup00/LogVol00

Note : If you want to reduce size of the volume by some value, you should use minus sign in front of the number value like : –L  -50G.

Reboot the system.

Netbackup Restore by alternate client(Error: client is not validated to perform the requested operation)

Hello all,

If you have the following error “client is not validated to perform the requested operation” during restore, then you need to grant permission for the alternate client to access images other than it’s own.

Steps are the following:

1. Create a folder <Netbackup install path>\NetBackup\db\altnames.

2. If you want any client were able to restore any other clients backups, then create file named  “No.Restrictions”.(Note file name must not have any other extensions like .txt)

3. To grant one specified client a permission to browse and restore backups made by another client, create a file with the same name as the requesting client(with no extension like .txt) and write the name of the source client into the file.

Example: r2n1t should access r2n1 files:

Create folder C:\Program Files\Veritas\NetBackup\db\altnames
create file r2n1t and write r2n1 in it

That’s all.

ORA-19554, ORA-27211: Failed to load Media Management Library

Error text:

RMAN-03009: failure of allocate command on t1 channel at 03/30/2011 15:18:21
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information:2

Solution:

/usr/openv/netbackup/bin/libobk.so64 should have r-xr-xr-x

Or make link in $ORACLE_HOME/lib

cd $ORACLE_HOME/lib
ln -s /usr/openv/netbackup/bin/libobk.so64 libobk.so