Skip to main content

Posts

Showing posts from December, 2018

Oracle DataGuard Protection Modes

<<Back to Oracle DataGuard Main Page What are Oracle Data Guard Protection Modes? The Oracle Data Guard Protection Mode defines the availability of the data on the standby database. An Oracle Data Guard configuration always runs in one of three data protection modes. Maximum Protection Maximum Availability Maximum Performance (default mode of operation) Maximum Protection This protection mode guarantees 0 data loss. To guarantee the availability of data no data loss on the standby database in case of Primary database failure, The commit on the primary only succeeds if an only if the redo data needed to recover each transaction must be written to both the local online redo log and to a standby redo log on at least one standby database. If in case no standby destination is available to primary the primary also goes unavailable resulting in an outage for the application. Maximum Availability This protection mode provides the highest level of data protection without affectin

How to Find Archivelog Names and Sequence Number using the SCN in Oracle

<<Back to Oracle Backup & Recovery Main Page Finding Archivelog Names and Sequence Number using the SCN There are many situations when we have the time or scn and you want to know the archivelog sequence number or archivelog name to proceed further. For example I had a situation today when there was some data deleted from an important table. We know the timestamp when this happened and we decided to mine the archivelogs generated at this timestamp using log miner. I tried to find the database SCN for the timestamp How to Find SCN from Timestamp and Vice Versa in Oracle and used query below to find the archivelogs generated at this timestamp and are good candidate to mine. SQL>set pages 100 lines 100 SQL> col name for a70 SQL>col first_change# for 9999999999 SQL>col next_change# for 9999999999 SQL>alter session set nls_date_format='DD-MON-RRRR HH24:MI:SS'; SQL>select name, thread#, sequence#, status, first_time, next_time, first_change#, next

How to Find SCN from Timestamp and Vice Versa in Oracle

<<Back to DB Administration Main Page How to Find SCN from Timestamp in Oracle SQL> Col scn for 999999999 SQL> select timestamp_to_scn(to_timestamp('27-12-2018 15:20:00','DD-MM-YYYY HH24:MI:SS')) as scn from dual; SCN ———- 845396 How to Find Timestamp from SCN in Oracle SQL> alter session set nls_date_format='DD-MON-RRRR HH24:MI:SS'; SQL> select scn_to_timestamp( 845396 ) as timestamp from dual; TIMESTAMP ————————————————————————— 27-12-2018 15:20:02 How to Find the Current SCN in Oracle Using DBMS_FLASHBACK SQL> select DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER from dual; GET_SYSTEM_CHANGE_NUMBER ———————— 845401

Oracle Clusterware (RAC) Startup Procedure: Use of GPNP Profile and OLR

<<Back to Oracle RAC Main Page Oracle Clusterware (RAC) Startup Procedure and Use of GPNP Profile and OLR In todays post I want through some light upon Oracle Clusterware startup procedure. Which process in what sequence etc etc. So till 10g it was not too difficult but starting from 11g you have possibility to store the voting disk and OCR in ASM which make it a bit difficult but no worry you will get hold of it after this post. Now from 11g onwards you store Voting disk and OCR in ASM since Voting disk and OCR are the primary component required to start the Clusterware  which further starts the Clusterware resources like ASM, Listener, Database etc. Did you notice something??   What Which further starts the Clusterware resources like  ASM , what but you just told that Voting disk and OCR can be stored in ASM and Clusterware starts the ASM and Clusterware startup itself requires the access of Voting disk and OCR so what starts first ASM or Clusterware what the hell

Step by Step How to Create Oracle RAC Database

<<Back to Oracle RAC Main Page Creating Oracle RAC Database Post Oracle Clusterware Installation Once you are done with  Oracle Grid Infrastructure Installation  and  Oracle Database Software Installation  you are ready create your first RAC database. STEP1: Launch DBCA login as oracle user and set ORACLE_HOME $export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1/db1 Execute dbca from ORACLE_HOME/bin and follow the GUI instruction as shown below $cd /u01/app/oracle/product/12.2.0.1/db1 ./dbca choose create database and click Next Choose advanced Configuration and click Next Click Next Select all the nodes on which you want to create the database and click Next Choose appropriate (As per your requirement)Value for each field and Click Next Choose the Appropriate Disk Group (in my case it is DATA) and click Next You can enable the archivelog and specify the FRA (Flash Recovery Area) Location and Size. In this example I kept the

Step by Step How to Install Oracle RAC Database Software 12c Release2

<<Back to Oracle RAC Main Page Once you are done with  Oracle Grid Infrastructure Installation , you are ready to install Oracle database binaries. Step by Step Instruction to Install Oracle Database software for Oracle RAC STEP1: Transfer Oracle Database Binaries on the Server  Transfer the zipped database binaries to the target Server  (staging location) using your preferred method eg. Winscp. The detailed procedure to download the binaries are already explained in  How to Download Oracle Software from Oracle E- delivery   post STEP2:  As oracle user unzip the binary at target Machine using the target Server Utility eg. unzip $ unzip V839960-01.zip Note:- Do not unzip at source and then Transfer it to target. STEP3:   Run Oracle Universal Installer  (OUI) by invoking  runInstaller from staging Location as Oracle user and follow the OUI instruction $ ./runInstaller Uncheck the security updates check box and click the "Next" button. A

Step by Step Oracle RAC 12c Release 2 (12c R2) installation on Oracle VirtualBox with OEL7

<<Back to Oracle RAC Main Page Step by Step How to Install Oracle RAC (Real Application Cluster) on your Laptop Note:- Installation of Oracle RAC is a very lengthy and time taking process and requires lots of preparation and co-ordination with different Teams in real environment. Since in this post you will perform all the tasks your own, it may take even more time. Keeping this point in mind and make the installation easier I have divided this post in several small posts which may be independently completed. lastly you have to be patient. Step1: Planning and Understanding Hardware and Software Requirements for Oracle RAC installation on your Laptop. Check out the post  Minimum Hardware and Software Requirements to Install Oracle Real Application Cluster (Oracle RAC 12c)  to complete this step Step2: Download the Required Software Check out the post How to Download Oracle Software from Oracle E- delivery and download the required software. Step3: Create the Virtual Ma