Pacchetto SSIS che funziona in offerte ma non con dtexec, errore dts_e_adodestfailedtoacqueConnection

StackOverflow https://stackoverflow.com/questions/8382880

  •  28-10-2019
  •  | 
  •  

Domanda

Ho costruito un pacchetto SSIS che funziona bene entro le offerte. Il pacchetto funziona con successo.

Ora sto cercando di eseguire lo stesso pacchetto, con la stessa configurazione dalla riga di comando, ma non riesce ad acquisire una connessione (errore 0xc0208452: dts_e_adodestfailedtoacqueConnection).

La connessione a causa è una connessione ADO.NET a un file di accesso che contiene tutti gli errori (come ho detto, direttamente nelle offerte, funziona).

Uso la riga di comando seguente (in un file .cmd). Il flag x86 è impostato poiché sto utilizzando anche una connessione a un file Excel:

@echo off
set dtexec=%programfiles%\Microsoft SQL Server\100\DTS\Binn\dtexec.exe
"%dtexec%" /X86 /f "myPackage.dtsx" 

L'output è:

Error: 2011-12-05 09:47:38.94
   Code: 0xC0208452
   Source: Output Errors to access file [162]
   Description: ADO NET Destination has failed to acquire the connection {19CC1EA2-BD93-4006-919E-39A80E828BB1}. The connection may have been corrupted.
End Error

La stringa di connessione utilizzata per questa connessione è:

Data Source=c:\path\to\errors.mdb;Provider=Microsoft.Jet.OLEDB.4.0

Pertanto viene applicata la modalità predefinita per la condivisione della connessione (16: sharedenynode).

Infine, la mia piattaforma è:

  • W2K8 R2 X64
  • SQL 2K8 R2 X64

Non vedo cosa non va in questa riga di comando. Apprezzerei un po 'di aiuto.

PS: Nel caso in cui ho provato a correre come amministratore, ma il comportamento è identico.

Modificare Non so se può aiutare, ma ecco il registro degli errori quando si utilizza /consolelog flag:

Log:
     Name: Diagnostic
     Computer: mycomputer
     Operator: domain\me
     Source Name: Jet Errors
     Source GUID: {19CC1EA2-BD93-4006-919E-39A80E828BB1}
     Execution GUID: {90BCE5BA-CF8B-49FC-8275-1F1FF70720CB}
     Message: ExternalRequest_pre: The object is ready to make the following external request: 'IDbConnection.Open(ConnectionType: System.Data.OleDb.OleDbConnection,
 System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
ConnectionString: Data Source="c:\Path\to\errors.mdb";Provider=Microsoft.Jet.OLEDB.4.0;)'.
     Start Time: 2011-12-05 09:58:57
     End Time: 2011-12-05 09:58:57
End Log
Log:
     Name: Diagnostic
     Computer: mycomputer
     Operator: domain\me
     Source Name: Jet Errors
     Source GUID: {19CC1EA2-BD93-4006-919E-39A80E828BB1}
     Execution GUID: {90BCE5BA-CF8B-49FC-8275-1F1FF70720CB}
     Message: ExternalRequest_post: 'IDbConnection.Open failed'. The external request has completed.
     Start Time: 2011-12-05 09:58:57
     End Time: 2011-12-05 09:58:57
End Log
Log:
     Name: OnError
     Computer: mycomputer
     Operator: domain\me
     Source Name: Categories
     Source GUID: {6DD5D6E3-2256-43D5-84B8-E9C27E02694B}
     Execution GUID: {90BCE5BA-CF8B-49FC-8275-1F1FF70720CB}
     Message: ADO NET Destination has failed to acquire the connection {19CC1EA2-BD93-4006-919E-39A80E828BB1}. The connection may have been corrupted.

     Start Time: 2011-12-05 09:58:57
     End Time: 2011-12-05 09:58:57
End Log
Error: 2011-12-05 09:58:57.62
   Code: 0xC0208452
   Source: Categories To Categories Errors [162]
   Description: ADO NET Destination has failed to acquire the connection {19CC1EA2-BD93-4006-919E-39A80E828BB1}. The connection may have been corrupted.
End Error
Log:
     Name: OnError
     Computer: mycomputer
     Operator: domain\me
     Source Name: Categories
     Source GUID: {6DD5D6E3-2256-43D5-84B8-E9C27E02694B}
     Execution GUID: {90BCE5BA-CF8B-49FC-8275-1F1FF70720CB}
     Message: component "To Categories Errors" (162) failed validation and returned error code 0xC0208452.

     Start Time: 2011-12-05 09:58:57
     End Time: 2011-12-05 09:58:57
End Log
Error: 2011-12-05 09:58:57.64
   Code: 0xC0047017
   Source: Categories SSIS.Pipeline
   Description: component "To Categories Errors" (162) failed validation and returned error code 0xC0208452.
End Error

Ed ecco la definizione della connessione dal file DTSX stesso:

<DTS:ConnectionManager>
    <DTS:Property DTS:Name="DelayValidation">0</DTS:Property>
    <DTS:Property DTS:Name="ObjectName">Jet Errors</DTS:Property>
    <DTS:Property DTS:Name="DTSID">{19CC1EA2-BD93-4006-919E-39A80E828BB1}</DTS:Property>
    <DTS:Property DTS:Name="Description"></DTS:Property>
    <DTS:Property DTS:Name="CreationName">ADO.NET:System.Data.OleDb.OleDbConnection, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</DTS:Property>
    <DTS:ObjectData>
        <DTS:ConnectionManager>
            <DTS:Property DTS:Name="Retain">0</DTS:Property>
            <DTS:Password DTS:Name="Password" Sensitive="1" Encrypted="1">AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAeUySei4110aSwp/Lg9Ry2wAAAAAIAAAARABUAFMAAAADZgAAwAAAABAAAABIrrL+3ppbrbI4ELkWjVMvAAAAAASAAACgAAAAEAAAAMgk6OFh+lWGPpsFZ0dK9k8IAAAA1HCWmIm7dIsUAAAAjjx5q2XUdjp2o+FxWAaPCEgv94M</DTS:Password>
            <DTS:Property DTS:Name="ConnectionString">Data Source=c:\Path\To\errors.mdb;Provider=Microsoft.Jet.OLEDB.4.0;</DTS:Property>
        </DTS:ConnectionManager>
    </DTS:ObjectData>
</DTS:ConnectionManager>
È stato utile?

Soluzione

Alcuni persone mi hanno dato la risposta su questo Microsoft Forum Thread.

Devo usare la versione a 32 bit di Dtexec anziché la versione a 64 bit, anche se imposto il flag x86.

Il mio file batch è ora:

@echo off
set dtexec=%programfiles(x86)%\Microsoft SQL Server\100\DTS\Binn\dtexec.exe
"%dtexec%" /X86 /f "myPackage.dtsx" 

e funziona ...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top