Oracle9i Performance Tuning Chapter 11 Advanced Tuning Topics.

Slides:



Advertisements
Similar presentations
Performance Testing - Kanwalpreet Singh.
Advertisements

Database Architectures and the Web
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
Chapter 13 (Web): Distributed Databases
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
Client/Server Databases and the Oracle 10g Relational Database
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 17 Client-Server Processing, Parallel Database Processing,
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
DISTRIBUTED COMPUTING
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
Distributed Databases
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Passage Three Introduction to Microsoft SQL Server 2000.
13 Copyright © 2004, Oracle. All rights reserved. Oracle Shared Servers.
ADVANCE REPLICATION Oracle Coretech Surabaya (OCS) One Day Seminar Surabaya, August 30 th 2008.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Server Load Balancing. Introduction Why is load balancing of servers needed? If there is only one web server responding to all the incoming HTTP requests.
Managing Multi-User Databases AIMS 3710 R. Nakatsu.
Introduction and simple using of Oracle Logistics Information System Yaxian Yao
Connector Types Interaction services broadly categorize connectors Many details are left unexplained. They fail to provide enough detail to be used in.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
Oracle 10g Administration Oracle Shared Server Copyright ©2006, Custom Training Institute.
Oracle10g RAC Service Architecture Overview of Real Application Cluster Ready Services, Nodeapps, and User Defined Services.
Database Design – Lecture 16
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
Module 7: Fundamentals of Administering Windows Server 2008.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
By Lecturer / Aisha Dawood 1.  Dedicated and Shared Server Processes  Configuring Oracle Database for Shared Server  Oracle Database Background Processes.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 12 Distributed Database Management Systems.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 12 Distributed Database Management Systems.
Module 10: Maintaining High-Availability. Overview Introduction to Availability Increasing Availability Using Failover Clustering Standby Servers and.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
A Guide to Oracle9i1 Database Instance startup and shutdown.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
Module 13 Implementing Business Continuity. Module Overview Protecting and Recovering Content Working with Backup and Restore for Disaster Recovery Implementing.
Oracle's Distributed Database Bora Yasa. Definition A Distributed Database is a set of databases stored on multiple computers at different locations and.
Architectural Design of Distributed Applications Chapter 13 Part of Design Analysis Designing Concurrent, Distributed, and Real-Time Applications with.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Ing. Erick López Ch. M.R.I. Replicación Oracle. What is Replication  Replication is the process of copying and maintaining schema objects in multiple.
DNS DNS overview DNS operation DNS zones. DNS Overview Name to IP address lookup service based on Domain Names Some DNS servers hold name and address.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
DATABASE REPLICATION DISTRIBUTED DATABASE. O VERVIEW Replication : process of copying and maintaining database object, in multiple database that make.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
Course Topics Administering SQL Server 2012 Jump Start 01 | Install and Configure SQL Server04 | Manage Data 02 | Maintain Instances and Databases05 |
5 Copyright © Oracle Corporation, All rights reserved. Usage and Configuration of the Oracle Shared Server.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Usage and Configuration of the Oracle Shared Server Supinfo Oracle Lab. 5.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Distributed File System. Outline Basic Concepts Current project Hadoop Distributed File System Future work Reference.
Chapter 5 Managing Multi-user Databases 1. Multi-User Issues Database Administration Concurrency Control Database Security Database Recovery Page 307.
Topics in Distributed Databases Database System Implementation CSE 507 Some slides adapted from Navathe et. Al and Silberchatz et. Al.
System Models Advanced Operating Systems Nael Abu-halaweh.
Distributed Databases – Advanced Concepts Chapter 25 in Textbook.
Client/Server Databases and the Oracle 10g Relational Database
Maximum Availability Architecture Enterprise Technology Centre.
Always on HA SQL Server Always ON feature is the new comprehensive high availability and disaster recovery solution which increases application availability.
Oracle Architecture Overview
What’s new in SQL Server 2016 Availability Groups
SQL Server 2016 High Performance Database Offer.
Presentation transcript:

Oracle9i Performance Tuning Chapter 11 Advanced Tuning Topics

Chapter 11: Advanced Tuning Topics2 Chapter Objectives Learn how to configure and monitor shared servers Understand distributed transactions Set up replications and use materialized views Understand the concept of Oracle Real Application Clusters

Chapter 11: Advanced Tuning Topics3 Dedicated Server Mode Dedicated server mode is the default mode and it is most commonly used It is an Oracle server process dedicated to serving requests for one specific user connection and session

Chapter 11: Advanced Tuning Topics4 Dedicated Server Mode (continued)

Chapter 11: Advanced Tuning Topics5 Dedicated Server Process 1.Client initiates a request to connect to the database; listener process picks up the request 2.Listener process creates a dedicated server for the client 3.Listener process tells the client the memory address of the dedicated server assigned to it 4.Client connects to the dedicated server and submits requests to the database through the dedicated server; the dedicated server responds to the user’s requests 5.Dedicated server works on the request 6.Dedicated server sends back results to client

Chapter 11: Advanced Tuning Topics6 Dedicated Server Process (continued)

Chapter 11: Advanced Tuning Topics7 Dedicated Server Analogy

Chapter 11: Advanced Tuning Topics8 Shared Server Mode A shared server process is shared among all user connections connecting in this mode A shared server process receives and responds to all requests submitted by the users

Chapter 11: Advanced Tuning Topics9 Shared Server Mode (continued)

Chapter 11: Advanced Tuning Topics10 Shared Server Architecture Dispatcher layer: This layer comprises one or many dispatcher processes acting as an interface between the user and Oracle Each dispatcher process also controls server processes and assigns to them requests submitted by users Server layer: This layer comprises many server processes Each server process handles the user requests assigned by the dispatcher Queue layer: This layer is a data structure that keeps a queue of requests and responses

Chapter 11: Advanced Tuning Topics11 Shared Server Architecture (continued)

Chapter 11: Advanced Tuning Topics12 Shared Server Process 1. Client initiates a request to connect to the database; listener process picks up the request 2. Listener process tells the client the memory address of the shared server 3. Client connects to the dispatcher 4. Client submits requests to the database via the dispatcher process 5. Dispatcher process places the request in a queue for the server process to handle it 6. Server process picks up the request from the queue to process it 7. Server process works on the request until it is completed 8. Server process places the results of the request in a response queue 9. Dispatcher picks up the result of the request from the response queue 10. Dispatcher sends the results of the request to client

Chapter 11: Advanced Tuning Topics13 Shared Server Process (continued)

Chapter 11: Advanced Tuning Topics14 Shared Server Analogy

Chapter 11: Advanced Tuning Topics15 Shared Server – Client Configuration

Chapter 11: Advanced Tuning Topics16 Shared Server – Server Side Setup The following is a list of all required parameters for shared server mode configuration: DISPATCHERS: sets the number of dispatcher processes to be initiated for the database (formerly known as MTS_DISPATCHERS) MAX_DISPATCHERS: tells Oracle the maximum number of dispatcher processes that can be run concurrently (formerly known as MTS_MAX_DISPATCHERS) SHARED_SERVERS: sets the number of server processes to be initiated (formerly known as MTS_SERVERS)

Chapter 11: Advanced Tuning Topics17 Shared Server – Server Side Setup (continued) MAX_SHARED_SERVERS: tells Oracle the maximum number of servers that can be run concurrently (formerly known as MTS_MAX_SERVERS) CIRCUITS: indicates the total number of virtual circuits for inbound and outbound network connections (formerly known as MTS_CIRCUITS); each connection is a circuit SHARED_SERVER_SESSIONS: indicates the total number of sessions allowed using shared servers (formerly known as MTS_SERVERS)

Chapter 11: Advanced Tuning Topics18 Shared Server – Server Side Setup (continued)

Chapter 11: Advanced Tuning Topics19 Shared Server – Server Side Setup (continued)

Chapter 11: Advanced Tuning Topics20 Shared Server Performance Views

Chapter 11: Advanced Tuning Topics21V$CIRCUIT

Chapter 11: Advanced Tuning Topics22V$DISPATCHER

Chapter 11: Advanced Tuning Topics23 Using V$DISPATCHER_RATE The 66 columns of this view are classified into the four categories listed here: CUR_ : Current statistics column MAX_ : Maximum statistics value that is ever reached for this column AVG_ : Historical average value for this column TTL_ : Time To Live; this is a statistic value for the most recent time interval SCALE_ : Scale values for the TTL_ columns

Chapter 11: Advanced Tuning Topics24 Using V$QUEUE

Chapter 11: Advanced Tuning Topics25 Using V$SHARED_SERVER

Chapter 11: Advanced Tuning Topics26 Using V$SHARED_SERVER_MONITOR

Chapter 11: Advanced Tuning Topics27 Advantages of Shared Servers The following are some advantages of shared servers: They work very well with a large pool of connections to the database Resources used by shared servers are well balanced, which means there is no waste of resources if some user connections are inactive; in that case, resources will be used by the active connections They scale down or up depending on the connection’s load They enable you to use both dedicated server mode and shared server mode They are well suited for Web applications in which there is a high percentage of connections and disconnections; shared servers have less time overhead than dedicated servers

Chapter 11: Advanced Tuning Topics28 Advantages of Shared Servers (continued) The following are some advantages of shared servers: Connections are not rejected because resources are lacking; shared servers can be configured to set a limit on the number of allowed connections They work very well with Oracle Connection Manager for connection pooling They allow users to share dispatcher and server processes They use less memory than dedicated servers, especially if user connections are not active

Chapter 11: Advanced Tuning Topics29 Disadvantages of Shared Servers The following are some disadvantages of shared servers: Unlike dedicated servers, shared servers require DBA setup and configuration time and effort DBAs are required to monitor the performance of the shared servers Shared servers may not perform for all types of applications and sessions DBAs must connect to shared servers using dedicated server mode Tracing sessions using SQL Trace are not possible They are not suitable if you are already using middleware to handle user connections

Chapter 11: Advanced Tuning Topics30 Distributed Transactions Overview A distributed transaction comprises one or more DML statements executed on more than one database as one single transaction Oracle supports a mechanism called two-phase commit This mechanism ensures that data changes by distributed transactions are committed in all databases

Chapter 11: Advanced Tuning Topics31 Distributed Transactions Overview (continued) The two-phase commit has the following phases: Preparation phase: In this phase, the main database (local) informs all databases to prepare for a commit This includes recording information about the transaction in the redo log and locking modified data Commit phase: In this phase, the main database tells all involved databases to commit the changes After the databases commit changes, they notify the main database whether the commit failed or succeeded Once all the databases have notified the main database that the commit is completed, changes in the main database are committed

Chapter 11: Advanced Tuning Topics32 Distributed Transactions Using Database Links

Chapter 11: Advanced Tuning Topics33 DATABASE LINK Options SHARED option: tells Oracle to create a database link that can be shared among multiple users PUBLIC option: tells Oracle to allow all users to use the database link CONNECT TO CURRENT_USER (authentication method #1 known as CURRENT-USER): tells Oracle to use the current user for authentication to the database you’re trying to link to CONNECT TO user IDENTIFIED BY password (authentication method #2 known as FIXED-USER): tells Oracle to use the user and password provided in this clause for authentication to the database you are trying to link to AUTHENTICATE BY (authentication method #3 known as CONNECTED-USER): tells Oracle to use the credentials of the connected user who has an existing account in the database you are trying to link to USING ‘connect_string’: tells Oracle the TNSNAME (service name) to use to connect to the database you are trying to link to

Chapter 11: Advanced Tuning Topics34 DATABASE LINK Performance Issues The following is a list of parameters that influence performance for the DATABASE LINK: dblink_encrypt_login: tells Oracle whether to use encryption when connecting to other databases distributed_lock_timeout: the amount of time in seconds to wait to obtain a lock on a desired resource open_links: total number of open links per session open_links_per_instance: total number of open links per session

Chapter 11: Advanced Tuning Topics35 Replication Architecture Replication is the process of copying and maintaining changes to data objects As the changes occur on the primary database, they are applied to the secondary database

Chapter 11: Advanced Tuning Topics36 Replication Architecture (continued)

Chapter 11: Advanced Tuning Topics37 Supported Objects for Replication Oracle supports the replication of the following objects: Indexes: enable fast access to data stored in tables Indextypes: enable the creation of new indexing schemes Packages and package bodies: enable developers to package procedures, functions, and data variables within one object Procedures and functions: enable users to write code in modules to perform a specific task or function Synonyms: enable database object aliasing

Chapter 11: Advanced Tuning Topics38 Supported Objects for Replication (continued) Tables: represent the most common and the main database objects used to store data Triggers: enable users to write code to be invoked when an event occurs User-defined operators: enable developers and administrators to define their own operators to perform a specific operation User-defined types and type bodies: allow developers to create their own user-defined data types and data objects Views and object views: simplify complicated queries and limit the scope of what data users can see

Chapter 11: Advanced Tuning Topics39 Benefits of Replication The following are some benefits of replication: Data availability: Replication offers another layer of ensuring data availability and access in case of failure in the master site Data can still be accessible through the replica site Data synchronization: Oracle replication provides a reliable means of ensuring that data is synchronized between replicated databases Development effort: Replication is a function of Oracle that has been proven to be a robust feature Developers or database administrators need not develop any code to replicate data Performance: Oracle has invested resources to ensure that the process of replication is fast and reliable, provided the network connection between databases is reliable and has a high bandwidth and that the replicated databases are geographically adjacent to each other

Chapter 11: Advanced Tuning Topics40 Replication Methods Asynchronous replication is also known as store-and- forward replication Data changes on the master site will be stored in the database first and then periodically at a set time, the changes will be forwarded to all replica sites Synchronous replication is also known as real-time- replication Synchronous replication acts like a single transaction: any data changes on the master site will not be stored until changes are stored on all replica sites

Chapter 11: Advanced Tuning Topics41 Types of Replication Multimaster Single-Master

Chapter 11: Advanced Tuning Topics42 Materialized-view Replication There are two types of materialized-view replication: Read-only materialized-view replication: In this type, data is replicated through the use of a materialized view which is in read-only mode Data cannot be updated through the materialized view, only through the table in the master site Updatable materialized-view replication: With this type of replication, data is replicated from the master site using a materialized view Any changes on the replica site are synchronized and refreshed with the master site Users can update data directly to the master or replica site

Chapter 11: Advanced Tuning Topics43 Hybrid Replication Hybrid replication combines multimaster replication and materialized-view replication

Chapter 11: Advanced Tuning Topics44 Diagnosing Replication Performance When you diagnose replication problems, make sure that: The underlying database link is working (you should be able to connect to the remote database from the local database) The scheduled interval value provided for the START WITH clause in the CREATE statement is valid The scheduled interval for refreshing is longer than the execution time to refresh the data The network connection between the two databases is stable The maximum number of open links has not been reached for the replica site You have enough storage for both the MATERIALIZED VIEW and MATERIALIZED VIEW LOG

Chapter 11: Advanced Tuning Topics45 Real Application Cluster The Oracle Real Application Cluster is an architecture in which multiple Oracle instances access and work on one shared Oracle database

Chapter 11: Advanced Tuning Topics46 RAC Characteristics Oracle9i RAC provides the following benefits: High availability: Database downtime is decreased Scalability: Oracle instance(s) and database can scale-up or scale-down depending on business growth Increased performance and throughput: RAC takes advantage of hardware resources to improve performance and efficiency Failover mechanism: RAC supports the Oracle Data Guard feature that facilitates the failover to another instance and database in case of failure Manageability: Once it is configured and implemented, there is little need for tuning Oracle9i RAC disadvantages include the following: Hardware: RAC requires more hardware resources than the normal setup of Oracle instance, specifically CPUs and memory resources Expertise: Configuring and implementing RAC requires expertise

Chapter 11: Advanced Tuning Topics47Summary Dedicated servers are more widely used than shared servers and are the default Oracle configuration A client connected to an Oracle instance using dedicated server mode is served by a dedicated process A shared server is a process shared among all users connecting in this mode A shared server is composed of three layers that interact with each other: dispatcher, server, and queue structure Configuring the database in shared server mode requires setting parameters in the INIT.ORA file on the database side and the service name in the TNSNAMES.ORA file on the client side Types of replication include the following: multimaster replication, single-master replication, materialized-view replication, and hybrid replication