Tuesday 29 December 2015


Steps for Clean restart OMS.
===========================


1.Shutdown all the OMS related processes

$<OMS_HOME>/bin/emctl stop oms -all -force

Kill if there are any stale processes running out of the installation path for OMS.

ps -ef | grep EMGC_ADMINSERVER
ps -ef | grep EMGC_OMS1
ps -ef | grep java

kill any of the above processes which are running from the OMS $ORACLE_HOME using 'kill -9 <PID>'

2. Checking for the invalid objects in the repository shows several objects in INVALID status:

SQL> select object_name, object_type, owner from dba_objects where status = 'INVALID';

Ensure that none of the SYSMAN, SYSMAN_RO and SYSMAN_MDS objects are invalid


3. Remove the *.DAT and *.lok files from the paths below:

$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/store/diagnostics/WLS_DIAGNOSTICS000000.DAT
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/store/default/_WLS_EMGC_OMS1000000.DAT
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/store/diagnostics/WLS_DIAGNOSTICS000000.DAT
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/store/default/_WLS_EMGC_ADMINSERVER000000.DAT

and

$ find . -name "*.lok"
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/config/config.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data/ldap/ldapfiles/EmbeddedLDAP.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/tmp/EMGC_OMS1.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data/ldap/ldapfiles/EmbeddedLDAP.lok
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/tmp/EMGC_ADMINSERVER.lok

4. Go to the AdminServer directory which is in $EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/data

5. Create a backup of ldap folder and delete the current one.

6. Go to the $EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_OMS1/data directory

7. Create a backup of ldap folder in this path and delete the current one.

8. Move all the logs from below locations to a new folder by creating a directory named old_logs_dir

$EM_INSTANCE_BASE/gc_inst/WebTierIH1/diagnostics/logs/OHS/ohs1
$EM_INSTANCE_BASE/gc_inst/WebTierIH1/diagnostics/logs/OPMN/opmn
$EM_INSTANCE_BASE/gc_inst/user_prolojects/domains/GCDomain/servers/EMGC_OMS1/logs
$EM_INSTANCE_BASE/gc_inst/user_projects/domains/GCDomain/servers/EMGC_ADMINSERVER/logs

9. start the OMS

$<OMS_HOME>/bin/emctl start oms 



Following steps applied to avoid unnecessary OEM alerts if  there is network latency i.e if network fluctuate for few seconds.

We need to increase the inactive time to 300 sec for the target in OEM repository so that it waits 300 sec and check it aback.

We need to run the following statements in OEM repository database as sysman user.
--it displays GUID for the given target agent.

$sqlplus

Sql>conn sysman/*******

select TARGET_GUID from MGMT_TARGETS where TARGET_NAME='<Target agent name>' and TARGET_TYPE='oracle_emd';

--it will display column with null value or 60

select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='<target GUID from above query>';

--Run the below update statement to update the inactive time to 300.

update MGMT_EMD_PING set max_inactive_time=300 where TARGET_GUID='<target GUID from 1st  query>';
commit;

--check whether updated or not.

select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='<target GUID from above query>';

Example :

select TARGET_GUID from MGMT_TARGETS where TARGET_NAME='ORACLEDBSER02:3872' and TARGET_TYPE='oracle_emd';
TARGET_GUID
----------------------------------
E4E50946B11639C9AA59A842E4E03CD5
select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='E4E50946B11639C9AA59A842E4E03CD5>';
max_inactive_time
-----------------------------

update MGMT_EMD_PING set max_inactive_time=300 where TARGET_GUID='E4E50946B11639C9AA59A842E4E03CD5';
1 row updated
commit;

select max_inactive_time from MGMT_EMD_PING where TARGET_GUID='<target GUID from above query>';

max_inactive_time
-----------------------------

300

Thursday 19 November 2015

Dataguard

step 1:
======
Check the number of gap between Last sequence Received and last sequence applied. if it gives any number check the MRP process is running.


SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference"
          FROM
         (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
         (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
         WHERE
         ARCH.THREAD# = APPL.THREAD#
          ORDER BY 1;




To check MRP process is running or not:

select process,client_process,status,thread#,sequence#,block#,blocks
from v$managed_standby;




To put database in recovery mode:

startup mount;
alter database recover managed standby database disconnect from session;



Wednesday 4 November 2015

ORA-28003: password verification for the specified password failed

SQL> create user xyz identified by xxx;
create user xyz identified by xxx profile system
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20002: Password same as or similar to user


SQL>select profile, resource_name, limit from dba_profiles where RESOURCE_NAME = 'PASSWORD_VERIFY_FUNCTION';
PROFILE                        RESOURCE_NAME                    LIMIT
------------------------------ -------------------------------- ----------------------------------------
DEFAULT                        PASSWORD_VERIFY_FUNCTION         VERIFY_FUNCTION_11G
MONITORING_PROFILE             PASSWORD_VERIFY_FUNCTION         VERIFY_FUNCTION_11G
SYSTEM                         PASSWORD_VERIFY_FUNCTION         VERIFY_FUNCTION_11G

SQL> alter profile system limit PASSWORD_VERIFY_FUNCTION null;

Profile altered.

SQL> create user xyz identified by xxxx ;

User created.

SQL> alter profile system limit PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_11G;

Profile altered.

Thursday 30 July 2015

srvctl commands

To start and stop database in all nodes with single command
=======================================================================================
[oracle@rtmrac1 ~]$ ps -ef|grep smon
oracle     2845      1  0 08:44 ?        00:00:00 asm_smon_+ASM1
root       2907      1  2 08:44 ?        00:00:12 /u01/app/12.1.0/grid/bin/osysmond.bin
oracle    10556      1  0 08:48 ?        00:00:00 ora_smon_orcl1
[oracle@rtmrac1 ~]$ . oraenv
ORACLE_SID = [orcl1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle

[oracle@rtmrac1 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rtmrac1
Instance orcl2 is running on node rtmrac2
[oracle@rtmrac1 ~]$ srvctl stop database -d orcl
[oracle@rtmrac1 ~]$ srvctl status database -d orcl
Instance orcl1 is not running on node rtmrac1
Instance orcl2 is not running on node rtmrac2
[oracle@rtmrac1 ~]$ srvctl start database -d orcl
[oracle@rtmrac1 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rtmrac1
Instance orcl2 is running on node rtmrac2

=============================================================
To stop/start database instance in one node:
=======================================================================
[oracle@rtmrac1 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rtmrac1
Instance orcl2 is running on node rtmrac2
[oracle@rtmrac1 ~]$ srvctl stop instance -i orcl2 -d orcl
[oracle@rtmrac2 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rtmrac1
Instance orcl2 is not running on node rtmrac2

[oracle@rtmrac1 ~]$ srvctl start instance -i orcl2 -d orcl
[oracle@rtmrac1 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rtmrac1
Instance orcl2 is running on node rtmrac2

stop/start ASM instance in one instance.

srvctl stop asm -n <node_name>

--to stop with force

srvctl stop asm -n <node_name> -f

--starting ASM instance

srvctl start asm -n <node name>

=================================================================================
To stop ASM in one node: Example
=================================================================================
[oracle@rtmrac2 ~]$ ps -ef|grep pmon
oracle     2367      1  0 08:44 ?        00:00:00 asm_pmon_+ASM2
oracle    22998      1  0 09:14 ?        00:00:00 ora_pmon_orcl2
oracle    24664  24610  0 09:16 pts/1    00:00:00 grep --color=auto pmon
[oracle@rtmrac2 ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM2
The Oracle base has been set to /u01/app/oracle
[oracle@rtmrac2 ~]$ srvctl stop instance -i orcl2 -d orcl
[oracle@rtmrac2 ~]$ ps -ef|grep pmon
oracle     2367      1  0 08:44 ?        00:00:00 asm_pmon_+ASM2
oracle    25367  24610  0 09:19 pts/1    00:00:00 grep --color=auto pmon
[oracle@rtmrac2 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rtmrac1
Instance orcl2 is not running on node rtmrac2
[oracle@rtmrac2 ~]$ srvctl status asm
ASM is running on rtmrac2,rtmrac1
[oracle@rtmrac2 ~]$ srvctl stop asm -n rtmrac2
PRCR-1014 : Failed to stop resource ora.asm
PRCR-1065 : Failed to stop resource ora.asm
CRS-2529: Unable to act on 'ora.asm' because that would require stopping or relocating 'ora.DATA.dg', but the force option was not specified
[oracle@rtmrac2 ~]$ srvctl stop asm -n rtmrac2 -f
[oracle@rtmrac2 ~]$ srvctl status asm
ASM is running on rtmrac1
[oracle@rtmrac2 ~]$ ps -ef|grep pmon
oracle    26471  24610  0 09:21 pts/1    00:00:00 grep --color=auto pmon
[oracle@rtmrac2 ~]$ srvctl start asm -n rtmrac2
[oracle@rtmrac2 ~]$ srvctl status asm
ASM is running on rtmrac2,rtmrac1
[oracle@rtmrac2 ~]$ ps -ef|grep pmon
oracle    27242      1  0 09:24 ?        00:00:00 asm_pmon_+ASM2
oracle    27400  24610  0 09:24 pts/1    00:00:00 grep --color=auto pmon
[oracle@rtmrac2 ~]$ srvctl start instance -i orcl2 -d orcl
[oracle@rtmrac2 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node rtmrac1
Instance orcl2 is running on node rtmrac2

----if you get error as bellow while starting ASM

[oracle@SDBORN21 ~]$ srvctl start asm -n SDBORN21

PRCR-1070 : Failed to check if resource ora.asm is registered
Cannot communicate with crsd


----follow as bellow

crsctl stat res -t -init

----check  ora.asm and ora.crsd are OFFLINE

crsctl start res ora.asm -init
crsctl start res ora.crsd -init

----if above commands succeeded then ASM must be up

ps -ef|grep pmon

----start database instance

srvctl start instance -i <instance_name>  -d <database_name>

------------------------------------------------------------
If you want to add database to HA(grid instrastructure):
------------------------------------------------------------
ex:
srvctl add database -d orcl -o /opt/oracle/product/12.2.0.1/dbhome_1 -p +DATA//PARAMETERFILE/spfile.644.1041511849
------------------------------------------------------------
modify the database startup option (mount/open).
-----------------------------------------------------------
if you set mount, if server is restarted database will open in mount mode.

srvctl modify database -db ORCL -startoption MOUNT





Tuesday 28 July 2015



info <extract-name>, showch

info ECACA1, showch
To make the replicat to go new file:
====================================
ALTER replicat RMSDPC22, EXTSEQNO 3886 extrba 0

to rollover to new file for ext:
=============================
alter extract ECACA3, ETROLLOVER

to switch the extract to next sequence and to thread 1
===========================================================
alter <extract-name>, extseqno 10, extrba 0

Tracing for process:
========================
send < rep name>, trace ./dirrpt/reptrace.trc
To generate new report file:
=============================
send RMSDPC11, report

to set find long running transation
===================================
WARNLONGTRANS 2HRS
WARNLONGTRANS 2hours
WARNLONGTRANS 1DAY
WARNLONGTRANS 600sec
WARNLONGTRANS 40s
bounded recovery:
===================
BR BROFF

========================
TRANLOGOPTIONS parameter with the PURGEORPHANEDTRANSACTIONS option to
enable the purging of orphaned transactions that occur when a node fails and Extract cannot capture the rollback
===================
DBOPTIONS DEFERREFCONST

ASM queries

#### To know free space  in disk group ##

SET LINESIZE  145
SET PAGESIZE  9999
SET VERIFY    off
COLUMN group_name             FORMAT a20           HEAD 'Disk Group|Name'
COLUMN sector_size            FORMAT 99,999        HEAD 'Sector|Size'
COLUMN block_size             FORMAT 99,999        HEAD 'Block|Size'
COLUMN allocation_unit_size   FORMAT 999,999,999   HEAD 'Allocation|Unit Size'
COLUMN state                  FORMAT a11           HEAD 'State'
COLUMN type                   FORMAT a6            HEAD 'Type'
COLUMN total_mb               FORMAT 999,999,999   HEAD 'Total Size (MB)'
COLUMN used_mb                FORMAT 999,999,999   HEAD 'Used Size (MB)'
COLUMN pct_used               FORMAT 999.99        HEAD 'Pct. Used'
SELECT
    name                                     group_name
  , sector_size                              sector_size
  , block_size                               block_size
  , allocation_unit_size                     allocation_unit_size
  , state                                    state
  , type                                     type
  , total_mb                                 total_mb
  , (total_mb - free_mb)                     used_mb
  , ROUND((1- (free_mb / total_mb))*100, 2)  pct_used
FROM
    v$asm_diskgroup
ORDER BY
    name;


To know the disk info:
========================

SELECT SUBSTR(d.name,1,16) AS asmdisk, d.mount_status, d.state,
     dg.name AS diskgroup FROM V$ASM_DISKGROUP dg, V$ASM_DISK d
     WHERE dg.group_number = d.group_number;


--- To check with single disk

SELECT dg.name,SUBSTR(d.name,1,16) AS asmdisk, d.mount_status,d.HEADER_STATUS,d.total_mb,d.free_mb
      AS diskgroup FROM V$ASM_DISKGROUP dg, V$ASM_DISK d
     WHERE dg.group_number = d.group_number and dg.name='<diskname>';

To find ASM file system:
==========================

SELECT fs_name, available_time, block_size, state, corrupt FROM V$ASM_FILESYSTEM;

To find Candidate/Formar disks:
============================

select name,path,lable,HEADER_STATUS from v$asm_disk where HEADER_STATUS not like 'MEMBER';

Adding disk to diskgroup:
=========================


ALTER DISKGROUP SKS0DB_DG ADD DISK 'ORCL:SKS0_DATA30' rebalance power 8;


For more queries Qeries LInk
 

Tuesday 23 June 2015

1) Go the source server and login into ggsci

2a) Execute the below command
alter <pump proc> etrollover

2b) start <pump proc>

(ETROLLOVER will force the pump to write on a fresh trail)

3) Go the target server and check if the new trail files are being generated.

4) Verify if the first record in the new trail file is indeed the next record in the local extract trail. (It can be done by looking at the RBA value through the logdump utility)

5) Alter the replicat to the new trail file



alter <pump proc> extseqno <sqnce num> extrba 0

6) Start the Replicat process

7) Verify if all the processes are running fine.

----check the backup is disabled in crontab, this we need to do before starting the backup.


----stop database instance.
srvctl stop instance -i <instance_name>  -d <database_name>  -f
srvctl stop asm -n <node_name> -f

----start asm instance as bellow

srvctl start asm -n <node name>

----if you get error as bellow

[oracle@SDBORN21 ~]$ srvctl start asm -n SDBORN21
PRCR-1070 : Failed to check if resource ora.asm is registered
Cannot communicate with crsd


----follow as bellow

crsctl stat res -t -init

----check  ora.asm and ora.crsd are OFFLINE

crsctl start res ora.asm -init
crsctl start res ora.crsd -init


----if above commands succeeded then ASM must be up

ps -ef|grep pmon

----start database instance

srvctl start instance -i <instance_name>  -d <database_name>

Sunday 21 June 2015

RMAN full backup restore


Restore from Full Database Backup

 

1.      We need full database backup from rman and we need to have this rman logs also.

[oracle@localhost cold_backup]$ rman target /

 

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 23 15:09:21 2015

 

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

 

connected to target database: TEST (DBID=2178615226)

 

RMAN> backup database plus archivelog;

 

Starting backup at 23-MAY-15

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=30 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=2 RECID=1 STAMP=880470585

channel ORA_DISK_1: starting piece 1 at 23-MAY-15

channel ORA_DISK_1: finished piece 1 at 23-MAY-15

piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2015_05_23/o1_mf_annnn_TAG20150523T150948_bp0lq739_.bkp tag=TAG20150523T150948 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16

Finished backup at 23-MAY-15

 

Starting backup at 23-MAY-15

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/test/system01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/test/sysaux01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/test/undotbs01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/test/users01.dbf

channel ORA_DISK_1: starting piece 1 at 23-MAY-15

channel ORA_DISK_1: finished piece 1 at 23-MAY-15

piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2015_05_23/o1_mf_nnndf_TAG20150523T151008_bp0lqvkc_.bkp tag=TAG20150523T151008 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:46

Finished backup at 23-MAY-15

 

Starting backup at 23-MAY-15

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=3 RECID=2 STAMP=880470717

channel ORA_DISK_1: starting piece 1 at 23-MAY-15

channel ORA_DISK_1: finished piece 1 at 23-MAY-15

piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2015_05_23/o1_mf_annnn_TAG20150523T151158_bp0lv7y4_.bkp tag=TAG20150523T151158 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 23-MAY-15

 

Starting Control File and SPFILE Autobackup at 23-MAY-15

piece handle=/u01/app/oracle/flash_recovery_area/TEST/autobackup/2015_05_23/o1_mf_s_880470721_bp0lvc70_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 23-MAY-15

Restore & Recovery:

1.      Startup the database in nomount mode.

SQL> startup nomount

ORACLE instance started.

 

Total System Global Area  622149632 bytes

Fixed Size                  2215904 bytes

Variable Size             381681696 bytes

Database Buffers          234881024 bytes

Redo Buffers                3371008 bytes

2.      Then connect to the rman and then set the DBID

[oracle@localhost test]$ rman target /

 

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 23 15:16:15 2015

 

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

 

connected to target database: TEST (not mounted)

 

RMAN> set DBID=2178615226

 

executing command: SET DBID

3.      Then restore the control file from auto backup.

RMAN> restore controlfile from autobackup;

 

Starting restore at 23-MAY-15

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=20 device type=DISK

 

recovery area destination: /u01/app/oracle/flash_recovery_area

database name (or database unique name) used for search: TEST

channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/TEST/autobackup/2015_05_23/o1_mf_s_880470721_bp0lvc70_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20150523

channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/TEST/autobackup/2015_05_23/o1_mf_s_880470721_bp0lvc70_.bkp

channel ORA_DISK_1: control file restore from AUTOBACKUP complete

output file name=/u01/app/oracle/oradata/test/control01.ctl

output file name=/u01/app/oracle/flash_recovery_area/test/control02.ctl

Finished restore at 23-MAY-15

 

4.      Restore the database from the rman full backup.

RMAN> alter database mount;

 

database mounted

released channel: ORA_DISK_1

 

RMAN> restore database;

 

Starting restore at 23-MAY-15

Starting implicit crosscheck backup at 23-MAY-15

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=20 device type=DISK

Crosschecked 3 objects

Finished implicit crosscheck backup at 23-MAY-15

 

Starting implicit crosscheck copy at 23-MAY-15

using channel ORA_DISK_1

Finished implicit crosscheck copy at 23-MAY-15

 

searching for all files in the recovery area

cataloging files...

cataloging done

 

List of Cataloged Files

=======================

File Name: /u01/app/oracle/flash_recovery_area/TEST/autobackup/2015_05_23/o1_mf_s_880470721_bp0lvc70_.bkp

 

using channel ORA_DISK_1

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/test/system01.dbf

channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/test/sysaux01.dbf

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/test/undotbs01.dbf

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test/users01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/TEST/backupset/2015_05_23/o1_mf_nnndf_TAG20150523T151008_bp0lqvkc_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/TEST/backupset/2015_05_23/o1_mf_nnndf_TAG20150523T151008_bp0lqvkc_.bkp tag=TAG20150523T151008

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:35

Finished restore at 23-MAY-15

5.      Recover the database.

RMAN> recover database;

 

Starting recover at 23-MAY-15

using channel ORA_DISK_1

 

starting media recovery

 

archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/TEST/archivelog/2015_05_23/o1_mf_1_3_bp0lv5g7_.arc

archived log file name=/u01/app/oracle/flash_recovery_area/TEST/archivelog/2015_05_23/o1_mf_1_3_bp0lv5g7_.arc thread=1 sequence=3

unable to find archived log

archived log thread=1 sequence=4

Finished recovery at 23-MAY-15

 

6.      Then open the database with resetlogs.

RMAN> alter database open resetlogs;

 

database opened

Monday 25 May 2015

RMAN Commands




list and report commands


list backup;
list backup summary;
list expired backup;
report obsolete;
report obsolete recovery window of 7 days
list archivelog all;
list expired backup;

Delete commands:

delete archivelog until time 'SYSDATE-10';
delete expired archivelog all;
delete archivelog all;
delete noprompt force archivelog all;
delete noprompt archivelog until sequence=<seqnum>;

If archives not deleting due to any configuration like standby apply you can use FORCE

Ex: 
delete force noprompt archivelog until sequence=<sqnum>;

delete expired backup;
delete obsolete;
delete obsolete recovery window of 30 days;

Restore Archivelog:

restore archivelog from logseq 3165 until logseq 3180;

catalog:

catalog archivelog '/u10/fra/orcl/archivelog/2016_01_11';

catalog start with '/data1/fra/orcl/backupset' noprompt;

Incarnation:

list incarnation of database;

reset database to incarnation <Inc Key>;

Archivelog deletion policy:

CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED TO ALL STANDBY;
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED TO ALL STANDBY BACKED UP 1 TIMES TO DISK;