#예시

sqlplus @sql파일 위치 >> 로그파일명.log
sqlplus @C:\Users\Desktop\createTable.sql > logFile.log

 

 

#다른 데이터 베이스에 실행하기

sqlplus 사용자\데이터베이스명 @sql파일 위치 >> 로그파일명.log
sqlplus sys\examsite @C:\Users\Desktop\createTable.sql>logFile.log

 

로그 파일은 현재 위치에 생성 되며 여러 SQL을 실행하면 같은 파일에 이어쓰기가 된다

 

 

다음과 같은 방법도 존재한다

spool/C:\Users\Desktop\로그파일.txt
SQL 실행
spool off

 

INSERT문은 실행후 COMMIT; 명령어를 해야 반영이 된다

+ Recent posts