473,568 Members | 2,850 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9339
he*****@yahoo.c om (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.go ogle.com>...
he*****@yahoo.c om (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.c om (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.go ogle.com>...
he*****@yahoo.c om (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
3323
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 within the postgres database of that external database table source - something similar to a proxy definition. Examples of external database could...
2
2307
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 the data from Excel into the appropriate tables. There are 6 different databases that receive data, though 4 of them only get one table each. I...
6
9601
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 list. For example, say each external db has a table of names. tbNames (external db structure) ------- name as text - example db1.mdb
4
20123
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 will be better if an external program could be triggered. Any suggestions?
0
3049
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 columns but when I tried to create EXTERNAL TABLE with CLOB column Oracle is giving error saying "column type is not supported in external organised...
5
3681
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 for repeated html im using the external js, i mean the TOP, BOTTOM they are repeated in every page, so i include them as functions in the external...
0
8836
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 IN THE TABLE WILL ALSO CHANGE. 2.EXTERNAL TABLES CAN BE QUERIED IN THE SAME WAY AS STANDARD TABLES IN JOINS,VIEWS.....AND CAN USE ALL TYPES OF...
3
4026
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 seeing is that I get following error when I select from external table created using script. ORA-29913: error in executing ODCIEXTTABLEOPEN callout...
4
210
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 files get created in a perticular directory. How can I do that ? Thank you
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.