문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
dbms:oracle:admin:oraclesqlplus [2007/06/04 10:10] starlits |
dbms:oracle:admin:oraclesqlplus [2009/08/31 09:13] (현재) starlits |
||
---|---|---|---|
줄 16: | 줄 16: | ||
- | ===== SQL*Plus Shell Script 호출 ===== | ||
- | - $ ./ | ||
- | < | ||
- | # 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 | |
- | + | - [[dbms: | |
- | ===== SQL*Plus | + | |
- | - 스크립트를 작성한다. | + | |
- | $ cat sql_scripts.sql | + | |
- | select * from departments where location_id = 14000; | + | |
- | quit | + | |
- | $ | + | |
- | </ | + | |
- | - sqlplus에서 SQL 스크립트를 호출한다. | + | |
- | $ sqlplus hr/hr @sql_scripts.sql | + | |
- | </ | + | |
- | - SQL*Plus | + | |
- | SQL> @sql_scripts.sql | + | |
- | </ | + | |
- | + | ||
- | ===== SQL*Plus 환경설정 ===== | + | |
- | - vi 편집기 | + | |
- | SQL> define _editor=vi | + | |
- | </ | + | |
- | - 결과값을 50 라인씩 끊어보이기 < | + | |
- | SQL> set pages 50 | + | |
- | </ | + | |
- | + | ||
- | ===== SQL*Plus 로 실행계획 보기 ===== | + | |
- [[dbms: | - [[dbms: | ||
+ | - [[dbms: | ||
+ | - [[dbms: | ||
+ | - [[dbms: | ||
+ | - [[dbms: | ||