2017-01-24 2 views
0

쉼표로 구분 된 필드가있는 .csv 파일이 있습니다. sqlldr을 사용하면이 파일 데이터가 데이터베이스 테이블에 업로드됩니다. 그리고 primary key 또는 incorrect number이있는 경우로드하는 동안 .bad 파일에 해당 줄이 쓰여지고 이유는 .log 파일에 기록됩니다.거부 ​​이유가있는 sqlldr 거부 파일 생성

예 : Bad file: 1,2,3,4,5,6

및 로그 파일 : Input file : 1,2,3,4,5,6 2,3,4,5,6,7 1,2,3,4,5,6

내가 .bad 파일

예로 작성되기 때문에 기본 키 위반 라인 (3) 위의 파일 데이터를로드

가질 것이다

SQL*Loader: Release... Line 3: primary key violated...

이 오류는 파일 .bad에 기록 할 수 있습니까? 즉, 각 행의 끝에 오류 메시지를 쓸 수 있습니까 ??

예 :

BAD file : 1,2,3,4,5,6, Line3: Primary key violated

이 하나가 나를 도울 수 있습니까?

답변

0

가능한 경우에도 그렇게하고 싶지 않습니다. .bad 파일에는 레코드 만 포함되어 있으므로이 파일의 이름이 바뀌고 해당 레코드가 거부되는 문제가 수정 된 후에 다시로드 할 수 있습니다. documentation에서

:

The bad file is created in the same record and file format as the 
datafile so that you can reload the data after you correct it. For 
datafiles in stream record format, the record terminator that is found 
in the datafile is also used in the bad file.