암호입력 화면이 나타나면 유저의 암호를 입력합니다.(SQL*Plus가 시작되고 기본 데이타베이스에 연결됩니다.)
SQL*Plus Shell Script 호출
$ ./batch_sqlplus.sh
# Name of this file : batch_sqlplus.sh
# Conunt employees and give raise.
sqlplus hr/hr <<EOF
select count(1) from employees;
update employees set salary = salary*1.10;
commit;
quit
EOF
exit
SQL*Plus SQL Script 호출
스크립트를 작성한다.
$ cat sql_scripts.sql
select * from departments where location_id = 14000;
quit
$