일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 구글 애드센스 수익
- 젠킨스
- gradle
- 미국 배당주
- Vue 배우기
- docker
- docker 명령어
- Spring
- python
- 도커
- 미국주식
- AES256
- intelliJ plugin
- spring Annotation
- scrapy
- Python 기본편
- JDK1.3
- Vue
- Vue 강의
- Vue 알아보기
- Spring Batch
- MYSQL
- Spring Batch 강의
- python 기초
- 애드센스 수익
- apache log4j
- IntelliJ
- 티스토리 광고 수익
- spring boot 시작
- docker mysql
나만의공간
sqlldr을 이용한 대량 데이타 업로드 방법 본문
오라클 sqlldr을 이용한 대량 데이타 업데이트 방법
사용법 : SQLLDR keyword=value [,keyword=value,...]
관련 옵션
userid -- ORACLE username/password
control -- Control file name
log -- Log file name
bad -- Bad file name
data -- Data file name
discard -- Discard file name
discardmax -- Number of discards to allow (Default all)
skip -- Number of logical records to skip (Default 0)
load -- Number of logical records to load (Default all)
errors -- Number of errors to allow (Default 50)
rows -- Number of rows in conventional path bind array or between direct path data saves
(Default: Conventional path 64, Direct path all)
bindsize -- Size of conventional path bind array in bytes (Default 256000)
silent -- Suppress messages during run (header,feedback,errors,discards,partitions)
direct -- use direct path (Default FALSE)
parfile -- parameter file: name of file that contains parameter specifications
parallel -- do parallel load (Default FALSE)
file -- File to allocate extents from
1. 사용할 ctl 파일을 생성
samplectl.ctl
load data
infile samplecsv.csv --데이타 파일명
replace
into table cipher_test --테이블명
fields terminated by ',' -- 데이타 구분자
(seq integer external, -- 컬럼 속성
original_content char(50) -- 컬럼속성
)
2. 입력한 데이타 형식을 ','를 구분자로 생성
1234,2000학번,학생1
1235,2000학번,학생2
1236,2000학번,학생2
3. sample
LOAD DATA
INFILE * --혹은 파일이름
APPEND
INTO TABLE "테이블명" -- 테이블명
FILELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS --값이 없으면 NULL로
(칼럼명기술 CONSTANT '기본값'
)
BEGINDATA
IMPORT할 데이타 기술 형식에 맞춰서
4. 명령어 실행
sqlldr scott/tiger@db접속정보 control=samplectl.ctl
'IT > Oracle' 카테고리의 다른 글
오라클 날짜기준 컬럼으로 주단위 합계 쿼리 방법 (0) | 2024.01.30 |
---|---|
오라클 GRANT 조회 (0) | 2022.03.08 |