Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Oracle External Table

External tables are created using the sql create table.organization table statement.
 To load the bulk data using sql loader

Step 1:To create a file in os level
oracle@db ~]$ mkdir d1
oracle@db ~]$ cd d1
oracle@db d1]$ vi f1
oracle@db ~]$ export ORACLE_SID=<databasename>
oracle@db ~]$ sqlplus / as sysdba
First we connect the ‘SYS’ user then we can create a new directory

 Sql> conn sqlplus / as sysdba
 You must have any directory system privilege to create directories.
 Sql> grant create any directory to username;
 Sql> grant create any directory to sai;
 Sql> create directory <directory_name> as  <path_name>;
 Sql> create directory d1 as  ‘/home/oracle/db/’;
 Sql> grant read,write on directory directoryname to username;
 Sql> grant read,write on directory d1 to nijam;

Create table:
 Organization external table:using type oracle loader
 Default directory:
 Access parameters( :
 Records delimited by newline
 Fields terminated by
 Location :specifies the location of the external date,the location is specified as a list of directory objects and filenames.if the directory objects is not specified,then the default directory objects is used as the file location.

Example program:
 Create table filename(study) (id number(5),name varchar2(15))
 Organization external (type oracle_loader
 Default directory directoryname
 Access parameters(
 Records delimited by newline
 Fields terminated by ‘ , ‘)
 Location (‘filename’));

SQL > select * from tablename;


Popular posts from this blog

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

7 Steps to configure BDR replication in postgresql

Postgres Streaming Replication Configuration

vacuumlo - removing large objects orphans from a database PostgreSQL