Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.

Similar presentations


Presentation on theme: "INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008."— Presentation transcript:

1 INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008 all rights reserved.

2 Oracle High Availability Solutions Oracle has two high availability solutions: Standby Database (Data Guard): A standby database provides a identical copy of the primary database. The Redo Apply technology applies redo data on the physical standby database using standard Oracle media recovery techniques. A standby database can be open read-only while it applies updates received from the primary database. This makes physical standby databases useful for offloading the primary database from the overhead of processing read-only queries and reports.

3 Oracle High Availability Solutions Real Application Cluster (RAC): Oracle RAC is a cluster database with a shared cache architecture. In a RAC environment there are two or more servers, where each server has its own “instance”. Each instance mounts and opens the same database files. In a RAC environment all instances are active Copyright System Managers LLC 2008 all rights reserved.

4 Oracle High Availability Solutions

5 Standby Database Implementation Create a backup of the database: RMAN> run 2> { 3> allocate channel c1 type disk; 4> backup database plus archivelog; 5> } Create backup of database control file: RMAN> run 2> { 3> allocate channel c1 type disk; 4> backup current controlfile for standby; 5> } Copyright System Managers LLC 2007 all rights reserved.

6 Standby Database Implementation Make a copy of the primary database init.ora file. The copy will be used as the init.ora file for the standby database. Add the following to the primary database init.ora file log_archive_dest_2='SERVICE=STANDBY' Add the following to the standby database init.ora file db_unique_name='standby' instance_name='standby'

7 Standby Database Implementation Transfer the backup pieces to the standby server Restore the database from the backup: RMAN> set dbid= ; RMAN> restore standby controlfile; RMAN> sql 'alter database mount standby database'; RMAN> restore database; Copyright System Managers LLC 2007 all rights reserved.

8 Standby Database Implementation Put the standby database in recover managed mode Log into the database instance as the SYSDBA user. SQL> alter database recover managed standby database disconnect from session; To activate the standby database: SQL > alter database open activate standby database;

9 Standby Database Views Copyright System Managers LLC 2008 all rights reserved. View NameServerFunction V$MANAGED_STANDBY StandbyDisplays current status information for Oracle database processes related to standby database. View NameServerFunction V$ARCHIVED_LOG Primary Standby Displays archive redo log information from the control file, including names of the archived redo log files.

10 Standby Database Views Copyright System Managers LLC 2008 all rights reserved. View NameServerFunction V$ARCHIVE_GAP Primary Standby Displays information to help you identify a gap in the archived redo log files. View NameServerFunction V$DATABASE Primary Standby Displays the current role of the database

11 RAC Implementation Global Cache Services: Process that implements “Cache Fusion”. It maintains the block mode for blocks in the global role. It is responsible for block transfers between instances. The Global Cache Service employs various background processes such as the Global Cache Service Processes (LMSn) and Global Enqueue Service Daemon (LMD). Copyright System Managers LLC 2008 all rights reserved.

12 RAC Implementation Global Enqueue Service: The GES is responsible for maintaining coherency in the dictionary and library caches. Any DDL committed from a requesting node needs to be synched and written across all data dictionaries in all nodes of the RAC environment. The GES makes sure that the changes remain consistent across the nodes and that there are no discrepancies. Copyright System Managers LLC 2008 all rights reserved.

13 RAC Implementation There are two software packages that must be installed. The first is the RDBMS software, the second id cluster ready services (CRS). Each package should be installed into its own ORACLE_HOME. ship_10g_crs_disk1.cpio ship_10g_db_disk1.cpio Copyright System Managers LLC 2008 all rights reserved.

14 RAC Implementation After installing the software the Net8 listener and the global services daemon must be started: $CRS_HOME/bin/gsdctl start $ORACLE_HOME/bin/lsnrctl start Copyright System Managers LLC 2008 all rights reserved.

15 RAC Implementation Creating a two-node cluster: Use the “srvctl” utility to add the database and the instances to the cluster: srvctl add database -d db10g -o /u01/app/oracle/product/10.1.0/db_1 srvctl add instance -d db10g -i db10g1 -n server01 srvctl add instance -d db10g -i db10g2 -n server02 Copyright System Managers LLC 2008 all rights reserved.

16 RAC Implementation Remove an instance from cluster srvctl remove instance -d db10g -i db10g2 Start and stop the cluster srvctl start database -d db10g srvctl stop database -d db10g Copyright System Managers LLC 2008 all rights reserved.

17 RAC Implementation Start and stop individual instance: srvctl start instance -d db10g -i db10g1 srvctl stop instance -d db10g -i db10g1 Get status of whole database or a specific instance: srvctl status database -d db10g srvctl status instance -d db10g -i db10g1 Copyright System Managers LLC 2008 all rights reserved.

18 RAC Load Balancing and Fail Over Client applications can take advantage of RACs load balancing and fail over features. A typical “tnsnames.ora” entry might look like: db10g = (DESCRIPTION= (LOAD_BALANCE=ON) (FAILOVER=ON) (ADDRESS=(PROTOCOL=TCP)(HOST=server01)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=server02)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=db10g) (FAILOVER_MODE= (TYPE=SELECT) (METHOD=BASIC) (RETRIES=20) (DELAY=15) ) Copyright System Managers LLC 2008 all rights reserved.

19 RAC Views A typical dynamic view for a Single Node installation starts with “ V$ ”. A RAC installation will have additional “ GV$ ” views also known as Global Views. The following query will identify V$ views that are not duplicated as GV$ views: SQL > SELECT object_name FROM dba_objects WHERE object_name LIKE 'V$%' AND object_name NOT IN ( SELECT SUBSTR(object_name, 2) FROM dba_objects WHERE object_name LIKE 'GV$%') ORDER BY 1; Copyright System Managers LLC 2008 all rights reserved.

20 RAC Views Oracle MetalLink provides the RAC diagnostic script “racdiag.sql”. Some of the information collected by the script includes: GES locks LOCAL ENQUEUES LATCH HOLDERS GLOBAL CACHE PERFORMANCE RESOURCE USAGE INITIALIZATION PARAMETERS TOP 10 WAIT EVENTS CURRENT SQL FOR WAITING SESSIONS Copyright System Managers LLC 2008 all rights reserved.


Download ppt "INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008."

Similar presentations


Ads by Google