Snapshot Too Old Error

The ORA-1555 or Snapshot Too Old errors are reported when the read consistent images are unavailable in the Undo tablespace. This happens when there is not enough space in the Undo tablespace to retain the undo records for the long running queries.

Snapshot Too Old Error detected: SQL ID 3jgzkm92q02i8, Snapshot SCN 0x074c.3280364e, Recent SCN 0x074c.33f38d0c, Undo Tablespace UNDOTBS1, Current Undo Retention 14542.

INVESTIGATION and SOLUTION

Tune the SQL

Find sql from v$sql or dba_hist_sqltext, and tune it accordingly

SQL> select SQL_TEXT, SQL_FULLTEXT from v$sql where sql_Id='3jgzkm92q02i8';

SQL>  select SQL_TEXT from DBA_HIST_SQLTEXT where sql_Id='3jgzkm92q02i8';

Check and Increase UNDO_RETENTION

SQL> show parameter undo_retention

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_retention                       integer     1000

SQL> select max(maxquerylen) from v$UNDOSTAT;

MAX(MAXQUERYLEN)
----------------
            1961

SQL> select max(maxquerylen) from DBA_HIST_UNDOSTAT;

MAX(MAXQUERYLEN)
----------------
           22330

Set UNDO_RETENTION to the max of the above values, and make sure the UNDO tablespace has big enough space.

SQL> alter system set UNDO_RETENTION=23000;

UNDO Tablespace Size Advisor

To Get The Output using the historical information in memory :

SQL> SELECT 'The Required undo tablespace size using Statistics In Memory is ' || dbms_undo_adv.required_undo_size(900) || ' MB' required_undo_size FROM dual;

REQUIRED_UNDO_SIZE
-----------------------------------------------------------------------------------------------------------
The Required undo tablespace size using Statistics In Memory is 2048 MB

To Get The Output using Begin/End AWR snapshot id :

SQL> SELECT 'The Required Undo tablespace size During This AWR snaps Range is ' || dbms_undo_adv.required_undo_size(900,SYSDATE-1/24, SYSDATE) || ' MB' required_undo_size FROM dual;

REQUIRED_UNDO_SIZE
------------------------------------------------------------------------------------------------------------
The Required Undo tablespace size During This AWR snaps Range is 2048 MB

Monitor UNDO Tablespace

The V$UNDOSTAT view holds undo statistics for 10-minute intervals, which represents statistics across instances, thus each begins time, end time, and statistics value will be a unique interval per instance.

Column nameMeaning
BEGIN_TIMEThe beginning time for this interval check
END_TIMEThe ending time for this interval check
UNDOTSNThe undo tablespace number
UNDOBLKSThe total number undo blocks consumed during the time interval
TXNCOUNTThe total number of transactions during the interval
MAXQUERYLENThe maximum duration of a query within the interval
MAXCONCURRENCYThe highest number of transactions during the interval
UNXPSTEALCNTThe number of attempts when unexpired blocks were stolen from other undo segments to satisfy space requests
UNXPBLKRELCNTThe number of unexpired blocks removed from undo segments to be used by other transactions
UNXPBLKREUCNTThe number of unexpired undo blocks reused by transactions
EXPSTEALCNTThe number of attempts when expired extents were stolen from other undo segments to satisfy a space request
EXPBLKRELCNTThe number of expired extents stolen from other undo segments to satisfy a space request
EXPBLKREUCNTThe number of expired undo blocks reused within the same undo segments
SSOLDERRCNTThe number of ORA-1555 errors that occurred during the interval
NOSPACEERRCNTThe number of Out-of-Space errors

RMAN-06091: no channel allocated for maintenance

After Oracle databases migrated to different versions, the following errors occur from a couple of RMAN backups, which have been working find in old version databases.

It happens for some Oracle databases applied the latest RU/RUR/BP, etc.

...
..
.
RMAN-03002: failure of crosscheck command at 08/04/2021 13:51:11
RMAN-06091: no channel allocated for maintenance (of an appropriate type)

CAUSE & WORKAROUND

It is a known bug for all database versions until 19c.

Subscribe to get access

Read more of this content when you subscribe today.

ORA-01078 When running Dbca Delete Database

When trying to delete a database by running dbca, the following errors appear:

$  dbca  -silent -deleteDatabase -sourceDB TESTDB -sysDBAUserName sys  -sysDBAPassword "sys_password"
ORA-01078: failure in processing system parameters

SOLUTION

  1. Remove the entry in /etc/oratab for this database to be deleted.
  2. Make sure here sourceDB name is actually UNIQUE_DB_NAME, instead of DB_NAME. 
$  dbca  -silent -deleteDatabase -sourceDB TESTDB_UQ sysDBAUserName sys  -sysDBAPassword "sys_password"
Connecting to database
9% complete
14% complete
19% complete
23% complete
28% complete
33% complete
38% complete
47% complete
Updating network configuration files
48% complete
52% complete
Deleting instances and datafiles
66% complete
80% complete
95% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/TESTDB.log" for further details.

How to Create Password File on ASM diskgroup

1) Make sure compatible.asm at least 12.1.

SQL> SELECT NAME,VALUE,GROUP_NUMBER FROM V$ASM_ATTRIBUTE where name like '%compatible%'

NAME                                     VALUE                                                                  GROUP_NUMBER
---------------------------------------- ---------------------------------------------------------------------- ------------
compatible.asm                           19.0.0.0.0                                                                        1
compatible.rdbms                         11.2.0.4                                                                          1
compatible.advm                          19.0.0.0                                                                          1
compatible.asm                           19.0.0.0.0                                                                        2
compatible.rdbms                         11.2.0.4.0                                                                        2
compatible.advm                          19.0.0.0.0                                                                        2

6 rows selected.

2) Create password by using ‘pwcreate’.

ASMCMD> pwcreate --dbuniquename TESTDB '+datac1/TESTDB/password/pwdtestdb'
Enter password: *********
ASMCMD>

3) Verify the password by :

$ crsctl stat res ora.testdb.db -f | grep PWFILE
PWFILE=+DATAC1/TESTDB/PASSWORD/pwdtestdb

For 11.2, there is no support for this feature.

$ crsctl stat res ora.testdb.db -f | grep PWFILE
PWFILE=

Please note:

Create new password file. Need after database and instances are added into CRS by ‘srvctl add database’ and ‘srvctl add instance’. Otherwise the following errors will occur:

OPW-00021: Failed to retrieve DB password file location from the CRS resource
ASMCMD-9454: could not create new password file

ASMCMD> pwcreate –dbuniquename RAC19DBA +DATA Enter password: **