Wednesday, May 25, 2022
EBS Asserter IDCS
Friday, April 8, 2022
Implications of latest Oracle WebLogic Server connection filters for Oracle EBS r12.2 customers
Wednesday, March 2, 2022
Here’s how a 22-year-old made $1 million by selling NFT selfies
Here’s how a 22-year-old made $1 million by selling NFT selfies
RMAN-06023: no backup or copy of datafile number found to restore
Hi,
Sometimes You can get “RMAN-06023: no backup or copy of datafile number found to restore ” error.
RMAN-06023: no backup or copy of datafile number found to restore
Details of error are as follows.
Details of error are as follows.
RMAN-06023: no backup or copy of datafile number found to restore Cause: A datafile, tablespace, or database restore could not proceed because no backup or copy of the indicated file was found. It may be the case that a backup or copy of this file exists but does not satisfy the criteria specified in the user's restore operands. Action: None - this is an informational message. See message 6026 for further details.This error is related with autobackups in FRA ( Flash Recovery Area ), There are backup files but they are belonged to different incarnation than the available backups current incarnation.
To solve this error, reset the db_recovery_file_dest and db_recovery_file_dest_size parameters, and RMAN will not look for these files in the FRA.
SQL> alter system reset db_recovery_file_dest_size scope=spfile sid='*'; System altered.
RMAN-03002: failure of restore command at 03/05/2015 18:03:28 RMAN-06026: some targets not found - aborting restore RMAN-06023: no backup or copy of datafile 4 found to restore RMAN-06023: no backup or copy of datafile 3 found to restore RMAN-06023: no backup or copy of datafile 2 found to restore
SQL> alter system reset db_recovery_file_dest scope=spfile sid='*'; System altered.Restart database as follows.
SQL> shutdown immediate; SQL> startup
Script to monitor RMAN progress
Question: I have a long running RMAN job, and I want a script to monitor the progress of RMAN execution. How do you monitor RMAN progress?
Answer: Oracle has several views that can monitor long running jobs, including v$session_longops and v$process with v$session. Also see RMAN backup scripts from Windows DOS scripts for RMAN automated backups and example of RMAN shell script.
sselect
sid,
start_time,
totalwork
sofar,
(sofar/totalwork) * 100 pct_done
from
v$session_longops
where
totalwork > sofar
AND
opname NOT LIKE '%aggregate%'
AND
opname like 'RMAN%';select
sid,
spid,
client_info,
event,
seconds_in_wait,
p1, p2, p3
from
v$process p,
v$session s
where
p.addr = s.paddr
and
client_info like 'rman channel=%';
Yousef Rifai has published this RMAN monitoring script, quite handy when you need to monitor the status of a long running RMAN backup job:
REM RMAN Progress
alter session set nls_date_format='dd/mm/yy hh24:mi:ss'
/
select SID, START_TIME,TOTALWORK, sofar, (sofar/totalwork) * 100 done,
sysdate + TIME_REMAINING/3600/24 end_at
from v$session_longops
where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%'
/
REM RMAN wiats
set lines 120
column sid format 9999
column spid format 99999
column client_info format a25
column event format a30
column secs format 9999
SELECT SID, SPID, CLIENT_INFO, event, seconds_in_wait secs, p1, p2, p3
FROM V$PROCESS p, V$SESSION s
WHERE p.ADDR = s.PADDR
and CLIENT_INFO like 'rman channel=%'
/
This script by Osama Mustafa will monitor the progress of a running RMAN job:
select
to_char(start_time,'DD-MON-YY HH24:MI') "BACKUP STARTED",
sofar,
totalwork,
elapsed_seconds/60 "ELAPSE (Min)",
round(sofar/totalwork*100,2) "Complete%"
from
sys.v_$session_longops
where compnam = 'dbms_backup_restore';
Rename directory on ASM
There are 2 type of Directories in ASM
1) Directories created by DBAC or RMAN are called as “System Directory” and they cannot be renamed.
2) Directories created Manually by issuing command “alter diskgroup add directory” or creating in ASMCMD console.
To check if the directory is system created or manually created check the view V$ASM_ALIAS column SYSTEM_CREATED, directories created by system will have the value as ‘Y’
To Rename “Manually” created directories
Login to the ASM console
[grid@tstdev01 ~]$ asmcmd
ASMCMD> cd DATA
ASMCMD> ls
ASM/
DEV/ — Here to rename DEV to TEST
SQL> ALTER DISKGROUP DATA RENAME DIRECTORY ‘+DATA/DEV’ to ‘+DATA/TEST’;
Diskgroup altered.
Once done longin to ASM console and verify the same
[grid@tstdev01 ~]$ asmcmd
ASMCMD> cd DATA
ASMCMD> ls
ASM/
TEST/
To Rename System Created directories
System created directory cannot be rename, use parameter db_unique_name of database. Oracle ASM and Oracle Diagnostic Dest create your own directory structure based on parameter DB_UNIQUE_NAME.
Move Database using RMAN
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name DEV
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
—- ——– ——————– ——- ————————
1 17408 SYSTEM YES +DATA/DEV/DATAFILE/system.259.941719615
2 1800 UNDOTBS1 YES +DATA/DEV/DATAFILE/undotbs1.267.941720063
3 4696 SYSAUX NO +DATA/DEV/DATAFILE/sysaux.258.941719569
4 1243 EXAMPLE NO +DATA/DEV/DATAFILE/example.266.941719731
5 118 USERS NO +DATA/DEV/DATAFILE/users.260.941719669
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
—- ——– ——————– ———– ——————–
2 1300 TEMP 1300 +DATA/DEV/TEMPFILE/temp.271.942061583
$sqlplus sys as sysdba
SQL> show parameter db_unique_name
NAME TYPE VALUE
———————————— ———– ——————————
db_unique_name string DEV
SQL> show parameter control_files
NAME TYPE VALUE
———————————— ———– ——————————
control_files string +DATA/DEV/CONTROLFILE/current.262.941719717
SQL> Alter system set DB_UNIQUE_NAME=’TEST’ scope=spfile;
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
SQL> show parameter db_unique_name
NAME TYPE VALUE
———————————— ———– ——————————
db_unique_name string TEST
$rman target /
RMAN> restore controlfile from ‘+DATA/DEV/CONTROLFILE/current.262.941719717’;
Starting restore at 10-MAY-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=162 device type=DISK
channel ORA_DISK_1: copied control file copy
output file name=+DATA/TEST/CONTROLFILE/current.263.981519213
Finished restore at 10-MAY-17
RMAN> startup mount;
database is already started
database mounted
released channel: ORA_DISK_1
RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;
new RMAN configuration parameters:
RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;
new RMAN configuration parameters are successfully stored
RMAN > CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
RMAN> BACKUP AS COPY DEVICE TYPE DISK DATABASE FORMAT ‘+DATA’;
Finished backup at 10-MAY-17
RMAN> SWITCH DATABASE TO COPY;
datafile 1 switched to datafile copy “+DATA/TEST/datafile/system.290.793638779”
RMAN> run {
set newname for tablespace TEMP to ‘+DATA’ ;
switch tempfile all;
}
RMAN> report schema;
Report of database schema for database with db_unique_name TEST
List of Permanent Datafiles
==================
File Size(MB) Tablespace RB segs Datafile Name
—- ——– ——————– ——- ————————
1 17408 SYSTEM YES +DATA/TEST/datafile/system.290.793638779
2 1800 UNDOTBS1 YES +DATA/TEST/datafile/sysaux.291.793638757
3 4696 SYSAUX NO +DATA/TEST/datafile/undotbs1.292.793638823
4 1243 EXAMPLE NO +DATA/TEST/datafile/example.293.793638849
5 118 USERS NO +DATA/TEST/datafile/users.294.793638849
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
—- ——– ——————– ———– ——————–
1 1300 TEMP 1300 +DATA
RMAN> startup;
database is already started
database opened
Create the new redolog files and drop the old ones.
Once the above activity is completed backup the database.
RMAN> backup database;
Starting backup at 10-MAY-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=162 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=194 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=210 device type=DISK
.
.
Recovery Manager complete.
Now you can remove the copy:
RMAN> delete copy;
Oracle RMAN : Restore/ recover a database UNTIL TIME
This tutorial explains you how to restore/ recover a database until a time.
Oracle RMAN : Restore/ recover a database UNTIL TIME
Here are the steps for Restoring/ Recovering an Oracle database until a specific time in the past:
1) Set the environment:
on Windows
set ORACLE_SID=DB10
echo %ORACLE_SID%
on AIX/Linux
export $ORACLE_SID=DB10
echo $ORACLE_SID
2) Connect to rman:
rman target / nocatalog
3) Start the database in "mount" state:
startup mount;
4) Run the following :
---------------------------------------
restore database UNTIL TIME
"to_date('11/03/2017 11:34:50 am','mm/dd/yyyy hh:mi:ss am')";
recover database UNTIL TIME
"to_date('11/03/2017 11:34:50 am','mm/dd/yyyy hh:mi:ss am')";
alter database open resetlogs;
---------------------------------------
OR
run
{
set UNTIL TIME "to_date('11/03/2017 11:34:50 am','mm/dd/yyyy hh:mi:ss am')";
restore database;
recover database;
alter database open resetlogs;
}
Note:
You have to put the right date/time.
Database Options/Management Packs Usage Reporting for Oracle Databases 11.2 and later (Doc ID 1317265.1)
Database Options/Management Packs Usage Report You can determine whether an option is currently in use in a database by running options_pa...
-
This document describes how to develop and deploy customizations in an Oracle E-Business Suite Release 12.2 environment. Follow thes...
-
This document also provides links to two presentations on the subject: Oracle OpenWorld presentation "Technical Upgrade Best Practice...
-
The information in this document applies to Oracle E-Business Suite Release 11 i and R12.x . The most current version of this document ...