Google it ....

Showing posts with label Rman. Show all posts
Showing posts with label Rman. Show all posts

Saturday, December 23, 2023

how to restore autobackup controlfile or spfile older than 7 days?

when we are trying to restore spfile or controlfile from autobackup appears error:

channel ORA_DISK_1: no autobackup in 7 days found

RMAN> restore spfile from autobackup;

Starting restore at 23-DEC-23

using channel ORA_DISK_1


channel ORA_DISK_1: looking for autobackup on day: 20231223

channel ORA_DISK_1: looking for autobackup on day: 20231222

channel ORA_DISK_1: looking for autobackup on day: 20231221

channel ORA_DISK_1: looking for autobackup on day: 20231220

channel ORA_DISK_1: looking for autobackup on day: 20231219

channel ORA_DISK_1: looking for autobackup on day: 20231218

channel ORA_DISK_1: looking for autobackup on day: 20231217

channel ORA_DISK_1: no autobackup in 7 days found

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 12/23/2023 18:41:09

RMAN-06172: no autobackup found or specified handle is not a valid copy or piece


When you are using RESTORE SPFILE FROM AUTOBACKUP or RESTORE CONTROLFILE FROM AUTOBACKUP,

RMAN begins the search on the current day or on the day specified with the SET UNTIL caluse.

If no autobackup is found in the current or SET UNTIL day, RMAN checks the previous day and so on.

In this way RMAN by default checks for 7 days autobackup from the current or SET UNTIL day.


Solution:

However if you want to extend your searching of autobackup more than 7 days then you have to use
MAXDAYS option with the RESTORE command.

RMAN>restore spfile from autobackup maxdays 30;
or
RMAN>restore controlfile from autobackup maxdays 30;

In these cases autobackup searches will be performed up to 30 days from the current or SET UNTIL day.

Monday, August 3, 2020

ORA-27206: requested file not found in media management catalog

During take backup of Oracle Database through Veritas netbackup, appears below errors:

RMAN-03009: failure of backup command on chan05 channel at 02/08/2020 05:24:23
ORA-19513: failed to identify sequential file
ORA-27206: requested file not found in media management catalog
Solution:
The problem may occurred If you are added your client ip address in master netbackup server while configuring backup policy.
So change client hostname with domain name instead of ip address of client.

Wednesday, July 19, 2017

RMAN warnings RMAN-06207, RMAN-06208 due to mismatched status for snapshot controlfile

Hello, Today I faced next warnings in database backup log :
RMAN-06207: WARNING: 1 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Datafile Copy   /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapc_testdb.f
To solve this warnings we need to change snapshot controlfile name to another file and after that delete mismatched file.

rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Wed Jul 19 18:14:56 2017

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

connected to target database: TESTDB (DBID=2665187923)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name TESTDB are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'DISK' TO '%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapc_testdb.f';

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapc_testdb1.f';
RMAN> crosscheck copy;
RMAN> delete expired copy;

Monday, June 26, 2017

ORA-00230: operation disallowed: snapshot control file enqueue unavailable

Backup job failed because RMAN cannot make a snapshot control file. The message stack is as follows:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 06/25/2017 22:48:44
ORA-00230: operation disallowed: snapshot control file enqueue unavailable
When RMAN needs to back up or resynchronize from the control file, it first creates a snapshot or consistent image of the control file. If one RMAN job is already backing up the control file while another needs to create a new snapshot control file, then you may see the following message:
waiting for snapshot control file enqueue
To determine which job is holding the conflicting enqueue:
SELECT s.SID,
       USERNAME   AS "User",
       PROGRAM,
       MODULE,
       ACTION,
       LOGON_TIME "Logon",
       l.*,
       'alter system kill session '||''''||s.SID||','||s.SERIAL#||','||'@'||s.INST_ID||''''||' immediate;'
  FROM GV$SESSION s, GV$ENQUEUE_LOCK l
 WHERE l.SID = s.SID
   AND l.TYPE = 'CF'
   AND l.ID1 = 0
   AND l.ID2 = 2;
You should see output similar to the following:

SID User Program              Module                    Action           Logon
--- ---- -------------------- ------------------- ---------------- ---------
18 SYS rman@testdb (TNS V1-V3) backup full datafile: c30000110 STARTED 25-JUN-17
After you have determined which job is creating the enqueue, you can do one of the following:
  • Wait until the job holding the enqueue completes
  • kill current job and execute backup again


Tuesday, February 10, 2015

Textual description of firstImageUrl

RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row

When I was trying to connect rman appeared below error:
[oracle@oel6 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Feb 10 15:06:05 2015

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

connected to target database: TESTDB (DBID=2647984357)
RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
ORACLE error from target database:
ORA-19921: maximum number of 128 rows exceeded


RMAN>

This is due too many RMAN connections, if there is not going RMAN backup then we can simple kill that processes.
select 'kill -9 ' || b.SPID,
       a.USERNAME,
       a.MACHINE,
       a.LAST_CALL_ET,
       a.MODULE,
       a.SID,
       a.PROCESS,
       a.EVENT,
       a.ACTION,
       a.osuser
  from v$session a, v$process b
 where a.PADDR = b.ADDR
   and module like '%rman%'
 order by MODULE;

result:





then just kill that processes from operating system
[oracle@oel6 ~]$ kill -9 23285
[oracle@oel6 ~]$ kill -9 23283
[oracle@oel6 ~]$ kill -9 23617
[oracle@oel6 ~]$ kill -9 23646

[oracle@oel6 ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Feb 10 15:59:14 2015

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

connected to target database: TESTDB (DBID=2647984357)

RMAN>

Tuesday, March 11, 2014

Duplicate database from ASM to non ASM Database using RMAN

Operating system --- Oracle Linux 6
Database --- 11G R2
Today i show you how to duplicate database which is in ASM to non ASM on different host.
Target --- database with ASM which is used to create another database on another host.
Destination --- database which located on file system will be created from target.

For duplication there is two method: from backup and from active database, here is described active database duplication.

On destination already installed Oracle Software.
1) transfer password file from target to destination.
2) on destination register listener with static registration.
3) on Target, create pfile, transfer it to destination host and modify next parameters:
*.audit_file_dest =/u01/app/oracle/testdup/adump
*.db_name ="testdup"
*.instance_name =testdup
*.control_files =/u01/app/oracle/testdup/control01.ctl
*.db_file_name_convert =("+DATA","/u01/app/oracle/testdup")
*.log_file_name_convert =("+DATA","/u01/app/oracle/testdup")
*.undo_management =AUTO
*.undo_tablespace='UNDOTBS1'
*.db_block_size=8192

4) on destination, create corresponding directories with oracle O/S user.
5) export new sid and start instance;
export ORACLE_SID=testdup
sqlplus / as sysdba
startup nomount pfile=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/inittestdup.ora;

6) on destination:
rman target sys/password@orcl auxiliary sys/password@testdup
duplicate database to testdup from active database;


Possible Errors:
You can get some errors , cann't restore datafile & onlineredo log files, in this case you need to create directory ,It should be indicate.
testdup/datafile
testdup/onlinelog


That's all, good luck.

Thursday, February 27, 2014

Textual description of firstImageUrl

ORA-16038: log cannot be archived ORA-19809: limit exceeded for recovery files

When I was making backup with rman it was throwing error:
ORA-16038: log cannot be archived 
ORA-19809: limit exceeded for recovery files
Here is video of these procedures - ORA-16038: log cannot be archived ORA-19809: limit exceeded for recovery files
firts we need to check alert.log that shows next:
ARC3: Error 19809 Creating archive log file to '+DISKS'
Errors in file /u0/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_arc0_3481.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 5218762752 bytes is 100.00% used, 
and has 0 remaining bytes available.
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
   then consider changing RMAN ARCHIVELOG DELETION POLICY.
2. Back up files to tertiary device such as tape using RMAN
   BACKUP RECOVERY AREA command.
3. Add disk space and increase db_recovery_file_dest_size parameter to
   reflect the new space.
4. Delete unnecessary files using RMAN DELETE command. If an operating
   system command was used to delete files, then use RMAN CROSSCHECK and
   DELETE EXPIRED commands.
************************************************************************


Now we know what is problem, we have flash recovery area which is full, check it:
SQL> show parameter db_recovery_file_dest;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      +DISKS
db_recovery_file_dest_size           big integer 4977M

select * from v$flash_recovery_area_usage;

result:




flash recovery area is full therefore, we have two option to solve this problem:
1) add size to flash_recovery_area if we have free disk space.
SQL> alter system set db_recovery_file_dest_size=XG; (larger amount)

2) delete some archivelogs for free up flash_recovery_area.
RMAN> crosscheck archivelog all;
....
RMAN> delete expired archivelog all;
....
RMAN> delete obsolete;


that's all.
Thank you :)

Friday, December 6, 2013

ORA-19606: Cannot copy or restore to snapshot control file

Hello,
when delete obsolete backups and archivelogs appears next error:
RMAN> delete obsolete;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of delete command on ORA_DISK_1 channel at 12/05/2013 15:27:49
ORA-19606: Cannot copy or restore to snapshot control file

First of all check rman permanent parameters:
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 
'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl1.f'; # default

Cause: A control file copy or restore operation specified the name of the
snapshot control file as the output file. It is not permitted to
overwrite the snapshot control file in this manner. Other
methods are available to create the snapshot control file.
Action: Specify a different file name and retry the operation. If this
is a restore, then the restore conversation remains active and
more files may be specified.
Solution:
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO 
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snap_orcl1.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbs/snap_orcl1.f';
new RMAN configuration parameters are successfully stored

after that we can delete obsolete files with command:
RMAN> delete obsolete;

good by :)

Tuesday, September 3, 2013

ORA-03113: end-of-file on communication channel

Hello,
While trying to open database encounter that error : ORA-03113: end-of-file on communication channel
[oracle@oel6 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Productionon Tue Sep 3 14:31:43 2013
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    637537664 bytes
Database Buffers   188743680 bytes
Redo Buffers      6590464 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 13889
Session ID: 10 Serial number: 3
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

Now see alert.log file
[oracle@oel6 admin]$ cd /u0/app/oracle/diag/rdbms/orcl/orcl/trace/
tail -100 alert_orcl.log

shows last 100 row in alert log file, which tells that
ORA-19815: WARNING: db_recovery_file_dest_size of 5368709120 bytes is 100.00% used, and has 0 remaining bytes available.
We have following choices
1) Add disk space and increase db_recovery_file_dest_size parameter
2) Delete unnecessary files using RMAN DELETE command. If an operating
system command was used to delete files, then use RMAN CROSSCHECK and
DELETE EXPIRED commands.
now we show second method, delete archivelogs with operating system command.
[oracle@oel6 trace]$ . oraenv
ORACLE_SID = [+ASM] ? 
The Oracle base remains unchanged with value /u0/app/oracle
[oracle@oel6 trace]$ asmcmd
ASMCMD> cd Disks/orcl/archivelog
ASMCMD> ls
2013_06_30/
2013_07_01/
2013_07_02/
2013_07_03/
2013_07_04/
2013_07_05/
2013_07_06/
2013_07_07/
2013_07_08/
2013_07_09/
2013_07_10/
2013_07_11/
2013_07_12/
2013_09_03/
ASMCMD> rm -rf 2013_06_30/
ASMCMD> rm -rf 2013_07_01/ 
ASMCMD> rm -rf 2013_07_02/ 2013_07_03/
ASMCMD> rm -rf 2013_07_04/ ....

after that we can startup database
[oracle@oel6 trace]$ . oraenv
ORACLE_SID = [+ASM] ? orcl
The Oracle base remains unchanged with value /u0/app/oracle
[oracle@oel6 trace]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Tue Sep 3 15:28:41 2013

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

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size      2232960 bytes
Variable Size    637537664 bytes
Database Buffers   188743680 bytes
Redo Buffers      6590464 bytes
Database mounted.
Database opened.
SQL> 

And then use crosschek and delete expired commands.
SQL> !rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Sep 3 15:32:32 2013

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

connected to target database: ORCL (DBID=1332821480)

RMAN> crosscheck archivelog all;
................................
................................
RMAN> delete expired archivelog all;

that's all.
thank you.