Oracle TimesTen and In-Memory Database Cache 11g



Similar documents
HOUG Konferencia Oracle TimesTen In-Memory Database and TimesTen Application-Tier Database Cache. A few facts in 10 minutes

<Insert Picture Here> Oracle In-Memory Database Cache Overview

Oracle Identity and Access Management: The All-In-One Seminar Student Guide

Oracle Application Server 10g: Administer High Availability

Oracle BI Discoverer Administrator 11g: Develop an EUL

Oracle Enterprise Manager

1 Changes in this release

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

Oracle Stellent 10gR3: Information Rights Management

An Oracle Technical White Paper July Using Oracle In-Memory Database Cache to Accelerate the Oracle Database

Oracle Database 10g: Parallelism and Scalability Overview Seminar

Oracle BI 10g: Analytics Overview

Analytics: Pharma Analytics (Siebel 7.8) Student Guide

Oracle CRM On Demand Data Import Workshop Student Guide

The First Example of TimesTen with Oracle on Windows

CASE STUDY: Oracle TimesTen In-Memory Database and Shared Disk HA Implementation at Instance level. -ORACLE TIMESTEN 11gR1

Oracle Database 11g: Administer a Data Warehouse

Oracle BPA Suite: Model and Implement Business Processes Volume I Student Guide

Oracle SOA Suite 11g: Essential Concepts Student Guide

Oracle TimesTen In-Memory Database on Oracle Exalogic Elastic Cloud

Changes for Release 3.0 from Release 2.1.1

Oracle TimesTen In-Memory Database

Oracle Communications WebRTC Session Controller: Basic Admin. Student Guide

Oracle Fusion Middleware

Oracle Fusion Middleware User s Guide for Oracle Approval Management for Microsoft Excel 11gRelease 1 ( )

Oracle Enterprise Manager

Oracle Fusion Middleware

Oracle Enterprise Manager

Oracle TimesTen In-Memory Database Introduction Release 7.0 B

Bryan Tuft Sr. Sales Consultant Global Embedded Business Unit

Oracle CRM Foundation

Oracle Database 11g: Advanced PL/SQL

Birds of a Feather Session: Best Practices for TimesTen on Exalytics

Oracle Enterprise Manager

Oracle TimesTen IMDB - An Introduction

Postgres Plus xdb Replication Server with Multi-Master User s Guide

NetFlow Collection and Processing Cartridge Pack User Guide Release 6.0

Module 14: Scalability and High Availability

Oracle Enterprise Manager. Description. Versions Supported. Prerequisites

Maximum Availability Architecture

An Oracle White Paper July Introducing the Oracle Home User in Oracle Database 12c for Microsoft Windows

An Oracle White Paper June RESTful Web Services for the Oracle Database Cloud - Multitenant Edition

SQL Server Training Course Content

Oracle WebLogic Server 11g: Monitor and Tune Performance

Oracle CRM Foundation

Oracle Total Recall with Oracle Database 11g Release 2

MySQL and Virtualization Guide

An Oracle White Paper June Security and the Oracle Database Cloud Service

Oracle TimesTen In-Memory Database

Secure Configuration Guide

Maximum Availability Architecture. Oracle Best Practices For High Availability. Backup and Recovery Scenarios for Oracle WebLogic Server: 10.

Oracle Net Services for Oracle10g. An Oracle White Paper May 2005

Disaster Recovery for Oracle Database

Oracle Endeca Server. Cluster Guide. Version May 2013

Oracle TimesTen In-Memory Database

How To Load Data Into An Org Database Cloud Service - Multitenant Edition

Migrating Non-Oracle Databases and their Applications to Oracle Database 12c O R A C L E W H I T E P A P E R D E C E M B E R

An Oracle White Paper January A Technical Overview of New Features for Automatic Storage Management in Oracle Database 12c

Oracle Enterprise Manager. Description. Versions Supported

An Oracle White Paper May Oracle Database Cloud Service

Oracle Database 11g Comparison Chart

Oracle Database: SQL and PL/SQL Fundamentals NEW

An Oracle White Paper February, Oracle Database In-Memory Advisor Best Practices

2 Software requirements and installation

Oracle TimesTen In-Memory Database

Oracle 11g Database Administration

RTI Database Integration Service. Getting Started Guide

Oracle Database 11g: Data Warehousing Fundamentals

Oracle Enterprise Manager. Description. Versions Supported

An Oracle White Paper June High Performance Connectors for Load and Access of Data from Hadoop to Oracle Database

Oracle WebCenter Sites. Backup and Recovery Guide 11g Release 1 (11.1.1)

Oracle Sales Compensation

An Oracle White Paper November Leveraging Massively Parallel Processing in an Oracle Environment for Big Data Analytics

Automatic Service Migration in WebLogic Server An Oracle White Paper July 2008

SQLBase. Starter Guide

System Administration of Windchill 10.2

An Oracle White Paper July Oracle ACFS

Oracle TimesTen In-Memory Database

Oracle Fusion Middleware User s Guide for Oracle Insurance Claim Management Process Accelerator 11gRelease 1 ( )

Oracle Database. Products Available on the Oracle Database Examples Media. Oracle Database Examples. Examples Installation Guide 11g Release 2 (11.

Oracle Architecture, Concepts & Facilities

Administering a Microsoft SQL Server 2000 Database

An Oracle White Paper May Creating Custom PDF Reports with Oracle Application Express and the APEX Listener

An Oracle Technical White Paper June Oracle VM Windows Paravirtual (PV) Drivers 2.0: New Features

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

Oracle Enterprise Manager. Description. Versions Supported

Oracle Audit Vault Administrator s Guide Oracle Audit Vault Auditor s Guide Oracle Enterprise Manager Cloud Control Administrator s Guide

An Oracle White Paper February Oracle Data Integrator 12c Architecture Overview

Oracle Enterprise Single Sign-on Logon Manager How-To: Configuring ESSO-LM Event Logging with Microsoft SQL Server 2005 Release

An Oracle White Paper October BI Publisher 11g Scheduling & Apache ActiveMQ as JMS Provider

Using MySQL for Big Data Advantage Integrate for Insight Sastry Vedantam

In-memory databases and innovations in Business Intelligence

Oracle Enterprise Manager

Oracle TimesTen: An In-Memory Database for Enterprise Applications

Oracle Fusion Middleware

FIFTH EDITION. Oracle Essentials. Rick Greenwald, Robert Stackowiak, and. Jonathan Stern O'REILLY" Tokyo. Koln Sebastopol. Cambridge Farnham.

Transcription:

Oracle TimesTen and In-Memory Database Cache 11g Student Guide D61394GC10 Edition 1.0 July 2010 D68159

Author Danny Lau Technical Contributors and Reviewers Rohan Aranha David Aspinwall Cathy Baird Nagender Bandi Susan Cheung Debster Desantis Sam Drake Kirk Edson Sourav Ghosh James Healy Douglas Hood Chi-Kim Hoang Charles Hoch Chris Jenkins Simon Law Sheryl Maring Mark McAuliffe John Miller Marie-Anne Neimat William Paulsen Manish Pawar Martin Reames Paul Tuck Maureen Wagener Chih-Ping Wang Brian Wright Copyright 2010, Oracle and/or it affiliates. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Government s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Editors Raj Kumar Amitha Narayan Richard Wallis Graphic Designer Satish Bettegowda Publishers Shaik Mahaboob Basha Veena Narasimhan

Contents Preface 1 Introduction and Course Overview Course Objectives 1-2 Intended Audience and Course Prerequisites 1-3 Suggested Agenda 1-4 2 Overview of Oracle TimesTen In-Memory Database Objectives 2-2 Oracle TimesTen In-Memory Database 2-3 TimesTen In-Memory Database: Persistent, Recoverable, and Highly Available 2-4 Oracle In-Memory Database Cache: An Oracle Database Option 2-5 Oracle In-Memory Database Cache 2-6 Extremely Fast Response Time 2-7 Update Throughput and Linear Scalability 2-9 TimesTen Application Development Frameworks 2-10 Summary 2-11 3 Getting Started with TimesTen In-Memory Database Objectives 3-2 TimesTen Quick Start 3-3 TimesTen Documentation Library 3-5 TimesTen Instances and the Instance Administrator 3-6 Data Source Names (DSNs) 3-7 TimesTen DSN Attribute Classifications 3-8 Define a Direct-Connect DSN on a UNIX System 3-9 Define a Direct-Connect DSN on a Microsoft Windows System 3-10 Create a TimesTen Database 3-11 ttisql Utility 3-12 Oracle SQL Developer 3-14 Create a TimesTen Database Connection in SQL Developer 3-15 Use a TimesTen Database Connection in SQL Developer 3-16 Disconnect a TimesTen Database Connection from SQL Developer 3-17 ttdestroy Utility 3-18 Summary 3-19 iii

4 Creating and Accessing TimesTen Database Elements Objectives 4-2 Database Elements 4-3 Data Types 4-4 Tables 4-5 SQL Table DDL Statements 4-6 Access Control 4-8 Define Users 4-9 Assign Privileges 4-10 Connection Strings 4-12 User IDs and Passwords 4-13 Indexes 4-14 SQL Index DDL Statements 4-15 Alter a Table 4-16 SQL DML Statements: SELECT 4-18 SQL DML Statements: INSERT 4-19 SQL DML Statements: UPDATE 4-20 SQL DML Statements: DELETE 4-21 ROWID and ROWNUM 4-22 Sequences 4-23 Views 4-24 Synonyms 4-26 Create a Table by Using SQL Developer 4-27 Create an Index by Using SQL Developer 4-28 Create a Sequence by Using SQL Developer 4-29 Create a View by Using SQL Developer 4-30 Assign Object Privileges to a User in SQL Developer 4-31 Remove Object Privileges from a User in SQL Developer 4-32 PL/SQL Support in TimesTen 4-33 PL/SQL Anonymous Blocks 4-34 PL/SQL Stored Procedures and Functions 4-35 PL/SQL Packages 4-36 Reference PL/SQL Package Objects 4-37 Differences Between TimesTen and Oracle PL/SQL 4-38 TimesTen APIs 4-39 OCI Support in TimesTen 4-40 Connect to a TimesTen Database from an OCI Application 4-41 Pro*C/C++ Support in TimesTen 4-42 ttsrcscan Utility 4-43 Summary 4-44 iv

5 Managing TimesTen Databases Objectives 5-2 ttbulkcp Utility 5-3 ttbackup and ttrestore Utilities 5-4 ttmigrate Utility 5-5 ttschema Utility 5-6 TimesTen System Tables and Views 5-7 TimesTen Database Memory Regions 5-8 SYS.MONITOR System Table: Database Memory Region Sizes 5-9 ttsize Utility 5-10 ttstatus Utility: TimesTen Database Connections 5-11 TimesTen Built-In Procedures 5-12 TimesTen Database RAM Policy 5-13 Database RAM Policy Setting 5-14 Change the Size of a TimesTen Database 5-15 Summary 5-16 6 Concurrency Control and Performance Tuning Objectives 6-2 Start and Complete Transactions 6-3 Implicit Commit 6-4 Transaction Logging 6-5 Transaction Durability 6-6 Transaction Isolation Level 6-7 Read Committed Isolation 6-8 Serializable Isolation 6-9 ttxactadmin Utility 6-10 Prepare and Execute Parameterized Statements 6-11 TimesTen Query Optimizer 6-13 Query Optimizer Statistics 6-14 Compute Statistics 6-15 Update the Table and Column Statistics by Using SQL Developer 6-16 Use of Indexes in Query Processing 6-17 View an Execution Plan 6-20 Command Cache 6-23 Time Statement Execution 6-24 Summary 6-25 v

7 Configuring TimesTen Client/Server Connections Objectives 7-2 Overview of TimesTen Client/Server 7-3 Client/Server Setup and Configuration 7-4 Server DSNs 7-5 Define a Server DSN on a UNIX System 7-6 Define a Server DSN on a Microsoft Windows System 7-7 Logical Server Names 7-8 Define a Logical Server Name on a UNIX System 7-9 Define a Logical Server Name on a Microsoft Windows System 7-10 Client DSNs 7-11 Define a Client DSN on a UNIX System 7-12 Define a Client DSN on a Microsoft Windows System 7-13 Access a TimesTen Database with a Client/Server Connection 7-15 Other Communication Modes for Local Client/Server Connections 7-16 Configure a Multithreaded TimesTen Server Process 7-17 ttstatus Utility: Server Status and Client/Server Connections 7-19 Summary 7-20 8 Overview of Oracle In-Memory Database Cache Objectives 8-2 Oracle In-Memory Database Cache 8-3 Cache Oracle Data in TimesTen 8-4 Define the Set of Data to Cache 8-5 Read-Only Cache for Frequently Queried Data 8-6 Example: Multiple Read-Only Caches 8-7 Updatable Cache with Transactional Consistency 8-8 Example: Multiple Updatable Caches 8-9 Dynamic Cache 8-10 Example: Dynamic Caches 8-11 Sliding Window Cache 8-12 In-Memory Database Cache Grid 8-13 Summary 8-14 9 Getting Started with Oracle In-Memory Database Cache Objectives 9-2 Oracle In-Memory Database Cache: System Requirements 9-3 Create Oracle Users 9-4 Define a DSN for the TimesTen Database 9-6 Create TimesTen Users 9-7 Set the Cache Administration User Name and Password 9-8 vi

Set the Cache Administration User Name and Password by Using SQL Developer 9-9 Cache Grid Concepts 9-10 Cache Grid Benefits 9-11 Configure a Cache Grid 9-12 Start the Cache Agent and Set an Agent Start Policy 9-13 Start the Cache Agent by Using SQL Developer 9-14 ttstatus Utility: Cache Agent Status 9-15 Summary 9-16 10 Creating Cache Groups Objectives 10-2 Cache Group Definition 10-3 Cache Group Concepts 10-4 Read-Only Cache Group 10-5 Create a Local Explicitly Loaded Read-Only Cache Group 10-6 Load and Refresh a Cache Group 10-7 Unload a Cache Group 10-8 Read-Only Cache Group Automatic Refresh Interval 10-9 Pass-Through of Statements from TimesTen to Oracle 10-10 Configure Statement Pass-Through 10-11 Create a Local Dynamic Read-Only Cache Group 10-12 Dynamic Load Operation 10-13 Cache Group Data-Aging Policy 10-14 Benefits of Read-Only Caching 10-15 Benefits of On-Demand and Sliding Window Caching 10-16 Asynchronous Write-Through Cache Group 10-17 Create a Local Dynamic Asynchronous Write-Through Cache Group 10-18 Create a Global Dynamic Asynchronous Write-Through Cache Group 10-19 Create a Global Explicitly Loaded Asynchronous Write-Through Cache Group 10-20 Attach a TimesTen Database to a Cache Grid 10-21 Operations on Global Cache Groups 10-22 Benefits of Write-Through Caching 10-23 Summary 10-24 11 Other Cache Group Operations and Topics Objectives 11-2 Create a Multiple-Table Cache Group 11-3 User-Managed Cache Group 11-4 Create a User-Managed Cache Group 11-5 vii

PROPAGATE and READONLY Cache Table Attributes 11-6 Flush a Cache Group 11-8 Create a Cache Group by Using SQL Developer 11-9 Specify AUTOREFRESH Cache Group Attribute by Using SQL Developer 11-14 Define Cache Group Data Aging Policy by Using SQL Developer 11-15 Load or Refresh a Cache Group by Using SQL Developer 11-16 Unload a Cache Group by Using SQL Developer 11-17 Flush a Cache Group by Using SQL Developer 11-18 Drop a Cache Group by Using SQL Developer 11-19 Summary 11-20 12 Overview of TimesTen to TimesTen Replication Objectives 12-2 TimesTen to TimesTen Replication 12-3 Active-Standby Pair 12-4 TimesTen Replication Architecture 12-5 Asynchronous Replication 12-6 Synchronous Replication 12-7 Summary 12-8 13 Configuring Replication of TimesTen Databases Objectives 13-2 Configure a Replicated System 13-3 Active-Standby Pair Replication Scheme 13-4 Create an Active-Standby Pair Replication Scheme 13-5 Create and Configure the Standby and Subscriber Databases 13-6 Asynchronous Replication: Data Flow 13-7 Return Two-Safe Synchronous Replication Scheme 13-8 Return Two-Safe Replication: Data Flow 13-9 Replicate Cache Tables 13-10 Replicate Cache Tables in a Read-Only Cache Group 13-11 Replicate Cache Tables in an Asynchronous Write-Through Cache Group 13-12 Configure Replication on Cache Tables 13-13 Attach an Active-Standby Pair to a Cache Grid 13-14 Start the Replication Agent and Set an Agent Start Policy 13-15 ttstatus Utility: Replication Agent Status 13-16 Replication Agent Port Allocation 13-17 Compress Replicated Updates 13-18 Replication on Systems with Multiple Network Interface Cards (NICs) 13-19 Summary 13-20 viii

14 Database Recovery and Monitoring Replication Objectives 14-2 Replication States 14-3 Change the Replication State 14-4 Transaction Log File Threshold 14-5 Recover a Failed Replicated Database 14-6 Recover a Failed Replicated Database in an Active-Standby Pair 14-7 Automatic Client Connection Failover 14-9 Configure Automatic Client Connection Failover 14-10 Active-Standby Pair Database Recovery with a Read-Only Cache Group 14-11 Active-Standby Pair Database Recovery with an AWT Cache Group 14-12 TimesTen Replication Monitoring: ttrepadmin Utility Commands 14-13 TimesTen Replication Monitoring: SYS.MONITOR System Table 14-17 TimesTen Replication Monitoring: Built-In Procedures 14-18 Summary 14-19 15 Using Oracle Clusterware with TimesTen to Provide a High-Availability Solution Objectives 15-2 Oracle Clusterware and TimesTen 15-3 Oracle Clusterware and TimesTen System Requirements 15-4 TimesTen Resource Monitoring Managed by Oracle Clusterware 15-5 Oracle Clusterware Levels of Availability for TimesTen 15-6 Create a Cluster for Basic Level of Availability 15-7 ttcwadmin Utility 15-8 Configure Oracle Clusterware Resources for an Active-Standby Pair 15-9 Implement Application Failover for Basic Level of Availability 15-10 Simple and Automated High-Availability Solution 15-11 TimesTen Nodes in a Cluster Configured for Advanced Level of Availability 15-12 Create a Cluster for Advanced Level of Availability 15-13 Configure Oracle Clusterware Resources for Advanced Level of Availability 15-14 Failure of the Active Database 15-15 Failure of the Standby Database 15-16 Recover Automatically from Failure of Both Master Database Nodes 15-17 Recover Manually from Failure of Both Master Database Nodes 15-18 Summary 15-19 ix