Answer:
Using Bash shell you may use the following construct:
{
echo "DROP VIEW v1;"
echo "CREATE VIEW..."
} | isql -user SYSDBA -pass masterkey srv:db
each echo statement outputs newline at the end.
Because that's a lot of writing, use the so called 'document here' feature of the shell:
cat <<- _END_ | isql user SYSDBA -pass masterkey srv:db
DROP VIEW v1;
CREATE VIEW ...
...
_END_
{
echo "DROP VIEW v1;"
echo "CREATE VIEW..."
} | isql -user SYSDBA -pass masterkey srv:db
each echo statement outputs newline at the end.
Because that's a lot of writing, use the so called 'document here' feature of the shell:
cat <<- _END_ | isql user SYSDBA -pass masterkey srv:db
DROP VIEW v1;
CREATE VIEW ...
...
_END_
Previous Question | Next Question |
How to determine who is and change the owner of database? | How to open the database in exclusive mode? |