Why does the scipt executes only once the sqlscript the following script is pretty simple, but it works not as expected. I searched for an answer but I am stuck.

#!/bin/bash

db_con=user/pw@db
bname='filename'

for f in $(seq 1 10);
do 
    sqlplus -S $db_con @$bname$f
    sleep 2
done


In the *.sql file are statements like:

update db.table_name
set column = bla
where column=foo;
commit;


I expect, that it will run filename1.sql to filename10.sql but sqlplus output shows me only the result of filename1.sql.
As you haven't shown us the sql files I'm going to take a guess that you haven't included the exit statement. This means that SQL*Plus will be invoked, run the commands/sql in the first file and then sit there waiting for the next SQL command. This means the 'sleep 2' command is never reached.

Try this in your sql file instead

 update db.table_name set column = bla where column=foo;
 commit;
 exit