Save Crontab Logfile with Date-Timestamps

15 15 * * * /u01/app/oracle/backups/scripts/test.sh >>/mnt/uranus/rman/logs/59_`date +\%Y\%m\%d\%H\%M\%S`.log

It will create ‘/mnt/uranus/rman/logs/59_201403171515.log’

Change Archive Log Location to Only One Folder

My archived log are saved in different folders according to the save date; for example 2014_03_10, 2014_03_11 which contains all the archives saved on that day and so on. 

This is my log_archive_dest parameter,

SQL> show parameter log_archive_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string
log_archive_dest_1                   string

SQL> SELECT DEST_NAME, DESTINATION FROM V$ARCHIVE_DEST WHERE STATUS='VALID';

DEST_NAME                DESTINATION
------------------------ -------------------------------------------
LOG_ARCHIVE_DEST_1       USE_DB_RECOVERY_FILE_DEST


SQL> show parameter db_recovery_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /u01/app/oracle/fast_recovery_
                                                 area


To change archived log save in one folder without separate it by day, we can change alter LOG_ARCHIVE_DEST_1

SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/backups/fast_recovery_area' scope=both;

System altered.

Pandazen DB Backup Strategy with RMAN – EXPDP

  1. monthly
    rman db backup full
  2. weekly
    rman db backup incremental
    rman db crosscheck
    rman db delete obsolete, expired
  3. daily
    expdp db backup full
    expdp db backup metadata
  4. 4-hourly
    rman db backup archivelog
    rman db delete archivelog

RMAN – Difference Between Crosscheck Backup and Crosscheck Backupset

CROSSCHECK BACKUP;  # checks backup sets, proxy copies, and image copies
CROSSCHECK BACKUPSET; # crosschecks backupsets on disk and SBT

and

CROSSCHECK COPY;    	# crosschecks only disk copies of database files

My Useful “ls” Linux Comand

  1.             ls -laLR > print.txt
                

    to print permission of all files, folders include hidden file and symlinks

  2.             ls -dl 'find / -type d'
                

    to print permissions only folder

  3.             ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
                

    to print folder structure

RMAN-06207 and RMAN-06208 Delete Obsolete

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     15     13-FEB-14          /home/oracle/standby.ctl
Control File Copy     18     15-FEB-14          /home/oracle/stby.ctl
Control File Copy     19     15-FEB-14          /home/oracle/new.ctl
Control File Copy     21     15-FEB-14          /home/oracle/top.ctl
Control File Copy     23     15-FEB-14          /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f

Do you really want to delete the above objects (enter YES or NO)? yes

RMAN-06207: WARNING: 5 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   /home/oracle/standby.ctl
RMAN-06214: Datafile Copy   /home/oracle/stby.ctl
RMAN-06214: Datafile Copy   /home/oracle/new.ctl
RMAN-06214: Datafile Copy   /home/oracle/top.ctl
RMAN-06214: Datafile Copy   /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f

This solution work for me,

RMAN> crosscheck copy;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1702 device type=DISK
specification does not match any datafile copy in the repository
validation failed for control file copy
control file copy file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f RECID=23 STAMP=839616673
validation failed for control file copy
control file copy file name=/home/oracle/top.ctl RECID=21 STAMP=839589691
validation failed for control file copy
control file copy file name=/home/oracle/new.ctl RECID=19 STAMP=839585230
validation failed for control file copy
control file copy file name=/home/oracle/stby.ctl RECID=18 STAMP=839584426
validation failed for control file copy
control file copy file name=/home/oracle/standby.ctl RECID=15 STAMP=839414702

RMAN> delete expired copy;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1702 device type=DISK
specification does not match any datafile copy in the repository
specification does not match any archived log in the repository
List of Control File Copies
===========================

Key     S Completion Time Ckp SCN    Ckp Time
------- - --------------- ---------- ---------------
23      X 15-FEB-14       69502411861 15-FEB-14
        Name: /u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f
        Tag: TAG20140215T185113

21      X 15-FEB-14       69502351103 15-FEB-14
        Name: /home/oracle/top.ctl
        Tag: TAG20140215T112131

19      X 15-FEB-14       69502304494 15-FEB-14
        Name: /home/oracle/new.ctl
        Tag: TAG20140215T100710

18      X 15-FEB-14       69502303165 15-FEB-14
        Name: /home/oracle/stby.ctl
        Tag: TAG20140215T095346

15      X 13-FEB-14       69426170931 13-FEB-14
        Name: /home/oracle/standby.ctl
        Tag: TAG20140213T104502


Do you really want to delete the above objects (enter YES or NO)? yes
deleted control file copy
control file copy file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_itcapps2.f RECID=23 STAMP=839616673
deleted control file copy
control file copy file name=/home/oracle/top.ctl RECID=21 STAMP=839589691
deleted control file copy
control file copy file name=/home/oracle/new.ctl RECID=19 STAMP=839585230
deleted control file copy
control file copy file name=/home/oracle/stby.ctl RECID=18 STAMP=839584426
deleted control file copy
control file copy file name=/home/oracle/standby.ctl RECID=15 STAMP=839414702
Deleted 5 EXPIRED objects


RMAN>

Error: Protected multilib versions

When I “yum install libXext.i686 -y”, it failed because

Error: Protected multilib versions: libXext-1.3.1-2.el6.i686 != libXext-1.1-3.el6.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Then I do again “yum install libXext.i686 -y –skip-broken”. but again another message like this

Error: Protected multilib versions: libXext-1.3.1-2.el6.i686 != libXext-1.1-3.el6.x86_64
 You could try running: rpm -Va --nofiles --nodigest

I have run these

package-cleanup --dupes
package-cleanup --cleandupes
yum clean all
yum update #take very long time to finish

Here the solution that work for me,

yum install libXext.i686 -y --setopt=proctected_multilib=false
Follow

Get every new post delivered to your Inbox.

Join 43 other followers