Oracle 12c Logo

Enhanced compression options in oracle 12c data pump

COMPRESSION_ALGORITHM parameter with options ( BASIC | LOW | MEDIUM | HIGH ) have been used to compress data pump dump files, Prior to oracle 12c compression algorithms have been used in RMAN backup only & only Basic compression has been used in data pump export.

But now on-words same feature is also available with data pump in oracle 12c edition. Continue reading

Oracle 12c Logo

Exporting views as tables – Oracle 12c Data Pump

Data Pump Export with VIEWS_AS_TABLES:

Now with the help of “VIEWS_AS_TABLES” export parameter we can export multiple views as tables, this smart feature of data pump is invented in Oracle 12c edition.

According to Oracle, VIEWS_AS_TABLES parameter exports data in unencrypted format & creates an unencrypted tables. If the data is sensitive then it is strongly recommended to enable encryption while unloading. Continue reading

Oracle 11g Logo

Point in time recovery using RMAN

If you want to recover your database to the exact date/time in the past, use RMAN point in time recovery.

RMAN database point-in-time recovery (DBPITR) restores the db from RMAN backups.

RMAN will be consider all ( required ) backups (full, incremental, transectional) to restore or roll forward to the desire time. Continue reading

Oracle 12c Logo

Database recovery on loss of all online redo log files with the help of RMAN

According to standard practice, we should consider multiplexing of online redo log files to avoid such a scenarios, Each log file group should have more than/at least 2 log file members & location of all group on different physical disk. ( In case of worst situation with disk 1 then database would be recovery with the help of disk 2 – Online redo log file )

Single current online redo log file is sufficient to restore the entire database & do an incomplete recovery. Continue reading

Oracle 11g Logo Oracle 11g Logo

Recover datafile & controlfile using RMAN data recovery advisor

In case of worst situation with datafile & controlfile, we can repair/restore it with the help of RMAN data recovery advisor.

Note:
We can use Data Recovery Advisor with the help of Oracle Enterprise Manager, Grid Control & RMAN command prompt.

Lets consider hands-on on on RMAN repair advisor with the help of following case studies: Continue reading

Oracle 11g Logo Oracle 11g Logo

How to reset RMAN saved configuration

To clear the saved configuration in RMAN, please consider following examples for better understanding:

Connect to RMAN prompt:

[oracle@oracle ~]$ rman target / catalog recoveryman/recoveryman@catalogdb

Recovery Manager: Release 11.2.0.1.0 – Production on Thu Jan 9 07:09:36 2014 Continue reading

Oracle 11g Logo

How to check RMAN backup status and timings

This script will be run in the target( registered ) database, not in the catalog ( Repository ) database.

Login as sysdba and issue the following script:

This script will report on all currently running RMAN backups like full, incremental & archivelog backups:

SQL> col STATUS format a9
SQL> col hrs format 999.99
SQL> select SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;
SQL> /
SESSION_KEY  INPUT_TYPE    STATUS    START_TIME     END_TIME       HRS
 ----------- ------------- --------- -------------- -------------- -------
 29          DB FULL       RUNNING   01/07/14 10:28 01/07/14 10:28 .00
SQL> /
SESSION_KEY  INPUT_TYPE    STATUS    START_TIME     END_TIME       HRS
 ----------- ------------- --------- -------------- -------------- -------
 29          DB FULL       RUNNING   01/07/14 10:28 01/07/14 10:28 .01
SQL> /
SESSION_KEY  INPUT_TYPE    STATUS    START_TIME     END_TIME       HRS
 ----------- ------------- --------- -------------- -------------- -------
 29          DB FULL       COMPLETED 01/07/14 10:28 01/07/14 10:29 .03

Above script will give you RMAN backup status along with start and stop timing.

OR

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, 
ROUND (SOFAR/TOTALWORK*100, 2) "% COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK! = 0 AND SOFAR <> TOTALWORK;

 SID       SERIAL#    CONTEXT    SOFAR      TOTALWORK  %COMPLETE
---------- ---------- ---------- ---------- ---------- ----------
 18        29         1          9115569    19258880   47.33

Above script will give you SID, Total Work, Sofar & % of completion.

You can also check historical backup status with the help of following script:

set linesize 500 pagesize 2000
col Hours format 9999.99
col STATUS format a10
select SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm-dd-yyyy hh24:mi:ss') as RMAN_Bkup_start_time,
to_char(END_TIME,'mm-dd-yyyy hh24:mi:ss') as RMAN_Bkup_end_time,
elapsed_seconds/3600 Hours from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;
SESSION_KEY INPUT_TYPE    STATUS     RMAN_BKUP_START_TIM RMAN_BKUP_END_TIME  HOURS
----------- ------------- ---------- ------------------- ------------------- --------
 137764     DB FULL       COMPLETED  06-06-2017 02:00:32 06-06-2017 04:12:13 2.19
 137770     ARCHIVELOG    COMPLETED  06-06-2017 04:00:29 06-06-2017 04:01:05 .01
 137778     ARCHIVELOG    COMPLETED  06-06-2017 06:00:27 06-06-2017 06:00:35 .00
 137782     ARCHIVELOG    COMPLETED  06-06-2017 08:00:32 06-06-2017 08:03:36 .05
 137786     ARCHIVELOG    COMPLETED  06-06-2017 10:00:30 06-06-2017 10:02:03 .03
 137790     ARCHIVELOG    COMPLETED  06-06-2017 12:00:30 06-06-2017 12:02:34 .03
 137794     ARCHIVELOG    COMPLETED  06-06-2017 14:00:30 06-06-2017 14:02:58 .04
 . .. ...

*****

Note: Please don’t hesitate to revert in case of any query OR feedback.

Thanking you.

Have an easy life ahead.

Oracle 11g Logo

How to configure Oracle RMAN backup for the first time

RMAN is a oracle utility to backup, restore & recovery of database.

The following Steps will be demonstrated the configuration of oracle RMAN backup (for first time configuration)

Lets assume the database is in NOARCHIVELOG mode, by default the database is in NOARCHIVELOG mode, we need to change it to ARCHIVELOG mode for RMAN backup configuration. Continue reading

Backup & Restore MySQL database with compression option

If your MySQL database is very large, you may like to compress the output of mysqldump.
Use the MySQL backup command below & pipe the output to gzip, then you will get the output as gzip file.

Syntax:
$ mysqldump -u [user_name] -p [password] [database_name] | gzip -9 > [backupfile.sql.gz]

If you want to extract the .gz file, issue following command: Continue reading

How to backup your MySQL Database[s]

Backing up your database is as essential as you breathing. So please backing up your database on daily basis OR hourly basis depends on how your database contains critical/Important data.

 

In this article you will find easiest way to backup & restore your MySQL database.

Backing up your MySQL database using several methods like mentioned below: Continue reading

Linux

Htop – an interactive process viewer

Most of the peoples are familiar with the top command line utility to cross-verify the core information of CPU or memory, but htop linux command is smart alternative for top linux command.

Htop offers you:

  • Shows you usage per CPU. ( Multi-core layout )
  • User friendly text graphical look of all CPU’s in terms of percentage.
  • User friendly text graphical look of memory & swap size along with used/available size.. Continue reading
Linux Linux

Configuration of VNC-Server on CentOS 6.0 & Above Versions

Steps to configure VNC server on CentOS:

//First verify version & redhat-release by following command:
[root@centos ~]# cat /proc/version
[root@centos ~]# cat /etc/redhat-release

//Install required packages:

[root@centos ~]# yum -y install tigervnc-server xorg*
[root@centos ~]# yum groupinstall "General Purpose Desktop" –y Continue reading

Linux Linux Linux

Clear Memory Cache on Linux Server

We can manually free up the memory cache with the following simple command:

//Find exact memory utilization by issuing following command:

[root@demoServer ~]# free -m
total used free shared buffers cached
Mem: 7827 7566 261 0 97 6585
-/+ buffers/cache: 883 6944
Swap: 4999 12 4987 Continue reading