Sql-server – SSIS Transfer Login Task Error

loginssql serversql-server-2017ssis

I have created an SSIS Transfer Logins Task. I have selected the SourceConnection and DestinationConnection and both valid and active.

I have selected certain Windows group accounts to transfer from source to destination databases. IfObjectExists is set to 'Overwrite' and CopySids is 'True'.

When I run the task I get the following error:

SSIS package "F:\SQL Server\SSDT\acQuire Migration\acQuire Migration SSIS\acQuire Migration SSIS\Package.dtsx" starting.

Error: 0xC002F325 at Transfer Logins Task, Transfer Logins Task: Execution failed with the following error: "An exception occurred in SMO.".

Error: 0xC002F325 at Transfer Logins Task, Transfer Logins Task: Execution failed with the following error: "Value cannot be null.

Parameter name: server".

Task failed: Transfer Logins Task

Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) 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 "F:\SQL Server\SSDT\acQuire Migration\acQuire Migration SSIS\acQuire Migration SSIS\Package.dtsx" finished: Failure.

The program '[1868] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).

Best Answer

Instead of going through the rabbit hole of finding a fix for the error, I would highly suggest you use dbatools

Copy-DbaLogin

This command migrates logins from source to destination SQL Servers. Supports SQL Server versions 2000 and above. Migrates logins with

SIDs

passwords

defaultdb

server roles & securables

database permissions & securables

login attributes (enforce password policy, expiration, language, etc).

e.g.

Copy-DbaLogin -Source sqlserver -Destination sqlcluster

and there are many more commands that will make your life easier