Wednesday, March 28, 2012

oracle : create external table

 in browser type url ip-Of-Server:1158/em/console/
  1. in browser type url ip-Of-Server:1158/em/console/
  2. login there
  3. go to Schema-> Directory Objects
  4. click the "create" Button
  5. fill in the form

  6. * Name DIR_WLIST
    * Path
    /tmp/test_v_dir
    where Name= name of virtual directory and Path= path to the directory
  7. now thru ftp client (or putty ) create a file test.txt in /tmp/test_v_dir/
  8. then go to sqlplus
  9. type in follwing query
create table XTERN_test( student_name varchar2(100) )
organization external (
type oracle_loader
default directory DIR_WLIST
access parameters (
records delimited by newline
)
location ('test.txt')
)
reject limit unlimited;