2017-10-13 41 views
0

SSIS를 처음 사용하므로 몇 가지 온라인 자습서를 따라 왔습니다. 나는 다음과 같은 것을 보았고 무슨 일이 일어 났는지 알 수 없다. OLE DB 연결에 오류가있는 경우SSIS 실행시 OLE DB 대상 오류

누군가 올바른 방향으로 나를 가리켜 주면이 문제가 해결 될 것입니다.

SSIS package "c:\users\****\documents\visual studio 2015\Projects\tutorials\tutorials\basicpackage.dtsx" starting. 
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning. 
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning. 
Warning: 0x80049304 at Data Flow Task, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve, run this package as an administrator, or on the system's console. 
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning. 
Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning. 
Information: 0x402090DC at Data Flow Task, Flat File Source [2]: The processing of file "L:\sql queries\SSIS TUTORIAL\apps.txt" has started. 
Information: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning. 
Information: 0x402090DE at Data Flow Task, Flat File Source [2]: The total number of data rows processed for file "L:\sql queries\SSIS TUTORIAL\apps.txt" is 5. 
Error: 0xC0202009 at Data Flow Task, OLE DB Destination [23]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. 
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The statement has been terminated.". 
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Cannot insert the value NULL into column 'ID', table 'ssis.dbo.Apps'; column does not allow nulls. INSERT fails.". 
Error: 0xC0209029 at Data Flow Task, OLE DB Destination [23]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE DB Destination.Inputs[OLE DB Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. 
Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (23) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (36). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. 
Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning. 
Information: 0x402090DD at Data Flow Task, Flat File Source [2]: The processing of file "L:\sql queries\SSIS TUTORIAL\apps.txt" has ended. 
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "OLE DB Destination" wrote 4 rows. 
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning. 
Task failed: Data Flow Task 
Warning: 0x80019002 at basicpackage: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. 
SSIS package "c:\users\****\documents\visual studio 2015\Projects\tutorials\tutorials\basicpackage.dtsx" finished: Failure. 

첫 번째 오류 ii는 해결할 수 없습니다. SQL DB에서 연결, 대상 테이블을 점검하고 문제점이 무엇인지 알지 못합니다. db에 액세스하기 위해 Windows 인증과 관련이있을 수 있습니까?

Error: 0xC0202009 at Data Flow Task, OLE DB Destination [23]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. 
+0

'apps.txt' 파일의 내용과'dbo.Apps' 테이블의 정의를 포함 –

+0

''NULL 값을 'ID'열에 삽입 할 수 없습니다. ID 열의 NOT NULL 제한을 제거하거나 (권장하지 않음) 소스에서 NULL을 확인하십시오. –

+0

@ Prabhat-G 연결 관리자의 매핑 섹션에서 DB 열 'ID'에 아무 것도 연결하지 않으면 문제가 발생하지 않는다고 생각했습니다. 'ID'열이 자동으로 증가합니다. 귀하의 회신에 감사드립니다. – sql2015

답변

1

이 오류는

는 OLE DB 레코드를 사용할 수있는 출력이 선으로 설명 보인다. 원본 : "Microsoft SQL Server 네이티브 클라이언트 11.0"Hresult : 0x80004005 설명 : "NULL '값을 NULL''열을'ID '테이블'ssis.dbo.Apps '테이블에 삽입 할 수 없습니다; 열이 null 허용. 삽입 실패합니다." 어려운 점 이외의 다른 문제의 정확한 영역이 테이블에 NULL을 허용하지 않는 ID라는 열이 말을 핀에 SSIS.dbo.Apps 테이블의 파일 L:\sql queries\SSIS TUTORIAL\apps.txt 및 설계의 내용을 모른 채

파일에는 해당 컬럼의 내용이 NULL 인 행이 있습니다.

당신은 너무

CREATE TABLE dbo.Apps (
     Id UNIQUEIDENTIFIER PRIMARY KEY 
    , Apps CHAR (1) 
    , Rating CHAR (1) 
    , Summary CHAR (1) 
); 

같은 테이블이 그리고 ID 열이 같은 아무것도를 삽입하려고하는 것 [편집} OP의 의견

다음 업데이트

INSERT INTO dbo.Apps 
(Id, Apps, Rating, Summary) 
VALUES 
(NULL , '1', '2', '3') 

이 오류가 발생합니다

메시지 레벨 515, 상태 16, 상태 2, 줄 5 열 'Id', 'xStuff.dbo.Apps'테이블에 NULL 값을 삽입 할 수 없습니다. 열이 널을 허용하지 않습니다. INSERT가 실패합니다. 당신이 INT IDENTITY

CREATE TABLE dbo.Apps (
     Id INT IDENTITY PRIMARY KEY 
    , Apps CHAR (1) 
    , Rating CHAR (1) 
    , Summary CHAR (1) 
); 

에 자동 증가에 ID 열, UNIQUEIDENTIFIER을 원하는

그래서 난 당신과 같이 테이블 정의를 변경 추천이이 작동합니다

INSERT INTO dbo.Apps 
( Apps 
    , Rating 
    , Summary 
) 
VALUES 
( '1', '2', '3'), ( 'A', 'B', 'C') 

출력보기

enter image description here

+0

. 내 apps.txt 파일에 3 개의 헤더가 포함되어 있습니다. App | Rating | Summary. 내 SQL 데이터베이스 테이블 APP는 4 열 ID | App | Rating | Summary를 포함합니다. ID는 PK로 설정되고 데이터 유형은 uniqueIdentifier로 설정되며 이는 null을 허용하지 않습니다. 나는 이것이 패키지가 실행될 때 이것이 채워질 것이라고 생각하는 문제가 될 것이라고 생각하지 않았다? – sql2015

+0

uniqueidentifier는 자동 증가 및 실행되지 않으며 기본 제약 조건을 만들지 않으면 기본값이 없습니다. –