Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2012
    Posts
    1

    Unanswered: Can we change Directory Name while loading the data using External Tables

    Hi All,

    i am loading the data from CSV file to Oracle table through external tables,
    in external tables we need to mention default directory, can i give that directory location is local drive from my system(actually that need give client machine, my oracle installed in client machine only but i want give my local directory) is it possible ,plz let me know

    Regards
    Mallis

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    external tables can only reference diectories/volumes on the database server. Use sql loader if the data is on the client.♠
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    Feb 2006
    Posts
    173
    Provided Answers: 1
    Not exactly sure what you want to do, but you can change the 'directory' or 'file_name' that the external table points to, check out the 'Alter Table' section on this link:
    Morgan's Library Oracle External Tables Examples Sample Code Demos Tutorials SQL PL/SQL Directory

    Code:
    --Alter Table                                
    --Default Directory
    ALTER TABLE <table_name> DEFAULT DIRECTORY <directory_name>;
    SELECT table_name, default_directory_owner, default_directory_name
    FROM user_external_tables;
    
    ALTER TABLE ext_tab2 DEFAULT DIRECTORY ctemp;
    
    SELECT table_name, default_directory_owner, default_directory_name
    FROM user_external_tables;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •