Solved

data upload to oracle DB using UNIX shell script

Posted on 2004-09-25
5
982 Views
Last Modified: 2013-12-26
I have one flat file coming to server in a particular directory. I need to write a UNIX shell script to uplaod data from this file to Oracle database. What I am planning to do is , at a specified time this unix script will run and will search for 'flatdatafile.txt' in the ' /flatdatafiles/'  directory. When this script runs, automatically data from this file will get populated to the database in table 'invoice_data_tbl' .
 Please help...I am new to UNIX shell programming.
0
Comment
Question by:ushelke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 9

Expert Comment

by:HamdyHassan
ID: 12155191
Looks like you want to learn , here is some hints and I will try to help you to reach your goal
It's important to do it by yourself otherwise you will not learn


(Q1) at a specified time this unix script will run

(A1)
     You need to learn cron job
     man crontab
     or search google for "cron job guide"



(Q2) will search for 'flatdatafile.txt' in the ' /flatdatafiles/'

(A2) Learn how to use "if" at ksh
         if -f  /folder/file.txt


(Q3) populated to the database in table 'invoice_data_tbl' .

(A3) You need to take a look at example How Oracle upload flat files, your need to creat .ctl file
    again search google for guide
0
 

Author Comment

by:ushelke
ID: 12156172
thyanks Hamdy Hassan..
YOu are right I am learning. Since I am new to shell scripting and unix too...I am looking for sample scripts showing invoking SQL loader to load the data from flat file to the database. I am conversent the way SQL loader can be used to load flat file data to the Oracle DB.
0
 
LVL 9

Accepted Solution

by:
HamdyHassan earned 100 total points
ID: 12161193
Let's start

At your shell script you will have something like
sqlldr scott/tiger control=loader.ctl

Please read the whole doc at
http://www.orafaq.com/faqloadr.htm

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question