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

Migrating an

Application from
Oracle to
EnterpriseDB
Lewis R Cunningham
Author, EnterpriseDB: The
Definitive Reference
Agenda
• Introduction and comments
• Overview of presentation
• Overview of TimeTraker Application
• Steps in a migration
• Walk through of migration
Webinar Goals For You
• See an example application get migrated
• Understand the steps and decisions needed
to successfully migrate an application
• Understand compatibility issues
• Understand how to work with the database
• Understand when and how to work around
the database
The Sample Application
• Simple application using real world code
and data
• Subset of a real application (I wrote long
ago)
• TimeTraker
– Tracks Project Deliverables
– Tracks Resources
– Tracks Resource Expenditures
– Provides Interfaces for Tracking Data
– Provides Reporting
TimeTraker WorkFlow

• Project Manager (PM) creates a project


• PM assigns tasks to a project
• PM assigns resource to tasks
• Developers bill hours to tasks
• Everyone runs reports
TimeTraker Features
• Features
– API and XML Interfaces
– Formatted reporting and CSV output
– Role Based Security, user may have multiple
roles
– User Definable Calendar and Schedules
– Dependency Tracking
TimeTraker Data Model
• Data Model
TimeTraker API
• API
– TT_CALENDAR_ADMIN
– TT_MANAGE_PROJECTS
– TT_MANAGE_RESOURCES
– TT_MANAGE_USER_RECORDS
– TT_REPORT_OUTPUT
– TT_USER_ADMIN
Pre-Migration
• Steps before migrating to help you get there
– Coding Standards
• If your code follows standards you can analyze what
will need to change by migrating a very tiny subset
– Analyze Application Before Starting
• If you just start at random, you will get frustrated
• Understand what will migrate without change, what will
require changes and what will require re-writing
– Understand what EnterpriseDB does and does
not provide (currently)
– Talk to EnterpriseDB support
Migration Steps
• Using Developer Studio
– Create a connection to your source database
– Create a target EnterpriseDB database
– Create a connection to your source database
– Perform an Online Migration
• Correct Data Model Errors
• Correct Code Errors
• Test
Create Source Connection
Create a Target Database
• Not really required, you can migrate to an existing
database
• Multiple applications can share a database
• I prefer each application to have its own database
Begin the Migration
Online Migration Results
Online Migration Results (Cont'd)
Working with the Code
Columns aliases require AS
A Query with Analytics
Same Query withOUT Analytics
What Changed?
• UTL_FILE did not exist
– It does now
– I was able to write my own
• XML_TYPE does not exist
– I was able to write a work around using native XML
functionality
• SPL does not accept RECORD types of non-scalar
data types
– TYPETYPE local_file_type IS RECORD ( txt_file
UTL_FILE.FILE_TYPE, csv_file UTL_FILE.FILE_TYPE );
- Not acceptable
What Doesn’t Work
• SPL does not support forward declarations of
private procedure/function calls
– I moved the offending procedures to the top of the
packages
– Had I run into a loop (internal proca calls internals procb
which in turn calls proca), I would have had to move the
internal procedures to the spec
• EnterpriseDB supports PUBLIC synonyms but not
PRIVATE synonyms (not a big issue)
• Dynamic FOR LOOPS must be moved to static
cursors
What Does Work
• Schema Migrated Wholesale Without Changes
• Majority of Code Migrated Unchanged
• EnterpriseDB Support MOST Oracle-style SQL
– DECODE
– OUTER JOINS
– What doesn't currently exist is being added
• UTL_FILE added in 8.2, additional packages
added with every release
• Database Links are Available
• Partitioning is Available out of the Box
About
EnterpriseDB
Derek M. Rodner
Director, Product Strategy
Bringing the Open Source Advantage
to Enterprises

Open Source Software Commercial Software

Fast development cycles 24/7 support


Thousands of developers Services and training
Better code Certification
Lower cost Indemnification
Product strategy
FTD Replaces Oracle and Saves 83%
• Problem
– Performance of mission critical
back-office reporting and analysis
systems for order fulfillment
raising concerns going into
Mother’s Day rush
• Solution FTD
– Offload production Oracle servers
to operational data store in “When someone comes in at a
EnterpriseDB sixth the cost and 500 times the
– Run Oracle Reports® against customer service that makes it
very easy. I'd definitely reach out
EnterpriseDB Advanced Server to as many Oracle users as
• Benefits possible to get this [EnterpriseDB]
– Seamless transition accelerated on your system and prove it out”
implementation in under 6 weeks Jason Weiss, Software Architect,
to meet Mother’s Day deadline FTD
• Next Steps
– Expanding use of EnterpriseDB to
offload other mission critical
applications
Online Gaming Leader Replaces Oracle
• Problem
– Oracle license fees consuming IT
budget
• Solution
– EnterpriseDB Advanced Server to
replace entire Oracle infrastructure Sony Online Entertainment
• Benefits
– Estimated $1 million annual savings “EnterpriseDB Advanced Server is
• the clear database choice because
Next Steps of its PostgreSQL foundation,
– EnterpriseDB all new games compatibility with Oracle and the
developed on EnterpriseDB support of the EnterpriseDB
– All backend infrastructure to be team."
converted to EnterpriseDB
Christopher Yates,
– Cost effective data marts for SVP, Technology
BI/reporting
Leading VOIP Provider Building New
Applications
• Problem
– Cost of Oracle audit and ongoing
“extras” was too expensive
– Applications built on MySQL not
scaling well Vonage
• Solution
– EnterpriseDB selected as midrange “Oracle is a sledgehammer.
DBMS standard between MySQL & MySQL is a small hammer.
Oracle We needed something in
• Benefits between.”
– New corporate IM program released
Tim Smith, President,
– Significant future cost savings Vonage Networks
• Next Steps
– EnterpriseDB to replace Oracle for
mission-critical customer applications
EnterpriseDB Company Facts
• Award-winning enterprise database
software company Top 100 Technology Companies

• High-growth private company founded


in March 2004; Launched May 2005 2006 “Ones to Watch”

• $28.5M funding, including Fidelity,


Charles River, and Valhalla

• Headquartered in Iselin, NJ; Best Database Award


2005, 2006 & 2007
offices in 6 countries

• World’s largest concentration of


PostgreSQL expertise

• Over 100 customers and partners 2006 IT Success Story


Contact Information
• Lewis Cunningham, Oracle ACE
– lewisc@rocketmail.com
– 641-715-3900 ext 26803#

• Derek M. Rodner
– derek.rodner@enterprisedb.com
– 732-331-1333
Thank you.
Questions?

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