Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
Oracle External Tables

Oracle External Tables

Ratings: (0)|Views: 48|Likes:
Published by Biswajit Das

More info:

Published by: Biswajit Das on Jul 31, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

07/31/2013

pdf

text

original

 
ORACLE EXTERNAL TABLES
External tables are defined as tables that do not reside in the database, and can be in anyformat for which an access driver is provided. By providing Oracle with metadatadescribing an external table, Oracle is able to expose the data in the external table as if itwere data residing in a regular database table. The external data can be queried directlyand in parallel using SQL.One can select,Join or Sort External Table data.One can createViews and synonyms for external Tables. However, no DML operations (UPDATE,INSERT, or DELETE) are possible, and no indexes can be created, on external tables.The metadata for external tables is done through the CREATE TABLE ...ORGANIZATION EXTERNAL statement. An access driver is the mechanism used toread the external data in the table.Oracle provides an access driver for external tables. It allows the reading of data fromexternal files using the Oracle loader technology. The ORACLE_LOADER access driver  provides data mapping capabilities which are a subset of the control file syntax of SQL*Loader utility.Oracle's external tables feature provides a valuable means for performing basicextraction, transformation, and transportation (ETT) tasks that are common for datawarehousing applications.Lets see the Syntax for creating External Tables from Operating System file.Assume You got the file say EmpETL.DAT in Direcotry C:\Oracle with following data.
7369,SMITH,CLERK , 7902 17-DEC-80,800,200,20 7499,ALLEN,SALESMAN,7698,20-FEB-81,1600,200,30 7521,WARD,SALESMAN,7698,22-FEB-81,1250,200,30 7566, JONES,MANAGER ,7839,02-APR-81,2975,200,20 7654,MARTIN,SALESMAN,7698,28-SEP-81,1250,200,30 
The following SQL statements create an external table and load its data into database tableTEMP of User Scott.
SQL>Connect system/managerConnectedSQL> CREATE OR REPLACE DIRECTORY DATA_DIR AS 'C:\Oracle’Directory created.SQL>GRANT READ ON DIRECTORY DATA_DIR TO scott;Grant succeededSQL>CONNECT SCOTT/TIGERCREATE TABLE EMPETL (empno NUMBER(4),ename VARCHAR2(20),

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->