• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ORA-19554: error allocating device, device type: SBT_TAPE, device name:

by admin

The Problem

Received below error while restoring COLD backup of source database using RMAN at target server.

RMAN> run{
2> restore database;
3> }

Starting restore at 07-SEP-16
RMAN-06908: WARNING: operation will not run in parallel on the allocated channels
RMAN-06909: WARNING: parallelism require Enterprise Edition
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=391 device type=DISK
released channel: ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/07/2016 23:17:38
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information: 2

The Solution

The reason of this failure is that on source database server has SBT_TAPE device type configured in RMAN( and we are using control file of source DB hence all SBT_TAPE decive configuration exists at target DB) while on target server there was no Tape Drive attached to it.

RMAN> show all;

RMAN configuration parameters for database with db_unique_name ERPLN are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';

1. On target server, just clear the device type from SBT_TAPE to default device type which is disk using below command or you can explicitly allocate channels of device type inside RUN{} RMAN block to override its permanent configuration. In this case, I have cleared SBT_TAPE device type setting to default.

RMAN> CONFIGURE DEFAULT DEVICE TYPE CLEAR;

2. old RMAN configuration parameters:

CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
RMAN configuration parameters are successfully reset to default value

3. Now try restoring the database again.

RMAN> run{
2> restore database;
3> }

Starting restore at 07-SEP-16
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=391 device type=DISK

channel ORA_DISK_1: restoring datafile 00001
input datafile copy RECID=244 STAMP=921971779 file name=/orabackup/PROD/ORADB/system01.dbf
destination for restore of datafile 00001: /oracle/oradata/PROD/system01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00001
output file name=/oracle/oradata/PROD/system01.dbf RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00002
input datafile copy RECID=246 STAMP=921971780 file name=/orabackup/PROD/ORADB/undotbs01.dbf
destination for restore of datafile 00002: /oracle/oradata/PROD/undotbs01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00002
output file name=/oracle/oradata/PROD/undotbs01.dbf RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00003
input datafile copy RECID=243 STAMP=921971779 file name=/orabackup/PROD/ORADB/sysaux01.dbf
destination for restore of datafile 00003: /oracle/oradata/PROD/sysaux01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00003
output file name=/oracle/oradata/PROD/sysaux01.dbf RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00004
input datafile copy RECID=247 STAMP=921971780 file name=/orabackup/PROD/ORADB/users01.dbf
destination for restore of datafile 00004: /oracle/oradata/PROD/users01.dbf
channel ORA_DISK_1: copied datafile copy of datafile 00004
output file name=/oracle/oradata/PROD/users01.dbf RECID=0 STAMP=0
channel ORA_DISK_1: restoring datafile 00005
input datafile copy RECID=237 STAMP=921971779 file name=/orabackup/PROD/ORADB/erplntoolsdat01.dbf
destination for restore of datafile 00005: /oracle/oradata/PROD/erplntoolsdat01.dbf

RMAN channel allocation failing when using Cohesity tape device

You might get similar error while taking backup using Cohesity tape device as shown below:

RMAN> connect catalog *
2> connect target *
3> run {
4> allocate channel t1 type 'sbt_tape' parms
5> 'SBT_LIBRARY=/lib/libcohesity.so, SBT_PARMS=(mount_path=..........)';
6> allocate channel t2 type 'sbt_tape' parms
7> 'SBT_LIBRARY=/lib/libcohesity.so, SBT_PARMS=(mount_path=..........)';
8> set command id to 'BAC_38470076';
9> backup filesperset=1 format 'db_%d_%U' (archivelog all not backed up);
10> }
11> exit;
connected to recovery catalog database

connected to target database: STRTOR4P (DBID=2948786404)

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on t1 channel at 10/18/2021 23:42:28
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-00447: fatal error in background process

The trace directory in which the sbtio.log file is created is missing on the server. RMAN is able to allocate the channel after manually created directory structure in which the sbtio.log file is created.

1. Manually created the trace directory like below:

$ mkdir -p $ORACLE_BASE/diag/rdbms/$ORACLE_SID/[INSTANCE_NAME]/trace

2. Test the channel allocation:

run
{
allocate channel t1 type 'sbt_tape' parms 'SBT_LIBRARY=//lib/libcohesity.so, SBT_PARMS=(mount_path=xxxxxx, vips=xxxxx, gflag-name=sbt_use_grpc,gflag-value=true)';
release channel t1;
}

Filed Under: oracle, RMAN

Some more articles you might also be interested in …

  1. Oracle Database: Profile Limits (Resource Parameter(s)) Are Not Enforced / Do Not Work
  2. Understanding Device Persistence and Oracle ASMLib
  3. How to move a datafile from file system to ASM
  4. ORA-30012 Database Does Not Start With UNDO_MANAGEMENT=AUTO – Oracle Database 11gr2
  5. Oracle RAC: How to modify private hostname, Private network IP & MTU
  6. Script to verify the Oracle DataPump Data Dictionary Catalog
  7. Oracle RMAN Backup Shell Script Example
  8. RMAN Pluggable Database Backup and Recovery in a Multitenant Environment
  9. How to Create or Remove Restore Point on Oracle Standby database
  10. How to Drop Existing Temporary Tablespace and create new in Oracle 11g

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright