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 2 0 1 4



Similar documents
An Oracle White Paper June Migrating Applications and Databases with Oracle Database 12c

Oracle SQL Developer Migration

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

Oracle SQL Developer Migration. An Oracle White Paper September 2008

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

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

G Cloud 7 Pricing Document

An Oracle White Paper March Managing Metadata with Oracle Data Integrator

An Oracle White Paper September Oracle Database and the Oracle Database Cloud

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

An Oracle White Paper January Using Oracle's StorageTek Search Accelerator

G Cloud 7 Pricing Document

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

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

An Oracle White Paper January Oracle Database 12c: Full Transportable Export/Import

An Oracle White Paper October Oracle Data Integrator 12c New Features Overview

March Oracle Business Intelligence Discoverer Statement of Direction

PeopleSoft Enterprise Directory Interface

October Oracle Application Express Statement of Direction

Oracle Database 12c Enables Quad Graphics to Quickly Migrate from Sybase to Oracle Exadata

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

An Oracle Communications White Paper December Serialized Asset Lifecycle Management and Property Accountability

An Oracle White Paper November Oracle Business Intelligence Standard Edition One 11g

SIX QUESTIONS TO ASK ANY VENDOR BEFORE SIGNING A SaaS E-COMMERCE CONTRACT

An Oracle White Paper August Automatic Data Optimization with Oracle Database 12c

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

An Oracle White Paper May Oracle Database Cloud Service

Siebel CRM Quote and Order Capture - Product and Catalog Management

An Oracle White Paper June Oracle Database Firewall 5.0 Sizing Best Practices

An Oracle White Paper March Oracle s Single Server Solution for VDI

Oracle Primavera Gateway

Oracle Directory Services Integration with Database Enterprise User Security O R A C L E W H I T E P A P E R F E B R U A R Y

Oracle s BigMachines Solutions. Cloud-Based Configuration, Pricing, and Quoting Solutions for Enterprises and Fast-Growing Midsize Companies

Running Oracle s PeopleSoft Human Capital Management on Oracle SuperCluster T5-8 O R A C L E W H I T E P A P E R L A S T U P D A T E D J U N E

Driving Down the High Cost of Storage. Pillar Axiom 600

Simplify IT and Reduce TCO: Oracle s End-to-End, Integrated Infrastructure for SAP Data Centers

Top Ten Reasons for Deploying Oracle Virtual Networking in Your Data Center

Oracle Whitepaper April Security and the Oracle Database Cloud Service

Managed Storage Services

June, 2015 Oracle s Siebel CRM Statement of Direction Client Platform Support

An Oracle White Paper February Integration with Oracle Fusion Financials Cloud Service

Oracle Financial Management Analytics

Introduction. Automated Discovery of IT assets

Oracle JD Edwards EnterpriseOne Mobile Sales Order Entry

An Oracle White Paper May Oracle Audit Vault and Database Firewall 12.1 Sizing Best Practices

The Five Most Common Big Data Integration Mistakes To Avoid O R A C L E W H I T E P A P E R A P R I L

Oracle Service Cloud and Oracle WebRTC Session Controller ORACLE WHITE PAPER FEBRUARY 2015

An Oracle White Paper August Higher Security, Greater Access with Oracle Desktop Virtualization

Siebel CRM Reports. Easy to develop and deploy. Administration

Oracle Database Backup Service. Secure Backup in the Oracle Cloud

An Oracle White Paper January Oracle Database Firewall

ORACLE CLOUD MANAGEMENT PACK FOR ORACLE DATABASE

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

An Oracle White Paper July Oracle Desktop Virtualization Simplified Client Access for Oracle Applications

Field Service Management in the Cloud

An Oracle White Paper May Distributed Development Using Oracle Secure Global Desktop

April Oracle Higher Education Investment Executive Brief

Integrating Oracle's Exadata Database Machine with a Data Center LAN Using Oracle Ethernet Switch ES2-64 and ES2-72 ORACLE WHITE PAPER MARCH 2015

An Oracle White Paper January Oracle Database Firewall

Oracle Hyperion Financial Close Management

New 11g Features in Oracle Developer Tools for Visual Studio. An Oracle White Paper January 2008

Cloud-Based Content Storage Management with Oracle DIVA Cloud Service

OpenLDAP Oracle Enterprise Gateway Integration Guide

An Oracle White Paper June Creating an Oracle BI Presentation Layer from Imported Oracle OLAP Cubes

An Oracle Technical Article November Certification with Oracle Linux 6

PeopleSoft Mobile Inventory Management for Healthcare

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

An Oracle Best Practice Guide April Best Practices for Designing Contact Center Experiences with Oracle RightNow CX Cloud Service

Oracle Human Resources

Virtual Compute Appliance Frequently Asked Questions

Oracle Big Data Management System

Configuring Oracle SDN Virtual Network Services on Netra Modular System ORACLE WHITE PAPER SEPTEMBER 2015

An Oracle White Paper November Upgrade Best Practices - Using the Oracle Upgrade Factory for Siebel Customer Relationship Management

An Oracle White Paper May Exadata Smart Flash Cache and the Oracle Exadata Database Machine

The new Manage Requisition Approval task provides a simple and user-friendly interface for approval rules management. This task allows you to:

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

Accelerating the Transition to Hybrid Cloud with Oracle Managed Cloud Integration Service

A Joint Oracle Teradata White Paper March Configuring Oracle Business Intelligence Enterprise Edition for Teradata Temporal Tables

Performance with the Oracle Database Cloud

The Role of Data Integration in Public, Private, and Hybrid Clouds

PRODUCT HUB STREAMLINED ITEM BATCH USER INTERFACE DEFINE IMPORT FORMATS FOR SPREADSHEET IMPORT CONSOLIDATION OF DIGITAL ASSETS THROUGH THE ITEM BATCH

An Oracle White Paper May 2011 BETTER INSIGHTS AND ALIGNMENT WITH BUSINESS INTELLIGENCE AND SCORECARDS

An Oracle Technical Article March Certification with Oracle Linux 7

An Oracle White Paper April, Effective Account Origination with Siebel Financial Services Customer Order Management for Banking

ORACLE DATA INTEGRATOR ENTERPRISE EDITION

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

THE NEW BUSINESS OF BUSINESS LEADERS. Hiring and Onboarding

The Benefits of a Unified Enterprise Content Management Platform

An Oracle White Paper September Lowering Storage Costs with the World's Fastest, Highest Capacity Tape Drive

Big Data and Natural Language: Extracting Insight From Text

Oracle Hyperion Planning

Oracle Planning and Budgeting Cloud Service

Oracle Telesales. Comprehensive Customer Management. View of Business Activities Across Operating Units

Query Acceleration of Oracle Database 12c In-Memory using Software on Chip Technology with Fujitsu M10 SPARC Servers

Integrated Set of Applications

An Oracle White Paper August Oracle Database Auditing: Performance Guidelines

Connect the Contact Center to the Field with Oracle Service Cloud

Oracle Cloud for Midsize Service Companies. An Oracle Industry Brief

Migration Best Practices for OpenSSO 8 and SAM 7.1 deployments O R A C L E W H I T E P A P E R M A R C H 2015

Maximizing Profitability with Cloud Collaboration for your Business

Transcription:

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 2 0 1 4

1. Introduction Oracle provides products that reduce the time, risk, and financial barriers involved in migrating non-oracle databases and their applications to Oracle Database 12c. Migrating tables and their associated data is a straight forward and easily automated process. Stored procedures and application logic however require much more effort. Translating a stored procedure is doable, but making it automatic is not a trivial exercise. Oracle Database 12c introduces several significant new features which significantly lower the cost and time required to migrate non-oracle databases to the Oracle platform. In addition, a new database feature, the SQL Translation Framework, assists with the migration of your applications by automatically translating SQL Server and Sybase ASE (T-SQL) calls as they come into the database. This white paper outlines the new database features which assist in migrations. Figure 1: Oracle SQL Developer, Installing a Sybase translator to Oracle Database 12c SQL Translation Framework 2 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C 2

2. Oracle SQL Developer Introduction SQL Developer is an Oracle IDE that enhances productivity and simplifies database development and administration tasks. Using SQL Developer, users can browse, create and modify database objects, run SQL statements, edit and debug PL/SQL and have access to an extensive list of predefined reports or create their own. Oracle SQL Developer is included with Oracle Database 12c. Oracle SQL Developer is also the primary third party database migration platform for Oracle Database. SQL Developer provides an integrated migration tool for migrating Microsoft SQL Server, Sybase ASE, IBM DB2 LUW, and Teradata databases to Oracle Database. With SQL Developer, users can create connections to non-oracle databases for browsing and querying objects. SQL Developer provides utilities to migrate databases to Oracle. SQL Developer automatically converts tables, triggers, stored procedures and all other relevant objects to Oracle database equivalents. Once converted and target Oracle objects have been produced, SQL Developer copies the data to the new tables. When the target database for an Oracle Database migration is version 12.1.0.1 or higher, Oracle SQL Developer will automatically migrate the objects and stored procedures using the new database 12c features discussed below. Included with the descriptions are examples of how code and objects were previously migrated to Oracle Database 11g and now going forward in Oracle Database 12c. 3. Oracle Database 12c Application Migration Enhancements The following new features have been introduced to reduce the amount of custom code and time required for third party migrations to Oracle Database. Identity Columns 32K VARCHARS FETCH FIRST ROWS (SQL) Implicit Cursors Multitenant Architecture SQL Translation Framework Identity Columns Primary key constraints define a table column or columns that will serve to uniquely identify records in that table. A common programming technique is to have a value automatically generated and assigned as rows in a table are generated and inserted. These are also widely known as synthetic or surrogate keys. Prior to Oracle Database 12c, this was traditionally accomplished by creating a SEQUENCE and a TRIGGER. The sequence would define and generate the value for a new row, and the trigger would fire to supply the sequence value for the column in the INSERT statement. 3 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C

The alternative approach is to use an Identity column. This would allow the sequence logic to be directly embedded into the definition of the table column, bypassing the need to create a sequence and trigger to handle the generation and population of the primary key value of the table records. Oracle Database 12c now natively supports Identify columns [Oracle Docs.] This enhancement represents significant cost savings for customers migrating to Oracle Database. Instead of having to generate two additional database objects for each table making use of an identity column, this can now be defined in the table itself. This also lowers the cost of maintenance going forward as there are fewer database objects to manage and support. Fewer objects, less code, less work all handled automatically when migrating to Oracle Database 12c using Oracle SQL Developer. 32K VARCHAR2 s Since its introduction, the VARCHAR2 data type has had a max size of 4,000 bytes, which equates to 4,000 characters in single byte character sets. Table column definitions exceeding this size would be migrated as Character Large Objects, or CLOBs. This presented a challenge for many customers migrating from non-oracle database environments as changing data type and storage definitions is not a trivial design decision. CLOBs can present optimization and flexibility challenges for developers when compared to Varchars. With the introduction of Oracle Database 12c, the VARCHAR2, NVARCHAR2, and RAW data types now support up to 32,768 bytes [Oracle Docs.] Offering an extended size VARCHAR2 means that in most cases migrations can continue with no requirement to switch to CLOBs in the column definition for tables containing large strings. Note: to enable the increased size limits for these data types, the following database parameters are required: 4 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C

MAX_SQL_STRING_SIZE initialization parameter set to EXTENDED COMPATIBLE initialization parameter set to 12.0.0.0 or higher In addition, the $ORACLE_HOME/rdbms/admin/utl32k.sql script must be run while the database is in UPGRADE mode to convert data dictionary views where required. FETCH FIRST ROWS Queries which sort data and then limit row output are often referred to as Top-N queries. Prior to Oracle Database 12c, developers would use the pseudo-column ROWNUM to limit the number of rows returned in a query. Limiting the number of rows returned can be valuable for reporting, analysis, data browsing, paging results in web applications, and other tasks. In Oracle Database 12c Release 1, SQL SELECT syntax has been enhanced to allow a row_limiting_clause, which limits the number of rows that are returned in the result set [Oracle Docs.] The row_limiting_clause provides both easy-to-understand syntax and expressive power. You can now specify the number or percentage of rows for your query results with the FETCH_FIRST SQL clause. You can additionally use the OFFSET syntax to specify that the results begin on a specified number of rows after a specified number of initial records. The row_limiting_clause follows the ANSI SQL international standard for enhanced compatibility and easier migrations. The new FETCH FIRST SQL is powerful, flexible, and easy to read. Implicit Cursors A common programming practice in Microsoft SQL Server and SAP s Sybase ASE databases extended SQL language, T-SQL, is to write SQL statements directly in their stored procedures. Calling said stored procedure would make the result set for the one or more queries immediately available to the calling user or program. Prior to Oracle Database 12c, migrating these stored procedures to Oracle Database PL/SQL equivalent procedures would require changing the procedure header to include one or more SYS_REFCURSORs as OUT or RETURN parameters, forcing the application calling the procedures to change its API accordingly to reflect the change. 5 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C

With Oracle Database 12c, stored procedures can use the DBMS_SQL package s RETURN_RESULT() function to make the query results available to the calling user or program [Oracle Docs.] Maintaining the original code headers makes for a more seamless application migration as the procedural calls in the application will not require updates post-database migration. Multitenant Architecture Database applications running with SQL Server or Sybase expecting a multi-tenancy database model per server can now continue this approach with Oracle Database 12c s Multitenant Option architecture [Oracle Docs.] Where a single SQL Server instance can serve one or more databases, a single Oracle 12c Container Database (CDB) can service one or more Pluggable Databases (PDBs). Instead of migrating multiple SQL Server databases to a single Oracle database using schemas as a container for each migrated database, Oracle Database 12c now allows for individual pluggable databases to be used. Figure 2: This illustration shows a CDB with a CDB$ROOT container, a PDB$SEED container plugged into the root, and several PDBs plugged into the root. For a complete overview of the Oracle Database Multitenant option and architecture, please see this Oracle White Paper. 6 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C

4. SQL Translation Framework While migrating the database is a major component of any migration project, updating the database applications is just as critical. Complicating this process is that each of the database management systems have their own implementations of the SQL standard. Proprietary SQL code that may run in Sybase ASE may not run as is in Oracle Database. The amount of custom SQL present in an application can largely define the amount of time required to fully migrate a database and its applications. Database application migrations are currently performed with Oracle SQL Developer and its application scanner scripts. SQL Developer can parse application code and document embedded SQL statements that will require translation before running against an Oracle Database. The task of doing the actual translations is left to the end user, or can be addressed one at a time using SQL Developer s SQL Translation Scratch Editor. Figure 3: Oracle SQL Developer Migration Scratch Editor The SQL Translation Scratch editor is an ad hoc SQL and procedural language translation feature that allows users to connect to third party databases, run their SQL statements, translate them to Oracle, run the statements again in Oracle Database, and compare the results. Developers can then manually update their applications to run the modified code. This works fine for static SQL, but there was no solution for dynamically generated SQL statements. This, prior to Oracle Database 12c, was largely left to testing to identify any issues which may arise. This time consuming and error-prone process has been largely eliminated with the introduction of the SQL Translation Framework in Oracle 12c [Oracle Docs.] The framework allows for the translators in Oracle SQL Developer to be loaded directly into the database as a collection of Java stored classes and procedures. Available with Oracle Database 12c are translators for Sybase ASE and SQL Server. Once installed from SQL Developer to the database, the translator can be activated at the session or service level. This means that non-oracle statements, which have yet to be translated, are sent to the database to be parsed, translated, and executed on-the-fly. These translations are stored in a SQL Translation Profile for future executions. The contents of the profile can be reviewed, modified, and approved by the migration team to ensure the translations are accurate and ready for production. Multiple SQL Translation Profiles can be created to address each application being migrated. The Profiles are portable, and can be transferred to other databases running the same application. They are also parsed 7 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C

and placed into the SQL cache so that future calls will immediately get the appropriate statement executed on the database as quickly as standard SQL statements. SQL Translation Framework Workflow 1. Framework receives SQL call 2. Performs lookup in SQL translation dictionary (Profile) 3. When not found it fingerprints the statement and adds it to the dictionary 4. It then processes the template with the values supplied An Example Framework receives SELECT TOP 2 * FROM T1 Performs static lookup of a conversion in the SQL Translation Dictionary Not Available: Generate the Fingerprint Select Top <ora:literal type=integer order=1> * From T1 Note: literals are mapped in translations such that select 1; select 2 select 3; are treated as a single statement, where the literal (1, 2, or 3) is stored as <ora:literal type=integer order=1>) in the Fingerprint. Lookup fingerprint in the SQL Translation Dictionary Available: Gets the Fingerprint Select * From T1 FETCH FIRST <ora:literal type=integer order=1> ROWS ONLY Processes the Template with values acquired Select * From T1 FETCH FIRST 2 ROWS ONLY Returns the translated SQL to the database engine 8 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C

Figure 4: SQL Translation Framework Diagram: A Sybase application connects to Oracle and runs, having its statements translated and executed on-the-fly for Oracle. Once all translations have been completed, tested and approved, the SQL Translation Profile can be moved to a production databases to be used. Developers may also consider implementing translated Oracle code directly back into their application, and going forward, developing native Oracle code and techniques. 5. Conclusion Oracle Database 12c helps customers lower IT costs and delivers a higher quality service by enabling consolidation onto database clouds and engineered systems like Oracle Exadata and Oracle Database Appliance. It s proven to be fast, reliable, secure and easy to manage for all types of database workloads including enterprise applications, data warehouses and bid data analysis. Moving your database and database powered applications to Oracle Database often requires significant application and data model updates as non-oracle technologies must be changed to work with existing Oracle structures, data types, proprietary SQL and procedural languages (PLSQL.) Oracle Database 12c includes many new features, as described above, which minimize database and application changes to accommodate applications not originally developed for Oracle Database. 9 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C

Oracle Corporation, World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065, USA Worldwide Inquiries Phone: +1.650.506.7000 Fax: +1.650.506.7200 C O N N E C T W I T H U S blogs.oracle.com/oracle facebook.com/oracle twitter.com/oracle oracle.com Copyright 2014, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 1214 White Paper Title December 2014 Author: Jeff Smith Contributing Authors: Barry Mcgillin 10 MIGRATING NON-ORACLE DATABSES AND THEIR APPLICATIONS TO ORACLE DATABASE 12C