The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
shell script to find and replace string in multiple files pharos467 Shell Programming and Scripting 10 05-20-2008 08:39 AM
how to rename multiple files with a single command tayyabq8 Shell Programming and Scripting 5 03-18-2008 12:04 PM
how to divide single large log file into multiple files. kamleshm Shell Programming and Scripting 1 01-15-2008 03:33 PM
Find and Replace in multiple files (Shell script) jatins_s Shell Programming and Scripting 13 11-05-2007 10:11 AM
Reading file names from a file and executing the relative file from shell script anushilrai Shell Programming and Scripting 4 03-10-2006 01:25 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-07-2006
Registered User
 

Join Date: Mar 2006
Posts: 7
Executing Multiple .SQL Files from Single Shell Script file

Hi,

Please help me out.
I have around 700 sql files to execute in a defined order, how can i do it from shell script
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-07-2006
Registered User
 

Join Date: Dec 2005
Location: India
Posts: 218
can you give examples of the file names and how they are to be ordered


Gaurav
Reply With Quote
  #3 (permalink)  
Old 03-07-2006
Registered User
 

Join Date: Mar 2006
Posts: 7
I am trying to create database objects through the files.

The file names are simillar to the names of the objects they are creating.i want that if the object has been created successfully i get a success in my log file, and if any error then the error in the log file along with the file names

for views i have file with extension .VW, for Procedure .PRC and so on
i want files to be executed in the order
1. .VW
2. .FNC
3. .PRC
4. .SQL
5. .SQH
6. .SQB

Please help
Reply With Quote
  #4 (permalink)  
Old 04-07-2008
Registered User
 

Join Date: Apr 2008
Posts: 1
script example

This is how I executed multiple sql files in a folder that had 100 sql files in it:
for filename in *.sql
do
echo "Executing file $filename..."
sqlplus -s ods/passwd@dODS <<EOF
@$filename;
quit;
EOF
done

enjoy
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0