Вы находитесь на странице: 1из 53

Deploying an Invisible Database: Oracle Database 11g

Viksit Puri Principle Technologist, Oracle - PTS

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracles products remains at the sole discretion of Oracle.

Platform Technology Solutions

Partner development activities


KNOWLEDGE TRANSFER DEVELOPMENT SUPPORT RESOURCE KITS ADVISORY SERVICES

1. 2. 3. 4. 5. 6.

Technical Briefings ESeminars Channel Broadcasts Workshops Hacker Nights Labs

1. 2.

Technical Requests On Line Assistance

1. 2. 3. 4. 5. 6. 7.

Wizards Cook Books Sample Code White Papers Newsletters Best Practices (OPN)

1. 2. 3. 4. 5. 6. 7.

Design Reviews Migration Services Technology Adoption Performance Technical Architecture Implementation 3RD parties

One-to-many

Remote Assistance

Low Touch

On Site/ High Touch

2009 Oracle Corporation Proprietary and Confidential

Program Agenda

Deploying an Invisible Database: Embedding How to deploy an embedded database Self managing features High Availability for an embedded database Q&A

<Insert Picture Here>

2009 Oracle Corporation Proprietary and Confidential

<Insert Picture Here>

What is Embedding

Embedding is

Packaging a component within an application or product so that it becomes completely encapsulated by the application as seen by the end user. On going operation, administration and maintenance becomes transparent to the end-user as well.

2009 Oracle Corporation Proprietary and Confidential

Why Embed a Database?

Easier when doing multiple installs that are similar Leverage all the benefits of an Oracle database in a completely seamless manner Invisible deployment to the end user Lights-out administration required Cost benefits as relates to TCO

2009 Oracle Corporation Proprietary and Confidential

The Challenges

Embedding Oracle Software poses challenges in three areas:


Deployment: Should be easy and seamless Day-to-day administration: No onsite DBA available to manage database Software maintenance and support: Should be timely, simple and efficient

2009 Oracle Corporation Proprietary and Confidential

<Insert Picture Here>

How to Deploy an Embedded Database

How to Embed: Invisible deployment with application install process

Prepare staging/source:

Install Oracle Database Apply relevant patches Create database objects Create Database template Archive and compress the Oracle Home Include your database template Install cloned Oracle Home Silent network configuration Silent Database creation

Package:

Install at the target:


2009 Oracle Corporation Proprietary and Confidential

Invisible Deployment:
Step 1 Preparation at Source

Install Oracle Database in your staging/source environment Patch source database to required patch level

Create database objects, jobs Setup the application database as required


Tablespaces Users Seed data

2009 Oracle Corporation Proprietary and Confidential

Step 1: Install Oracle in staging environment

2009 Oracle Corporation Proprietary and Confidential

Step 1: Install Oracle in staging environment

2009 Oracle Corporation Proprietary and Confidential

Step 1: Install Oracle in staging environment

2009 Oracle Corporation Proprietary and Confidential

Step 1: Install Oracle in staging environment

2009 Oracle Corporation Proprietary and Confidential

Step 1: Install Oracle in staging environment

2009 Oracle Corporation Proprietary and Confidential

Step 1: Install Oracle in staging environment: Fixup scripts for pre-requisites

2009 Oracle Corporation Proprietary and Confidential

Invisible Deployment:
Step 2 - Packaging

Use DBCA to create template from source database Archive and compress the Oracle Home

tar, gzip, winzip etc.

Include your database template within the compressed archive


Archive must not include *.log, *.dbf, tnsnames.ora, listener.ora, sqlnet.ora

Integrate with your application package

2009 Oracle Corporation Proprietary and Confidential

Step 2: Build Template from Staging Database

2009 Oracle Corporation Proprietary and Confidential

Step 2: Build Template from Staging Database

2009 Oracle Corporation Proprietary and Confidential

Step 2: Build Template from Staging Database

2009 Oracle Corporation Proprietary and Confidential

Step 2: Build Template from Staging Database

2009 Oracle Corporation Proprietary and Confidential

Step 2: Build Template from Staging Database

2009 Oracle Corporation Proprietary and Confidential

Step 2: Packaging Oracle Home (contd.)


The Oracle Home in your staging area is now ready to be packaged Any archival utility can be used e.g.
tar, winzip, gzip $ tar -cvf $ORACLE_HOME/ cloned_home.tar

Make sure to include the database template just created Optionally the archived home can be compressed for saving space. Package this archive with your install process

2009 Oracle Corporation Proprietary and Confidential

Invisible Deployment:
Step 3 Installation at Target

Complete pre-requisites

OS patches, kernel parameters, user & groups etc. Fixup scripts generated may be used Oracle Validated RPM setup -silent -clone ... netca /silent /responsefile ...

Install cloned Oracle Home

Silent network configuration

Silent Database creation


using template created in step 2 dbca -silent -createDatabase -templateName ...

2009 Oracle Corporation Proprietary and Confidential

Installing The Oracle Home - Cloning


Move archive to destination and extract from archive $ export ORA_BASE=/u01/app/oracle/11.2.0 $ export ORA_HOME=$ORA_BASE/dbhome_1 $ mkdir -p $ORA_HOME $ tar -xvf ~/Desktop/cloned_home -C $ORA_HOME $ ORA_HOME/perl/bin/perl $ORA_HOME/clone/bin/clone.pl ORACLE_BASE=$ORA_BASE ORACLE_HOME=$ORA_HOME OSDBA_GROUP=dba OSOPER_GROUP=oper -defaultHomeName

2009 Oracle Corporation Proprietary and Confidential

Configure Network On Target


Call NETCA in silent mode to configure your Oracle Net Services $ export ORA_BASE=/u01/app/oracle/11.2.0 $ export ORA_HOME=$ORA_BASE/dbhome_1 $ ORA_HOME/bin/netca /silent /responsefile $ORA_HOME/network/install/netca_typ.rsp

Can supply custom response file with port, listener name, etc.

2009 Oracle Corporation Proprietary and Confidential

Configure Database On Target


Call DBCA in progress only or silent mode to create your database export ORA_BASE=/ u01/app/oracle/11.2.0 export ORA_HOME=$ORA_BASE/dbhome_1 $ORA_HOME/bin/dbca -silent -createDatabase -templateName MyEmbeddedDB.dbc -gdbname "orcl.mydomain.com" -sid "orcl" -sysPassword "oracle" -systemPassword "oracle" dbca help for more options

2009 Oracle Corporation Proprietary and Confidential

<Insert Picture Here>

Self Managing Features

Self Managing Database

Auto-Tuning

Adaptive

Integrated
Advisory

t Low Impac Instrumentation

Backup

Apps/SQL

2009 Oracle Corporation Proprietary and Confidential

Replication

Memory

Recovery

Storage

Schema

RAC

Best Practices for Embedding:


Lights out Administration

Automatic Storage Management (ASM) Locally Managed Tablespaces, ASSM, OMF Interval Partitioning

* * * *

Automatic Memory Management Automatic SQL Tuning Automatic Statistics Collection Automatic Degree-of-Parallelism Segment Creation on-demand

* New in Oracle Database 11g


2009 Oracle Corporation Proprietary and Confidential

Best Practices for Embedding:


Transparent High Availability

Automated Backups Fast Recovery Area Data Recovery Advisor Flashback Data Archive Grid Plug n Play Data Guard Automatic Block Repair (from standby)

* *

* New in Oracle Database 11g


2009 Oracle Corporation Proprietary and Confidential

Automatic Space Management

Use Locally Managed tablespaces with autoallocate, auto-extend, automatic segment space management
No more external defragmentation required No more extent management

2009 Oracle Corporation Proprietary and Confidential

Oracle Managed Files


Oracle Managed Files (OMF) simplify file administration by eliminating the need to directly manage the files in an Oracle database Eases development of portable applications Reduces corruption caused by specifying the wrong file names Reduces wasted disk space consumed by obsolete files This feature has two major thrusts:
Allows database objects to be created without specifying the underlying operating system files Automatically removes obsolete data files and online redo logs

Defining Oracle Managed Files Two basic configurations exist to establishing OMF:
Setting two dynamic initialization parameters: DB_CREATE_FILE_DEST: Defined for datafiles DB_CREATE_ONLINE_LOG_DEST_N: Defined for online redo logs and control files Setting one dynamic initialization parameter DB_CREATE_FILE_DEST All files are located in one location Example

SQL> ALTER SYSTEM SET db_create_file_dest='/bdu/o10g/dbs'; SQL> ALTER SYSTEM SET db_create_file_dest='/bdu/o10g/dbs'; System altered. System altered.

Automatic Memory Management in 11g


Unifies system (SGA) and process (PGA) memory management Dynamic parameters for all database memory: MEMORY_TARGET MEMORY_MAX_TARGET Automatically adapts to workload changes Maximizes memory utilization Available on:
Linux Windows Solaris HPUX AIX

O/S Memory O/S Memory SGA

SGA

PGA PGA

2009 Oracle Corporation Proprietary and Confidential

Automatic Undo
Use Automatic Undo Retention Tuning
Dynamically tunes the retention of undo information based on available resources and user activity Superior transaction undo optimization More efficient space utilization of Undo tablespace

2009 Oracle Corporation Proprietary and Confidential

Automatic Statistics Collection Default available jobs:

2009 Oracle Corporation Proprietary and Confidential

<Insert Picture Here>

High Availability for an Embedded Database

Automatic Backup and Recovery


Use RMAN Use OS or Oracle Scheduler to configure regular, scheduled, online backups Use Fast Recovery Area for ondisk backups
Database Area Recovery Area Tape

Nightly Apply of Incremental Backup

Weekly Archive to Tape

Recovery Area is selfmanaging: old files aged out, current files maintained Configure by setting parameters:
DB_RECOVERY_FILE_DEST DB_RECOVERY_FILE_DEST_SIZE

2009 Oracle Corporation Proprietary and Confidential

Automatic Backup and Recovery


Perform incremental backups
Only changed blocks backed up -- fast and space efficient Backed up files can be merged with the original

RECOVER COPY OF DATAFILE <datafile# or name>


You perform a full database backup only once! EE: Block change tracking can be enabled:

Database Area

Recovery Area Tape

Nightly Apply of Incremental Backup

Weekly Archive to Tape

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

2009 Oracle Corporation Proprietary and Confidential

Data Pump Facts


Available and usable only with 10g Successor for export/import Syntax very similar to exp/imp Consistent online backup Server based only Perfect tool for logical backups!

Tools
Command line: expdp and impdp Package DBMS_DATAPUMP Controlable through interactive Job Control

2009 Oracle Corporation Proprietary and Confidential

High Availability options: RAC Real Application Clusters protects from instance failure, scalability and performance Oracle Clusterware maintains cluster membership, performs health checks and restarts failed services. ASM Automatic Storage Management Can be embedded using cloning procedures for Clusterware, ASM and RAC 1-node cluster can be the source for n-node target cluster.
Courtesy: Elster Integrated Solutions, LLC

High Availability Options: Data Guard

Data Guard protection from disaster scenarios Transactionally consistent standby database automatically maintained Standby setup can be completely scripted using software cloning and through RMAN scripts from active instance Automated Fast Start Failover for automatic failover to standby database

2009 Oracle Corporation Proprietary and Confidential

Maintenance & Support Patch Management


Use ECM Patch Wizard for Automatic identification of customers where particular patch is applicable Automatic identification of patches applicable to a given customer Download relevant patches Patch can be placed on ISV website or on a CD for end-customer download/application ISVs can put a wrapper around the patch for silent application where applicable

System Upgrade
Use DBUA to perform silent upgrades Upgrade process can be customized XML files used to drive upgrade process Scripts can be added Implement best practices (pre-upgrade database backup, replacing obsolete parameters, verify successful completion)

2009 Oracle Corporation Proprietary and Confidential

Error Diagnosis In An Embedded Database

Server Generated Alerts to diagnose non-performance problems


Notify offsite DBA, take corrective action via fix-it jobs (EM) AWR Baselines and adaptive thresholds

Provide interface to views for problem diagnosis


DBA_ALERT_HISTORY, DBA_OUTSTANDING_ALERTS

ADRCI Auto. Diag. Repository Command-line Interface


Create incident package based on time interval alert log, trace files, dump files Batch mode, scripted

* New in Oracle Database 11g


2009 Oracle Corporation Proprietary and Confidential

Instant Client For OCI-, OCCI-, Pro*C, ODBC- and JDBCapplications No Oracle client installation necessary Most simple deployment
Download from OTN Copy it to the target systems Set NLS_LANG and TNS_ADMIN That's all ...*

http://www.oracle.com/technology/software/tech/oci/instantclient/index.html

* For ODBC a batch file has to be executed because the Windows ODBC management has to be notified

2009 Oracle Corporation Proprietary and Confidential

Conclusion

Oracle Database
is easy to deploy is self-managing provides easy problem diagnostic capability makes software maintenance simple and straightforward

Oracle Database is ideal for embedding within your application

2009 Oracle Corporation Proprietary and Confidential

More Information On Embedding Oracle Embedded Installation (OEI) Kit


http://www.oracle.com/technology/tech/embedded/files/oeikit11g.zip Supports embedded installation of: Oracle Database 11g/10g. Oracle Database Lite

Embedded Developer Center page


http://www.oracle.com/technology/tech/embedded/index.html Covers all embedded Oracle products

2009 Oracle Corporation Proprietary and Confidential

Contact Information
Viksit Puri
Principal Technologist Server Technologies viksit.puri@oracle.com Here at OpenWorld, visit us at:

Moscone West, Booth W-34

2009 Oracle Corporation Proprietary and Confidential

For More Information

search.oracle.com

or oracle.com

Вам также может понравиться