Reader small image

You're reading from  Oracle Database XE 11gR2 Jump Start Guide

Product typeBook
Published inJul 2012
Reading LevelIntermediate
PublisherPackt
ISBN-139781849686747
Edition1st Edition
Languages
Right arrow
Author (1)
Asif Momen
Asif Momen
author image
Asif Momen

Asif Momen has been working with Oracle technologies for over 12 years and has expertise in Database Architecture, Performance Tuning, and High Availability. He has a Master's degree in Software Systems from Birla Institute of Technology & Science (BITS), Pilani. Asif is honored by the prestigious Oracle ACE award from Oracle Technology Network. He has the following certifications: OCP 11g DBA, OCP 9i Forms Developer and is an Oracle Certified Expert in RAC 10g. Asif is a presenter for conferences like Oracle OpenWorld-2010, All India Oracle User Group (AIOUG), and Brain Surface. In addition, he is the Member of Editorial Board of "Oracle Connect"the quarterly publication of AIOUG and Select magazine of the United Kingdom Oracle User Group (UKOUG) His articles have also appeared in Oracle Support - Customer Knowledge Exchange . His particular interests are Database & SQL tuning, Oracle RAC and Backup & Recovery. He posts his ideas and opinions on The Momen Blog (http://momendba.blogspot.com). Asif can be reached at asif.momen@gmail.com.
Read more about Asif Momen

Right arrow

Chapter 9. Moving Data between Oracle Databases

Pleasure in the job puts perfection in the work. - Aristotle

This chapter describes how to move data from Oracle Database 10g Express Edition to Oracle Database 11g Edition using Oracle's Export/Import utilities. Oracle Database XE supports traditional Export/Import utilities and Data Pump Export/Import utilities. This chapter discusses these approaches in more detail, covering the following topics:

  • Exporting and importing data

  • Traditional Export/Import (exp/imp) utilities

  • Data Pump Export/Import (expdp/impdp) utilities

  • Moving data between Oracle Database 10g XE and Oracle Database 11g XE

Exporting and importing data

Oracle's Export and Import utilities are used to move the data between different machines, databases, and schema. When exporting, database objects are dumped into a proprietary binary file. This binary file is then used to import database objects into another Oracle database.

Oracle's Export and Import utilities are also used to perform...

Exporting and importing data


Oracle's Export and Import utilities are used to move the data between different machines, databases, and schema. When exporting, database objects are dumped into a proprietary binary file. This binary file is then used to import database objects into another Oracle database.

Oracle's Export and Import utilities are also used to perform logical database backup and recovery.

Traditional Export and Import (exp/imp) utilities

The traditional Export and Import utilities provide a simple way to move your data between Oracle databases. The Export utility extracts data from the database and generates a binary file as the output file. We can then import data into the destination database using this binary file.

The Export and Import utilities are invoked using the exp and imp commands respectively. These utilities can be used to move data between Oracle databases even if they reside on different platforms (hardware and software configurations).

The Export and Import utilities...

Moving data between Oracle Database 10g XE and Oracle Database 11g XE


Follow the guidelines presented in this section if you want to do either of the following:

  • Move data between Oracle Database 10g XE and Oracle Database 11g XE

  • Upgrade your Oracle Database 10g XE to Oracle Database 11g XE

The steps are as follows:

  1. 1. Create a database directory object by connecting to Oracle Database 10g XE as SYS user:

    SQL> CREATE OR REPLACE DIRECTORY dump_dir AS 'c:\xetest';
    SQL> GRANT READ,WRITE ON DIRECTORY dump_dir TO system;
    
    
  2. 2. Export the data from Oracle Database 10g XE:

    expdp system/******** full=Y EXCLUDE=SCHEMA:\'LIKE \'APEX_%\'\',SCHEMA:\'LIKE \'FLOWS_%\'\' directory=DUMP_DIR dumpfile=DB10G.dmp logfile=DB10G_expdp.log
    expdp system/******** TABLES=FLOWS_FILES.WWV_FLOW_FILE_OBJECTS$ directory=DUMP_DIR dumpfile=DB10G2.dmp logfile=DB10G_expdp.log
    
  3. 3. Uninstall Oracle Database 10g XE.

  4. 4. Install Oracle Database 11g XE.

  5. 5. Create a database directory object by connecting as SYS user:

    SQL> CREATE...

Exporting data using SQL Developer


Exporting data and metadata using SQL Developer is very simple. From the menu go to Tools | Data Export. This launches the Data Export wizard. You may choose to export both the metadata and data, or either of the two. It's pretty straightforward from the interface.

You should choose an appropriate method to import metadata or data depending on how the object was exported.

Summary


In this chapter we explored Oracle database utilities such as traditional Export/Import and Data Pump Export/Import to load and unload data from an Oracle database. We also learned to move data between Oracle Database 10g Express Edition and Oracle Database 11g Express Edition.

The next chapter will talk about database migration. We will learn to migrate our XE database to other database editions. The chapter provides step-by-step instructions on migrating from XE to Enterprise Edition.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Oracle Database XE 11gR2 Jump Start Guide
Published in: Jul 2012Publisher: PacktISBN-13: 9781849686747
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Asif Momen

Asif Momen has been working with Oracle technologies for over 12 years and has expertise in Database Architecture, Performance Tuning, and High Availability. He has a Master's degree in Software Systems from Birla Institute of Technology & Science (BITS), Pilani. Asif is honored by the prestigious Oracle ACE award from Oracle Technology Network. He has the following certifications: OCP 11g DBA, OCP 9i Forms Developer and is an Oracle Certified Expert in RAC 10g. Asif is a presenter for conferences like Oracle OpenWorld-2010, All India Oracle User Group (AIOUG), and Brain Surface. In addition, he is the Member of Editorial Board of "Oracle Connect"the quarterly publication of AIOUG and Select magazine of the United Kingdom Oracle User Group (UKOUG) His articles have also appeared in Oracle Support - Customer Knowledge Exchange . His particular interests are Database & SQL tuning, Oracle RAC and Backup & Recovery. He posts his ideas and opinions on The Momen Blog (http://momendba.blogspot.com). Asif can be reached at asif.momen@gmail.com.
Read more about Asif Momen