473,320 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

external table

I am using external tables to load data from the data file. But the
log files
are getting created in the datafile's directory (because of CREATE OR
REPLACE DIRECTORY ...)
But I want those log files get created in a perticular directory. How
can I do that ?
Thank you
Jul 19 '05 #1
4 9314
he*****@yahoo.com (Erohsik) wrote in message
I am using external tables to load data from the data file. But the
log files
are getting created in the datafile's directory (because of CREATE OR
REPLACE DIRECTORY ...)
But I want those log files get created in a perticular directory. How
can I do that ?


Parsing error. Provide more detail.

What external tables? Are you loading into a remote db via an Oracle
db link?

What log files? CREATE DIRECTORY is for using BFILES. Not log files
(as in alert log, sql loader log, import log) files.

--
Billy
Jul 19 '05 #2
Billy,

I am using external tables to load data from a data file to an Oracle
tables (instead of using SQLLoader).

Before we create an external table, we use CREATE OR REPLACE DIRECTORY
testing AS '/../../../testing/' command.
The data file(s) should be in that (testing) directory.

After creating the external table, we load the data from external
table to the existing table,
then the log files and the bad files go to the 'testing' directory
where the data files are.

Now my request: I need to chang the code so that the log files and the
bad files go to a specified
directory which I specify in the 'create directory.... (.sql) script.

How to specify that ?

vs****@onwe.co.za (Billy Verreynne) wrote in message news:<1a**************************@posting.google. com>...
he*****@yahoo.com (Erohsik) wrote in message
I am using external tables to load data from the data file. But the
log files
are getting created in the datafile's directory (because of CREATE OR
REPLACE DIRECTORY ...)
But I want those log files get created in a perticular directory. How
can I do that ?


Parsing error. Provide more detail.

What external tables? Are you loading into a remote db via an Oracle
db link?

What log files? CREATE DIRECTORY is for using BFILES. Not log files
(as in alert log, sql loader log, import log) files.

Jul 19 '05 #3
he*****@yahoo.com (Erohsik) wrote
I am using external tables to load data from a data file to an Oracle
tables (instead of using SQLLoader). <snipped> Now my request: I need to chang the code so that the log files and the
bad files go to a specified
directory which I specify in the 'create directory.... (.sql) script.

How to specify that ?


Something like:
CREATE OR REPLACE DIRECTORY csv AS '/csv'

CREATE OR REPLACE DIRECTORY log AS '/log'

CREATE OR REPLACE DIRECTORY dump AS '/dump'
CREATE TABLE foo_external (
place_name varchar2(100),
postcode varchar2(4),
streetcode varchar2(4),
town_name varchar2(100)
)
ORGANIZATION EXTERNAL
(TYPE oracle_loader
DEFAULT DIRECTORY CSV
ACCESS PARAMETERS
(
RECORDS DELIMITED BY newline
BADFILE DUMP:'postcodes.bad'
DISCARDFILE DUMP:'postcodes.dis'
LOGFILE LOG:'postcodes.log'
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
(
place_name char(100),
postcode char(4),
streetcode char(4),
town_name char(100)
)
)
LOCATION ('postcodes.csv')
)
REJECT LIMIT UNLIMITED;
--
Billy
Jul 19 '05 #4
Thank you Billy
vs****@onwe.co.za (Billy Verreynne) wrote in message news:<1a**************************@posting.google. com>...
he*****@yahoo.com (Erohsik) wrote
I am using external tables to load data from a data file to an Oracle
tables (instead of using SQLLoader).

<snipped>
Now my request: I need to chang the code so that the log files and the
bad files go to a specified
directory which I specify in the 'create directory.... (.sql) script.

How to specify that ?


Something like:
CREATE OR REPLACE DIRECTORY csv AS '/csv'

CREATE OR REPLACE DIRECTORY log AS '/log'

CREATE OR REPLACE DIRECTORY dump AS '/dump'
CREATE TABLE foo_external (
place_name varchar2(100),
postcode varchar2(4),
streetcode varchar2(4),
town_name varchar2(100)
)
ORGANIZATION EXTERNAL
(TYPE oracle_loader
DEFAULT DIRECTORY CSV
ACCESS PARAMETERS
(
RECORDS DELIMITED BY newline
BADFILE DUMP:'postcodes.bad'
DISCARDFILE DUMP:'postcodes.dis'
LOGFILE LOG:'postcodes.log'
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
(
place_name char(100),
postcode char(4),
streetcode char(4),
town_name char(100)
)
)
LOCATION ('postcodes.csv')
)
REJECT LIMIT UNLIMITED;

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martin_Hurst | last post by:
Is it possible to establish a connection from within a postgres database to another external database on the network, i.e., not a java or scripting connection, BUT by some type of table definition...
2
by: Sara | last post by:
Hi - I've been reading the posts for a solution to my query, and realize that I should ask an "approch" question as well. We receive our production data from a third party, so my uers import...
6
by: ats | last post by:
I have a table that contains the database names of external databases. Each one of these external databases contain a table (which has the same structure) that I would like to query together as one...
4
by: My SQL | last post by:
Hi Can I trigger an external program to run when a new record is added to the mysql table? The external program is in C and instead of scanning the table continuously for new insertions, it...
0
by: aniendow | last post by:
Hi All, I am trying to upload a TAB delimited file into a database table. Considering the performance issue I thought EXTERNAL TABLE is my best option but with one problem, My table has CLOB...
5
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually...
0
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips for using External tables. USING EXTERNAL TABLE ======================= 1.THE TABLE POINTS TO EXTERNAL FILE. IF DATA IS ALTERED IN THE EXTERNAL FILE,DATA...
3
by: tundal45 | last post by:
Hey Guys, I am trying to automate the process of loading data in our oracle server. As a part of that process, I am working on a perl script that loads external tables from data files. What I am...
4
by: Erohsik | last post by:
I am using external tables to load data from the data file. But the log files are getting created in the datafile's directory (because of CREATE OR REPLACE DIRECTORY ...) But I want those log...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.