Monday, June 4, 2018

ORA-45161: The backup piece size cannot exceed database DISK_RESERVED_SPACE

The database size is 30g and it was created  with 10g reserved space in RA:

SQL> conn rasys/welcome1
SQL> exec dbms_ra.add_db(db_unique_name=>'o11203',protection_policy_name =>'gold', reserved_space=>'10g');
SQL> exec dbms_ra.grant_db_access (db_unique_name=>'o11203',username => 'FD');




 

Documentation says about reserved_space: "Theamount of disk space that is guaranteed to be available for the protected database." 
As i understand it is minimum space quota guaranteed to the database.
So, the database IS ALLOWED to use more space !

But in real life well running backup may stumble on this threshold.
Demo:


[oracle@el01ac03-db01 rman_scripts]$ rman target / catalog FD/welcome1@zdlra | tee backup-FD-06041801.log

Recovery Manager: Release 11.2.0.3.0 - Production on Mon Jun 4 18:11:43 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: O11203 (DBID=4136710722)
connected to recovery catalog database

RMAN> @backup.rman

RMAN> # rman target / catalog o11203/welcome1@zdlra | tee backup.log
2>
3> RUN
4> {
5> ALLOCATE CHANNEL ch01 DEVICE TYPE sbt_tape
6> PARMS='SBT_LIBRARY=/u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libra.so,
7> ENV=(RA_WALLET=LOCATION=file:/u01/app/oracle/product/11.2.0.3/dbhome_1/dbs/zdlra CREDENTIAL_ALIAS=z01ingest-scan.distr.fors.ru:1521/zdlra)'
8> FORMAT '%U_%d';
9>
10> backup incremental level 1 database tag 'B-FD-06041801'
11> plus archivelog tag 'A-FD-06041801' delete all input;
12>
13> }
starting full resync of recovery catalog
full resync complete
allocated channel: ch01
channel ch01: SID=17 device type=SBT_TAPE
channel ch01: RA Library (ZDLRA) SID=6DD35AACCF834020E05375051FACCC5E


Starting backup at 2018-JUN-04 18:11:55
current log archived
channel ch01: starting archived log backup set
channel ch01: specifying archived log(s) in backup set
input archived log thread=1 sequence=688 RECID=629 STAMP=977940207
input archived log thread=1 sequence=689 RECID=630 STAMP=977940443
input archived log thread=1 sequence=690 RECID=631 STAMP=977940447
input archived log thread=1 sequence=691 RECID=632 STAMP=977940507
input archived log thread=1 sequence=692 RECID=633 STAMP=977940715
channel ch01: starting piece 1 at 2018-JUN-04 18:11:57
channel ch01: finished piece 1 at 2018-JUN-04 18:12:12
piece handle=01t4kc7d_1_1_O11203 tag=A-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:15
channel ch01: deleting archived log(s)
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_688_fkbo5y8r_.arc RECID=629 STAMP=977940207
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_689_fkbofbjf_.arc RECID=630 STAMP=977940443
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_690_fkbofhlt_.arc RECID=631 STAMP=977940447
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_691_fkbohc78_.arc RECID=632 STAMP=977940507
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_692_fkboovy8_.arc RECID=633 STAMP=977940715
Finished backup at 2018-JUN-04 18:12:12

Starting backup at 2018-JUN-04 18:12:12
channel ch01: starting incremental level 1 datafile backup set
channel ch01: specifying datafile(s) in backup set
input datafile file number=00005 name=/oradata/o11203/yu_oe01.dbf
input datafile file number=00003 name=/oradata/o11203/undotbs01.dbf
input datafile file number=00001 name=/oradata/o11203/system01.dbf
input datafile file number=00002 name=/oradata/o11203/sysaux01.dbf
input datafile file number=00004 name=/oradata/o11203/users01.dbf
channel ch01: starting piece 1 at 2018-JUN-04 18:12:13
released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 06/04/2018 18:14:09
ORA-27030: skgfwrt: sbtwrite2 returned error
ORA-19511: Error received from media manager layer, error text:
   KBHS-01404: See trace file /u01/app/oracle/diag/rdbms/o11203/o11203/trace/sbtio_16416_140594550974208.log for details
KBHS-00719: Error 'recovery appliance Error'; ORA-45161: The backup piece size cannot exceed database DISK_RESERVED_SPACE.
ORA-45199: Error ORA-45161: The backup piece size cannot exceed database DISK_RESERVED_SPACE.


RMAN>
RMAN> **end-of-file**
RMAN>


The ZDLRA Admin Guide say:



Let try increase quota :




And repeate backup job:

Starting backup at 2018-JUN-04 18:27:51
channel ch01: starting incremental level 1 datafile backup set
channel ch01: specifying datafile(s) in backup set
input datafile file number=00005 name=/oradata/o11203/yu_oe01.dbf
input datafile file number=00003 name=/oradata/o11203/undotbs01.dbf
input datafile file number=00001 name=/oradata/o11203/system01.dbf
input datafile file number=00002 name=/oradata/o11203/sysaux01.dbf
input datafile file number=00004 name=/oradata/o11203/users01.dbf
channel ch01: starting piece 1 at 2018-JUN-04 18:27:52

channel ch01: finished piece 1 at 2018-JUN-04 18:32:07
piece handle=04t4kd58_1_1_O11203 tag=B-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:04:15
channel ch01: starting incremental level 1 datafile backup set
channel ch01: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ch01: starting piece 1 at 2018-JUN-04 18:32:08
channel ch01: finished piece 1 at 2018-JUN-04 18:32:09
piece handle=05t4kdd7_1_1_O11203 tag=B-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:01
Finished backup at 2018-JUN-04 18:32:09

Starting backup at 2018-JUN-04 18:32:09
current log archived
channel ch01: starting archived log backup set
channel ch01: specifying archived log(s) in backup set
input archived log thread=1 sequence=721 RECID=662 STAMP=977941929
channel ch01: starting piece 1 at 2018-JUN-04 18:32:11
channel ch01: finished piece 1 at 2018-JUN-04 18:32:12
piece handle=06t4kddb_1_1_O11203 tag=A-FD-06041801 comment=API Version 2.0,MMS Version 12.2.0.1
channel ch01: backup set complete, elapsed time: 00:00:01
channel ch01: deleting archived log(s)
archived log file name=/oradata/fra/O11203/archivelog/2018_06_04/o1_mf_1_721_fkbpvsot_.arc RECID=662 STAMP=977941929
Finished backup at 2018-JUN-04 18:32:12
released channel: ch01

RMAN>
RMAN> **end-of-file**

The error is disappeared !

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Does DEALLOCATE UNUSED or SHRINK SPACE will free space occupied by LOB segment?

Lets check how it works. My env is DB 19.20@Linux-x64 1) I created the table with 4 LOB columns of 4 different LOB types: BASICFILE BLOB, BA...