The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 11 01-15-2009 11:40 AM
how to rename multiple files with a single command tayyabq8 Shell Programming and Scripting 5 03-18-2008 04:04 PM
how to divide single large log file into multiple files. kamleshm Shell Programming and Scripting 1 01-15-2008 07:33 PM
Find and Replace in multiple files (Shell script) jatins_s Shell Programming and Scripting 13 11-05-2007 02:11 PM
Reading file names from a file and executing the relative file from shell script anushilrai Shell Programming and Scripting 4 03-10-2006 05:25 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-07-2006
anushilrai anushilrai is offline
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
  #2 (permalink)  
Old 03-07-2006
gauravgoel gauravgoel is offline
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
  #3 (permalink)  
Old 03-07-2006
anushilrai anushilrai is offline
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
  #4 (permalink)  
Old 04-07-2008
manan728 manan728 is offline
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0