2014-10-15 6 views
0

한 데이터베이스에서 다른 데이터베이스로 데이터를 이동시키는 dtsx 패키지를 만들었습니다. BIDS로 실행하면 정상적으로 실행됩니다. 명령 줄에서 실행하면 잘 돌아갑니다. 내가 만든 서비스 계정으로 명령 줄에서 실행할 때 원본 DB의 로컬 SQL Server 사용자 \ 암호가 잘못되었다는 오류가 발생합니다. 소스 DB의 로컬 사용자에 대한 사용자 이름과 암호가 프로젝트에 포함되어 있기 때문에 분명히 사실 일 수는 없습니다.BIDS 패키지는 BIDS에서 실행되지만 명령 줄에서는 실행되지 않습니다.

전체 서버 관리자 권한뿐만 아니라 도메인/서비스 계정 DB 관리자 권한을 부여하려고했습니다. 그건 아무 것도 안했어. 또한 로컬 계정에 LD_Transfer001에 더 많은 사용 권한을 부여하려고했지만 그 또한 아무 것도하지 않았습니다. 이 작업을 수행 할 수있는 유일한 방법은 명령 줄에서 내 도메인 관리자 계정으로 실행하는 것입니다. 패키지가있는 폴더가 올바른 사용 권한을 가지고 있는지 확인했습니다. 도메인/서비스로 실행

:

SQL 로그 :

Login failed for user 'LD_Transfer001'. Reason: Password did not match that for the login provided. [CLIENT: <local machine>] 

명령 줄 오류 메시지 : 나 [명령 프롬프트를 엽니 일반적으로 없음으로 실행

Microsoft (R) SQL Server Execute Package Utility 
Version 10.50.4000.0 for 64-bit 
Copyright (C) Microsoft Corporation 2010. All rights reserved. 

Started: 9:47:57 AM 
Error: 2014-10-15 09:47:57.74 
    Code: 0xC0016016 
    Source: 
    Description: Failed to decrypt protected XML node "DTS:Password" with error 0 
x8009000B "Key not valid for use in specified state.". You may not be authorized 
to access this information. This error occurs when there is a cryptographic err 
or. Verify that the correct key is available. 
End Error 
Error: 2014-10-15 09:47:57.76 
    Code: 0xC0016016 
    Source: 
    Description: Failed to decrypt protected XML node "DTS:Password" with error 0 
x8009000B "Key not valid for use in specified state.". You may not be authorized 
to access this information. This error occurs when there is a cryptographic err 
or. Verify that the correct key is available. 
End Error 
Progress: 2014-10-15 09:47:57.88 
    Source: Data Flow Task 
    Validating: 0% complete 
End Progress 
Error: 2014-10-15 09:47:57.92 
    Code: 0xC0202009 
    Source: FranchiseeInfo Connection manager "LDHQSQL.001" 
    Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. 
Error code: 0x80040E4D. 
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0 
" Hresult: 0x80040E4D Description: "Login failed for user 'LD_Transfer001'.". 
End Error 
Error: 2014-10-15 09:47:57.92 
    Code: 0xC020801C 
    Source: Data Flow Task OLE DB Source [1] 
    Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAG 
ER. The AcquireConnection method call to the connection manager "LDHQSQL.001" f 
ailed with error code 0xC0202009. There may be error messages posted before thi 
s with more information on why the AcquireConnection method call failed. 
End Error 
Error: 2014-10-15 09:47:57.92 
    Code: 0xC0047017 
    Source: Data Flow Task SSIS.Pipeline 
    Description: component "OLE DB Source" (1) failed validation and returned err 
or code 0xC020801C. 
End Error 
Progress: 2014-10-15 09:47:57.93 
    Source: Data Flow Task 
    Validating: 50% complete 
End Progress 
Error: 2014-10-15 09:47:57.93 
    Code: 0xC004700C 
    Source: Data Flow Task SSIS.Pipeline 
    Description: One or more component failed validation. 
End Error 
Error: 2014-10-15 09:47:57.93 
    Code: 0xC0024107 
    Source: Data Flow Task 
    Description: There were errors during task validation. 
End Error 
DTExec: The package execution returned DTSER_FAILURE (1). 
Started: 9:47:57 AM 
Finished: 9:47:57 AM 
Elapsed: 0.266 seconds 

명령 줄 오류 메시지

Login succeeded for user 'LD_Transfer001'. Connection made using SQL Server authentication. [CLIENT: <local machine>] 
+0

설정 파일을 사용하고 있습니까? 그렇습니다. – gvee

+0

나는 그렇게 생각하지 않는다. 내가 가지고있는 것은 dtsx 패키지입니다. – d90

+0

패키지 속성의 "ProtectionLevel"값은 무엇입니까? – gvee

답변

1

민감한 정보 (예 : 암호)는 패키지에서 암호화됩니다. 생성 된 암호화 키는 패키지가 개발 된 시스템의 사용자 계정에서 생성됩니다.

따라서 서비스를 통해 실행하면 암호 해독 키를 사용할 수없고 암호를 읽고 사용할 수 없습니다.

가능한 옵션의 몇 해결할 수 있습니다

  1. Windows 인증 패키지에 연결합니다.

  2. ConnectionString을 설정하기 위해 구성 파일을 사용하십시오. 구성 파일의 연결 문자열이 일반 텍스트 암호를 가지고 있는지 확인하십시오.

  3. 는에 하나 EncryptSensitiveWithPassword 또는 EncryptAllWithPassword 패키지의 ProtectionLevel 속성을 설정하고 DTSExec에 암호를 입력합니다.

방법 1은 가장 간단하지만 항상 적절한 것은 아닙니다.

방법 2는 좋은 해결 방법이지만 암호는 일반 텍스트로 남겨 둡니다. DTS 패키지의 위치가 안전하고 때로는 물건을 다시 구성해야하므로이 방법을 선택하는 경향이 있습니다. 나는 설정 파일을 좋아한다!

방법 3 역시 건전한 솔루션입니다. 자세한 내용은 여기를 참조하십시오 : http://msdn.microsoft.com/en-us/library/ms138023.aspx. /decrypt 옵션을 사용하여 암호를 전달해야합니다. dtsexec