sql load error in unix


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users sql load error in unix
# 1  
Old 06-02-2008
Data sql load error in unix

When i try to run a job in unix, i am getting
sqlload error as,
sqlload : file not found.
Can any one please let me know whats the reason for this..
The PATH & ORACLE_HOME paths names are correct...
thanks

here is the script : plz hv a look



TABLE_NAME= tablename
CONTROL_FILE=ctrlname
typeset -i NO_OF_FILES= number
typeset -i I
((I = NO_OF_FILES - 1))

set -A TABLE_NAME_ARRAY table names
set -A LOG_NAME_ARRAY lognames
set -A DATA_FILE_ARRAY datafilesnames
set -A CONTROL_FILE_ARRAY control filesnames
set -A DR_IND_FILE_ARRAY ind filesnames
set -A CR_IND_FILE_ARRAY crind filenames
set -A ARCHIVE_FILE_ARRAY filenames

typeset -i INC=0

while ((INC <= I))
do

TABLE_NAME=${TABLE_NAME_ARRAY[$INC]}; export TABLE_NAME
LOG_NAME=${LOG_NAME_ARRAY[$INC]}; export LOG_NAME
DATA_FILE=${DATA_FILE_ARRAY[$INC]}; export DATA_FILE
CONTROL_FILE=${CONTROL_FILE_ARRAY[$INC]}; export CONTROL_FILE
DR_IND_FILE=${DR_IND_FILE_ARRAY[$INC]}; export DR_IND_FILE
CR_IND_FILE=${CR_IND_FILE_ARRAY[$INC]}; export CR_IND_FILE
TAR_FILE=${ARCHIVE_FILE_ARRAY[$INC]}; export TAR_FILE

date > ${LOG_HOME}/${LOG_NAME}.out


sqlplus -s $USER_ID/$USER_PWD @${SCRIPT_HOME}/truncate_table.sql $TABLE_NAME $USER_ID >> ${LOG_HOME}/${LOG_NAME}.out

mfi.sh $DATA_FILE ${LOG_NAME}.log ${LOG_NAME}.out $CONTROL_FILE PRELOAD $TABLE_NAME 0 > /dev/null

# Run the load script

sqlload $USER_ID/$USER_PWD,\
CONTROL=${SCRIPT_HOME}/${CONTROL_FILE},\
DATA=${DATA_DIR}/${DATA_FILE},ROWS=4000,\
BINDSIZE=500000,\
BAD=/tmp/${LOG_NAME}.bad,\
LOG=${LOG_HOME}/${LOG_NAME}.log >> /dev/null



print Analyzing table ${TABLE_NAME}... >> ${LOG_HOME}/${LOG_NAME}.out
sqlplus -s $USER_ID/$USER_PWD @${SCRIPT_HOME}/analyze_table.sql $TABLE_NAME >> ${LOG_HOME}/${LOG_NAME}.out

mfi.sh $DATA_FILE ${LOG_NAME}.log ${LOG_NAME}.out $CONTROL_FILE POSTLOAD $TABLE_NAME 0 > /dev/null

touch ${LOG_HOME_1}/${USER_ID}.${TABLE_NAME}.ready

((INC += 1))

done
# 2  
Old 06-02-2008
closing thread. proceed here
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Write a shell script for SQL loader to load data into a staging table

Hi, I'm new to Linux. I'm working on a database, and need to load data in a database table (which I already created) using shell script. The table has two columns - Acct_number (not nullable) and date (timestamp). I'm not able to write a shell script for that. Can any one help me? ... (3 Replies)
Discussion started by: saisudeep
3 Replies

2. Shell Programming and Scripting

Need to capture error of sybase sql in unix

Hi Gurus, I am very new in Unix, I have 1 script, in which I am truncating the table , then BCP the data in Sybase table, and then loading the data from sybase table to sybase table. every thing is working fine, but the problem is with Error. I made some hanges in my insert statement so... (1 Reply)
Discussion started by: aksar
1 Replies

3. UNIX for Dummies Questions & Answers

UNIX Scripts "Load Error" with MicroFocus COBOL subprograms

When running our UNIX job scripts we randomly get the following 198 error below. When we restart the job it works fine. I haven't been able to recreate the problem in test, so I'm wondering if it has something to do with Cron or possibly a memory error or memory leak. I don't see anything... (5 Replies)
Discussion started by: rthiele
5 Replies

4. Shell Programming and Scripting

How to use sql data file in unix csv file as input to an sql query from shell

Hi , I used the below script to get the sql data into csv file using unix scripting. I m getting the output into an output file but the output file is not displayed in a separe columns . #!/bin/ksh export FILE_PATH=/maav/home/xyz/abc/ rm $FILE_PATH/sample.csv sqlplus -s... (2 Replies)
Discussion started by: Nareshp
2 Replies

5. UNIX for Dummies Questions & Answers

Execute PL/SQL function from Unix script (.sql file)

Hi guys, I am new on here, I have a function in oracle that returns a specific value: create or replace PACKAGE BODY "CTC_ASDGET_SCHED" AS FUNCTION FN_ASDSCHEDULE_GET RETURN VARCHAR2 AS BEGIN DECLARE ASDSchedule varchar2(6); ASDComplete... (1 Reply)
Discussion started by: reptile
1 Replies

6. Shell Programming and Scripting

unix variables from sql / pl/sql

How do I dynamically assign the below output to unix shell variables so I can build a menu in a shell script? Example: var1 = 1 var2= SYSTEM var3 = 2 var4= UNDOTBS1 and so on, then in the shell script I can use the variables to build a menu. set serveroutput on declare... (2 Replies)
Discussion started by: djehres
2 Replies

7. UNIX for Advanced & Expert Users

Bus error(coredump) while running SQL*Loader in HP Unix 11

Hi All, I am getting coredump error, when I try to execute Oracle SQL*Loader from Shell script in Unix environment. But SQL*Loader from local machine runs fine with same database. SQL*Loader: Release 9.2.0.6.0 - Production on Mon Apr 23 05:23:47 2007 Copyright (c) 1982, 2002, Oracle... (3 Replies)
Discussion started by: srinivas_paluku
3 Replies

8. Shell Programming and Scripting

Unix-Sql Loop error

Hi, I am getting the error "No matching <<", when i run the below. Is it that we can't execute SQL in a Unix loop. I am executing a SQL in a loop. Is it the EOF is written wrongly. . /opt/app/wlsconfigv61/domains/profiles/oracleV901.profile export DBUSER=ecdb01 set -A DBINSTANCE... (3 Replies)
Discussion started by: manu_byc
3 Replies

9. Shell Programming and Scripting

Need help in wrting Load Script for a Load-Resume type of load.

hi all need your help. I am wrting a script that will load data into the table. then on another load will append the data into the existing table. Regards Ankit (1 Reply)
Discussion started by: ankitgupta
1 Replies

10. Shell Programming and Scripting

Error while trying to fire a PL/SQL thro Unix Script

hi , I tried running a PL/SQL script through unix shell script. But am getting the following error. "Message file sp1<lang>.msb not found Error 6 initializing SQL*Plus " Kindly suggest. Regards, Samit (5 Replies)
Discussion started by: dharmesht
5 Replies
Login or Register to Ask a Question