Monday 10 December 2018

RMAN-06059: expected archived log not found, loss of archived log compromises recoverability

RMAN Backup failed.


After Deleting Archive log files in the filesystem, RMAN backup getting failed with below error.


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/09/2018 03:13:49
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /oracle/product/12102/fast_recovery_area/archivelog/2018_12_07/o1_mf_1_5632_g0n1o2vv_.arc
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3




Solution:





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


After the expired backup command, started run the RMAN backup and check.

Wednesday 16 May 2018

[INS-32025] The chosen installation conflicts with software already installed in the given Oracle home



[INS-32025] The chosen installation conflicts with software already installed in the given Oracle home


I am trying to install oracle in “/oracle/test/12102”


If you’re trying to install oracle software in existing home then error in populates.


So avoid install in the existing oracle or follow the below steps.


 


 This is the step by step to fix the issue quickly:


1. cat /etc/oraInst.loc
2  cd <oraInventory path>/oraInventory/ContextXML



 


3. vi inventory.xml
4. Remove the line in the red box that contains the new ORACLE Home






5. Exit the installation window and start re-run the installer.

Monday 20 February 2017

Materialized view refresh error(ORA-00942: table or view does not exist,ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2821)

SQL>EXEC DBMS_MVIEW.REFRESH('TEST_MV','C','',FALSE,FALSE,0,0,0,TRUE);
BEGIN DBMS_MVIEW.REFRESH('DM_SALES_GROSS_NET_MV','C','',FALSE,FALSE,0,0,0,TRUE); END;

*
ERROR at line 1:
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2821
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3058
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 3017
ORA-06512: at line 1

SQL>

SOLUTION:

SQL>ALTER MATERIALIZED VIEW TEST_MV COMPILE;

Materialized view altered.

SQL>exec DBMS_MVIEW.REFRESH('DM_SALES_GROSS_NET_MV','C','',FALSE,FALSE,0,0,0,TRUE);

PL/SQL procedure successfully completed.

SQL>

Sunday 8 January 2017

Restore table from Recyclebin 11g/10g


I am Sharing my experience in recovery table from recyclebin

SQL> select object_name, original_name, type,droptime from recyclebin;

OBJECT_NAME                    ORIGINAL_NAME    TYPE    DROPTIME
————————————-                   ————————–       ————    ————————
BIN$RVdHjbBfXI3gUwIAAH/nrg==$0    T1           TABLE    2016-09-05:01:32:05
BIN$RVVsfQkeTzfgUwIAAH8GCw==$0    T1           TABLE    2016-09-05:01:35:36


Here we can use two ways to restore the table

STEP 1:

This will restore the latest drop table to restore.

SQL> flashback table t1 to before drop;

Flashback complete.

STEP 2:

The below command to restore the selected recyclebin object to restore.

SQL> flashback table “BIN$RVdHjbBfXI3gUwIAAH/nrg==$0" to before drop;
Flashback complete.

SQL> 

Friday 29 July 2016

Find database total, used and free size.

col "Database Size" format a20
col "Free space" format a20
col "Used space" format a20
select    round(sum(used.bytes) / 1024 / 1024 / 1024 ) || ' GB' "Database Size"
,               round(sum(used.bytes) / 1024 / 1024 / 1024 ) -
                round(free.p / 1024 / 1024 / 1024) || ' GB' "Used space"
,               round(free.p / 1024 / 1024 / 1024) || ' GB' "Free space"
from    (select    bytes
                from      v$datafile
                union    all
                select    bytes
                from      v$tempfile
                union    all
                select    bytes
                from      v$log) used
,               (select sum(bytes) as p
                from dba_free_space) free
group by free.p
/

Database Size        Used space           Free space
-------------------- -------------------- --------------------

424 GB               213 GB               211 GB

RMAN-06059: expected archived log not found, loss of archived log compromises recoverability

RMAN Backup failed. After Deleting Archive log files in the filesystem, RMAN backup getting failed with below error. RMAN-00571: ======...