Database Administration (MOSC)

MOSC Banner

BASH newbie: Running a .sh script which calls multiple .sql scripts, how to?

edited Feb 7, 2013 12:11AM in Database Administration (MOSC) 4 commentsAnswered
11.2.0.2

Hi,

I have this script:

#!/bin/bash
#Scritp to upgrade DATABASE1

. /home/oracle/.bash_profile
. /database1/oracle/.database1


VPUSER=USER1
VPPASSW=User1

VPLOGON="${VPUSER}/${VPPASSW}@DATABASE1"
#LOGFILE="40610to729.log"

runScript(){
sqlplus ${VPLOGON} << SCRIPT

spool upgrade.log
set serveroutput on

@40610to553.sql
@553to554.sql
@554to555.sql
@555to556.sql
@556to557.sql
@557to558.sql
@558to559.sql
@559to560.sql
@560to561.sql
@561to562.sql
@562to563.sql
@563to564.sql
@564to565.sql
@565to700.sql
@700to701.sql
@701to702.sql
@702to703.sql
@703to704.sql
@704to705.sql
@705to706.sql
@706to707.sql
@707to708.sql
@708to709.sql
@709to710.sql
@710to711.sql
@711to712.sql
@712to713.sql
@713to714.sql
@714to715.sql
@715to716.sql
@716to717

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center