문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| dbms:oracle:admin:oraclesqlplus [2007/06/04 10:10] – starlits | dbms:oracle:admin:oraclesqlplus [2025/10/03 22:30] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 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: | ||