10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

CHAPTER 13 MIGRATING TO EXADATAhave the NETWORK_LINK option and the ability to transfer data directly over database links.” Yes that’strue, but unfortunately when using impdp with database links, Data Pump performs conventional INSERTAS SELECTs, not direct path inserts. And this means that the inserts will be much slower, generate lots ofredo and undo, and possibly run out of undo space. And more importantly, conventional path IAS doesnot compress data with HCC compression (but resorts to regular OLTP compression instead if HCC isenabled for the table). So this makes the DataPump file-less import over database links virtually uselessfor loading lots of data into <strong>Exadata</strong> fast. You would have to use your own direct path IAS statementswith APPEND hints to get the benefits of direct path loads and maximum performance out of file-lesstransfer over database links. Kevin Says: Add to this list of possible dumpfile transfer techniques the capability known as Injecting Files withDatabase File System (DBFS). The DBFS client (dbfs_client) has been ported to all Linux and Unix platforms andcan be used to copy files into the <strong>Exadata</strong> Database Machine even if the DBFS file system is not mounted on thehosts of the <strong>Exadata</strong> Database Machine nor on the sending system. It is a mount-free approach. <strong>Oracle</strong>Documentation provides clear examples of how to use the built-in copy command that dbfs_client supports. Thedata flows from the dbfs_client executable over SQL*Net and is inserted directly into SecureFile LOBs. Thetransfer is much more efficient than the NFS protocol and is secure. Most <strong>Exadata</strong> Database Machine deploymentsmaintain DBFS file systems, so there is less of a need for local disk capacity used as a staging area.There are some cases where moving your data through database links may not perform as well asthe DataPump approach. If you have a slow network link between the source and target (migrationsbetween remote data centers, perhaps) then you may benefit more from compressing the dumpfiles,while database links over <strong>Oracle</strong> Net won’t do as aggressive compression as, for example, gzip can do.<strong>Oracle</strong> Net (SQL*Net) does simple compression by de-duplicating common column values within anarray of rows when sent over SQL*Net. This is why the number of bytes transferred over SQL*Net mayshow a smaller value than the total size of raw data.Transferring the data of a single table over a database link is very easy. In the target (<strong>Exadata</strong>)database you’ll need to create a database link pointing to the source database, then just issue either aCTAS or INSERT SELECT command over the database link:CREATE DATABASE LINK sourcedbCONNECT TO source_userIDENTIFIED BY source_passwordUSING 'tns_alias';CREATE TABLE fact AS SELECT * FROM fact@sourcedb;This example will create the table structure and copy the data, but it won’t create any other objectssuch as indexes, triggers or constraints for the table. These objects must be manually created later, eitherby running the DDL scripts or by doing a metadata-only import of the schema objects.428

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

Saved successfully!

Ooh no, something went wrong!