Sponsored Content
Full Discussion: sqlload not found error
Top Forums UNIX for Dummies Questions & Answers sqlload not found error Post 302201413 by abhi_123 on Monday 2nd of June 2008 07:22:50 AM
Old 06-02-2008
sqlload not found error

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...
thanksSmilie

hr is the script:

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

Last edited by abhi_123; 06-02-2008 at 08:32 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ERROR -> ./txt1[2]: x: not found

Hi all, When I try to run this shell script (name txt1) script -> txt1 ------------------------ #!/usr/bin/ksh x = "hello" echo "$x" ------------------------ error while executing ------------------------ serv1> txt1 ./txt1: x: not found ------------------------ (2 Replies)
Discussion started by: k_oops9
2 Replies

2. Programming

library not found error

We are trying to execute C/C++ programs in SOlaris 8. Though the exes are compiled in g++, we donot have it installed in the target machine. We have the library files in the target machine and LD_LIBRARY_PATH is set correctly. Now when the exes are run, we are getting the error $ seq ld.so.1:... (1 Reply)
Discussion started by: virtual_j
1 Replies

3. Shell Programming and Scripting

not found error

Hi I have to move data to a file based on the valuies of first three characters in a file I am using the following script FIN=$LOC/TEST.TXT FEEDFILE=$LOC/TUE_GROSSJE.TXT #Read the file while read FDROW do FEEDROW=$FDROW; DTYPE=`echo $FEEDROW |cut -c 1-3` if ; then $FEEDROW... (4 Replies)
Discussion started by: gander_ss
4 Replies

4. Shell Programming and Scripting

Command not found error!

Hello everyone, I am using Linux and tcsh shell. I am trying to run a free open source program( which is in the form of a binary file), but every time I run it it gives me an error saying: newhtsg_v1.0:Command not found. I have set permission also for the same. What else can I do to make... (4 Replies)
Discussion started by: ad23
4 Replies

5. Shell Programming and Scripting

command not found error

hello every time i run the following code for val in fileX fileY fileZ do $val=`ls -l $val | awk '{print $5}'` done i got error message command not found , i tried to add ' and " but nothing works its only worked wen remove $val= but i want the name of the file and the value ... (9 Replies)
Discussion started by: mogabr
9 Replies

6. Shell Programming and Scripting

Unix script for removing the footer from the datafile while loading into externaltable using sqlload

Hi, Can you please tell me the Unix shell script for removing footer from the datafile while loading into external table using sqlloader we will be skipping the header like this while creating the table organization external ( type oracle_loader default directory directoryname... (5 Replies)
Discussion started by: srikanth_sagi
5 Replies

7. UNIX for Dummies Questions & Answers

Variable not found error

Hi, I get a "FILEPATH: not found" error on the 3rd line and the line where it is within the case. Any idea as to why I'm getting this error time and time again? Oh and FILEPATH will store the directory of the file. I appreciate any help! IAM=`basename $0` RC=0 FILEPATH = ""... (1 Reply)
Discussion started by: MIA651
1 Replies

8. UNIX for Dummies Questions & Answers

Function not found error

Hi All, I have written one shell script where I should call a function by passing variables to the actual function based on some condition. Each time I run the script I am getting the below error dsadm@bunyipd: /var/datastage/FRPDEVL/work/script> sh MClub_Validations.sh Iteration: 1... (1 Reply)
Discussion started by: tpk
1 Replies

9. Shell Programming and Scripting

Found = in conditional error?

Hey, I'm trying to make an interactive perl program and while I'm not done I wanted to share the bit of code I have at the moment because I keep running into an error that says that it "Found = in conditional, should be ==" in my code. This is my code- use warnings; use strict; my $i; $i=0;... (2 Replies)
Discussion started by: Eric1
2 Replies
DBSchema::Table(3pm)					User Contributed Perl Documentation				      DBSchema::Table(3pm)

NAME
DBIx::DBSchema::Table - Table objects SYNOPSIS
use DBIx::DBSchema::Table; #new style (preferred), pass a hashref of parameters $table = new DBIx::DBSchema::Table ( { name => "table_name", primary_key => "primary_key", columns => @dbix_dbschema_column_objects, #deprecated# unique => $dbix_dbschema_colgroup_unique_object, #deprecated# 'index' => $dbix_dbschema_colgroup_index_object, indices => @dbix_dbschema_index_objects, } ); #old style (VERY deprecated) $table = new DBIx::DBSchema::Table ( "table_name", "primary_key", $dbix_dbschema_colgroup_unique_object, $dbix_dbschema_colgroup_index_object, @dbix_dbschema_column_objects, ); $table->addcolumn ( $dbix_dbschema_column_object ); $table_name = $table->name; $table->name("table_name"); $primary_key = $table->primary_key; $table->primary_key("primary_key"); #deprecated# $dbix_dbschema_colgroup_unique_object = $table->unique; #deprecated# $table->unique( $dbix_dbschema__colgroup_unique_object ); #deprecated# $dbix_dbschema_colgroup_index_object = $table->index; #deprecated# $table->index( $dbix_dbschema_colgroup_index_object ); %indices = $table->indices; $dbix_dbschema_index_object = $indices{'index_name'}; @all_index_names = keys %indices; @all_dbix_dbschema_index_objects = values %indices; @column_names = $table->columns; $dbix_dbschema_column_object = $table->column("column"); #preferred @sql_statements = $table->sql_create_table( $dbh ); @sql_statements = $table->sql_create_table( $datasrc, $username, $password ); #possible problems @sql_statements = $table->sql_create_table( $datasrc ); @sql_statements = $table->sql_create_table; DESCRIPTION
DBIx::DBSchema::Table objects represent a single database table. METHODS
new HASHREF Creates a new DBIx::DBSchema::Table object. The preferred usage is to pass a hash reference of named parameters. { name => TABLE_NAME, primary_key => PRIMARY_KEY, columns => COLUMNS, indices => INDICES, local_options => OPTIONS, #deprecated# unique => UNIQUE, #deprecated# index => INDEX, } TABLE_NAME is the name of the table. PRIMARY_KEY is the primary key (may be empty). COLUMNS is a reference to an array of DBIx::DBSchema::Column objects (see DBIx::DBSchema::Column). INDICES is a reference to an array of DBIx::DBSchema::Index objects (see DBIx::DBSchema::Index), or a hash reference of index names (keys) and DBIx::DBSchema::Index objects (values). OPTIONS is a scalar of database-specific table options, such as "WITHOUT OIDS" for Pg or "TYPE=InnoDB" for mysql. Deprecated options: UNIQUE was a DBIx::DBSchema::ColGroup::Unique object (see DBIx::DBSchema::ColGroup::Unique). INDEX was a DBIx::DBSchema::ColGroup::Index object (see DBIx::DBSchema::ColGroup::Index). new_odbc DATABASE_HANDLE TABLE_NAME Creates a new DBIx::DBSchema::Table object from the supplied DBI database handle for the specified table. This uses the experimental DBI type_info method to create a table with standard (ODBC) SQL column types that most closely correspond to any non-portable column types. Use this to import a schema that you wish to use with many different database engines. Although primary key and (unique) index information will only be imported from databases with DBIx::DBSchema::DBD drivers (currently MySQL and PostgreSQL), import of column names and attributes *should* work for any database. Note: the _odbc refers to the column types used and nothing else - you do not have to have ODBC installed or connect to the database via ODBC. new_native DATABASE_HANDLE TABLE_NAME Creates a new DBIx::DBSchema::Table object from the supplied DBI database handle for the specified table. This uses database-native methods to read the schema, and will preserve any non-portable column types. The method is only available if there is a DBIx::DBSchema::DBD for the corresponding database engine (currently, MySQL and PostgreSQL). addcolumn COLUMN Adds this DBIx::DBSchema::Column object. delcolumn COLUMN_NAME Deletes this column. Returns false if no column of this name was found to remove, true otherwise. name [ TABLE_NAME ] Returns or sets the table name. local_options [ OPTIONS ] Returns or sets the database-specific table options string. primary_key [ PRIMARY_KEY ] Returns or sets the primary key. unique [ UNIQUE ] This method is deprecated and included for backwards-compatibility only. See "indices" for the current method to access unique and non-unique index objects. Returns or sets the DBIx::DBSchema::ColGroup::Unique object. index [ INDEX ] This method is deprecated and included for backwards-compatibility only. See "indices" for the current method to access unique and non-unique index objects. Returns or sets the DBIx::DBSchema::ColGroup::Index object. columns Returns a list consisting of the names of all columns. column COLUMN_NAME Returns the column object (see DBIx::DBSchema::Column) for the specified COLUMN_NAME. indices COLUMN_NAME Returns a list of key-value pairs suitable for assigning to a hash. Keys are index names, and values are index objects (see DBIx::DBSchema::Index). unique_singles Meet exciting and unique singles using this method! This method returns a list of column names that are indexed with their own, unique, non-compond (that's the "single" part) indices. sql_create_table [ DATABASE_HANDLE | DATA_SOURCE [ USERNAME PASSWORD [ ATTR ] ] ] Returns a list of SQL statments to create this table. Optionally, the data source can be specified by passing an open DBI database handle, or by passing the DBI data source name, username and password. The data source can be specified by passing an open DBI database handle, or by passing the DBI data source name, username and password. Although the username and password are optional, it is best to call this method with a database handle or data source including a valid username and password - a DBI connection will be opened and the quoting and type mapping will be more reliable. If passed a DBI data source (or handle) such as `DBI:mysql:database', will use MySQL- or PostgreSQL-specific syntax. Non-standard syntax for other engines (if applicable) may also be supported in the future. sql_alter_table PROTOTYPE_TABLE, [ DATABASE_HANDLE | DATA_SOURCE [ USERNAME PASSWORD [ ATTR ] ] ] Returns a list of SQL statements to alter this table so that it is identical to the provided table, also a DBIx::DBSchema::Table object. The data source can be specified by passing an open DBI database handle, or by passing the DBI data source name, username and password. Although the username and password are optional, it is best to call this method with a database handle or data source including a valid username and password - a DBI connection will be opened and used to check the database version as well as for more reliable quoting and type mapping. Note that the database connection will be used passively, not to actually run the CREATE statements. If passed a DBI data source (or handle) such as `DBI:mysql:database' or `DBI:Pg:dbname=database', will use syntax specific to that database engine. Currently supported databases are MySQL and PostgreSQL. If not passed a data source (or handle), or if there is no driver for the specified database, will attempt to use generic SQL syntax. AUTHOR
Ivan Kohler <ivan-dbix-dbschema@420.am> Thanks to Mark Ethan Trostler <mark@zzo.com> for a patch to allow tables with no indices. COPYRIGHT
Copyright (c) 2000-2007 Ivan Kohler Copyright (c) 2000 Mail Abuse Prevention System LLC Copyright (c) 2007-2010 Freeside Internet Services, Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. BUGS
sql_create_table() has database-specific foo that probably ought to be abstracted into the DBIx::DBSchema::DBD:: modules (or no? it doesn't anymore?). sql_alter_table() also has database-specific foo that ought to be abstracted into the DBIx::DBSchema::DBD:: modules. sql_create_table() may change or destroy the object's data. If you need to use the object after sql_create_table, make a copy beforehand. Some of the logic in new_odbc might be better abstracted into Column.pm etc. Add methods to get and set specific indices, by name? (like column COLUMN_NAME) indices method should be a setter, not just a getter? SEE ALSO
DBIx::DBSchema, DBIx::DBSchema::ColGroup::Unique, DBIx::DBSchema::ColGroup::Index, DBIx::DBSchema::Column, DBI perl v5.14.2 2010-01-09 DBSchema::Table(3pm)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy