2017-10-13 7 views
0

Ich bin neu in SSIS also habe einige Online-Tutorials folgen. Ich bin auf folgendes gestoßen und kann nicht herausfinden, was passiert ist. der Fehler ist mit der OLE DB-VerbindungSSIS-Fehler mit OLE DB-Ziel bei der Ausführung

wenn mir jemand in die richtige Richtung zeigen kann, um das gelöst zu bekommen, das wäre großartig.

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. 

der erste Fehler ii kann nicht aufgelöst werden. Ich habe die Verbindung überprüft, die Zieltabelle in der SQL-DB und weiß nicht, was das Problem ist. könnte es mit Windows-Authentifizierung für den Zugriff auf db zu tun?

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

Fügen Sie den Inhalt der Datei 'apps.txt' und die Definition der' dbo.Apps' Tabelle hinzu. –

+0

'" Der Wert NULL kann nicht in die Spalte 'ID'' eingefügt werden. Entfernen Sie entweder die NOT NULL-Einschränkung der ID-Spalte (nicht empfohlen), oder suchen Sie in der Quelle nach NULL. –

+0

@ Prabhat-G Ich dachte, wenn ich nichts mit der DB-Spalte "ID" im Mapping-Abschnitt des Verbindungs-Managers verknüpfen würde, dann gäbe es kein Problem. die 'ID' Spalte wird nur automatisch erhöht? – sql2015

Antwort

1

Dieser Fehler sieht in der Ausgabe

Ein OLE DB-Datensatz zur Verfügung von dieser Linie zu erklären ist. Quelle: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Beschreibung: " Wert NULL kann nicht in Spalte 'ID' eingefügt werden, Tabelle 'ssis.dbo.Apps'; Spalte nicht Null zulassen. INSERT fehlschlägt.".

Ohne den Inhalt der Datei zu wissen L:\sql queries\SSIS TUTORIAL\apps.txt und das Design der SSIS.dbo.Apps Tabelle es schwierig, als die genaue Fläche des Problems anderen Punkt an Pin zu sagen, dass die Tabelle eine Spalte ID genannt hat, die NULL-Werte nicht akzeptiert und die Datei hat eine Zeile, in der der Inhalt der entsprechenden Spalte einen NULL hat.

[EDIT} -Update folgende OP Kommentare

Sie scheinen einen Tisch zu haben, wie so

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

und zu versuchen, so etwas wie dieses, nichts in der Spalte Nummer

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

Sie erhalten diesen Fehler

Msg 515, Ebene 16, Status 2, Zeile 5 Der Wert NULL kann nicht in Spalte 'Id', Tabelle 'xStuff.dbo.Apps' eingefügt werden; Spalte erlaubt keine Nullen. INSERT schlägt fehl.

Deshalb würde ich empfehlen Ihnen, wie so die Tabellendefinition ändern, wie Sie die ID-Spalte auf Autoinkrement wollen, UNIQUEIDENTIFIER zu einem INT IDENTITY

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

und das dies funktionieren wird

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

siehe Ausgabe

enter image description here

+0

danke für deine antwort. Meine apps.txt Datei enthält 3 Header App | Bewertung | Zusammenfassung. Meine SQL-db-Tabelle APPs enthält 4 Spalten ID | App | Bewertung | Zusammenfassung. Die ID wird als PK festgelegt, und der Datentyp wird auf uniqueIdentifier festgelegt, was bedeutet, dass Nullen nicht zulässig sind. Ich dachte nicht, dass dies ein Problem sein würde. Ich dachte, das würde sich füllen, wenn das Paket läuft. – sql2015

+0

Ein Uniqueidentifier wird nicht automatisch inkrementiert und hat keinen Standardwert, es sei denn, Sie erstellen eine Standardbedingung –

Verwandte Themen