1. Use T-SQL you can run the following script first on the Source SQL Server, which generates the T-SQL statement that can be executed; then you can perform these generated T-SQL statements on the destination server: Set nocount on
SELECT 'EXEC SP_ADDLOGIN @loginame =' '' loginname '' ',', @DEFDB = '' ' dbname ' '' ', @deflanguage =' '' language '' ', ', @encryptopt =' 'Skip_encryption' ',', @passwd = ', Cast (Password As Varbinary (256)),', @SID = ', Sidfrom Sysloginswhere Name Not in (' SA ') and isntname = 0
SELECT 'EXEC sp_grantlogin @loginame =' '' loginname '' '', 'EXEC sp_defaultdb @loginame =' '' loginname '' '', ', @defdb =' '' dbname '' '' From syslogins where loginname not in ('Builtin / Administrat "and isntname = 1 2. In addition, you can also use the Transfer logins task of SQL Server 2000 DTS.