05.11.2015 Views

Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 15 ■ DATA LOADING AND UNLOADING 703<br />

This makes it rather easy to load this extract on another database, as it would simply be<br />

SQL> insert /*+ append */ into some_table select * from all_objects_unload;<br />

<strong>and</strong> you are done—the data is loaded.<br />

Summary<br />

In this chapter, we covered many of the ins <strong>and</strong> outs of data loading <strong>and</strong> unloading. We started<br />

with SQL*Loader (SQLLDR) <strong>and</strong> examined many of the basic techniques for loading delimited<br />

data, fixed-width data, LOBs, <strong>and</strong> the like. We discussed how this knowledge carries right over<br />

into external tables, a new feature in <strong>Oracle</strong>9i <strong>and</strong> later that is useful as a replacement for<br />

SQLLDR, but that still utilizes our SQLLDR skills.<br />

Then we looked at the reverse process, data unloading, <strong>and</strong> how to get data out of the<br />

database in a format that other tools, such as spreadsheets or the like, may use. In the course<br />

of that discussion, we developed a PL/SQL utility to demonstrate the process—one that<br />

unloads data in a SQLLDR-friendly format, but could easily be modified to meet our needs.<br />

Lastly, we looked at a new <strong>Oracle</strong> 10g feature, the external table unload, <strong>and</strong> the ability to<br />

easily create <strong>and</strong> move extracts of data from database to database.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!