i am stuck with a problem ...
i have a shell script that gets the file name as input and performs the following operation...
it runs through a for loop inside from which i connect to sqlplus and run a procedure that creates a number of tables ..
there is no space in my server so we have made them as temporary tables ..
problem is ..... since they are temporary tables when the session expires the data in them vanishes .... but i do not want the data to vanish ...
problem in that is that without exiting from the sql server i cannot get the value of the next filename ...
....
sample code :
for filename in `ls *.in`
do
log "$filename: loading"
echo "Begin" >in.sql
echo "execute immediate 'truncate table input_data1';" >>in.sql
echo "end;" >>in.sql
echo "/" >>in.sql
echo `sqlplus -s ${ORACLE_USERNAME}/${ORACLE_PASSWORD} <in.sql`
echo `exit`
echo "Begin" >in.sql
echo "
loading_gtt;" >>in.sql
echo "end;" >>in.sql
echo "/" >>in.sql
echo `sqlplus -s ${ORACLE_USERNAME}/${ORACLE_PASSWORD} <in.sql`
echo `exit`
the procdure in bold is what is going to create all the temporay tables ... the value of which expire when i close the session....
pls help ...