1. After the server migration, overwriting the original system database to the new server, with the current Windows account unable to sign in, there are several methods:
(1) Add a new account on the original machine and give the administrator permissions, and then migrate to the new machine;
(2) login in single-user mode to create a new login:
1) After the migration is complete, stop the SQL service;
2) Run cmd, enter: ' net start mssqlserver/m ' (default instance)
3) If it is a named instance: ' net start instance name/M '
4) Connect to SQL, using: sqlcmd-e-s<servername>
5) Create the corresponding login and give administrator privileges
For example:
Create login test with password = ' Test '
Go
EXEC master. sp_addsrvrolemember @loginame =n ' test ', @rolename =n ' sysadmin '
Go
Login login Issues after SQL server-Server migration