Server reload system, reinstall on SQL Server, attach to previous database,
Then there was a login for each database that was used to manipulate the database, and the other databases were not operational.
Attached to the database after the user in the security of the database can see the previously established users, but in the system-level security outside the login name does not have a corresponding user, a login user and directly prompt the user already exists,
Search the internet for a bit, the solution is as follows:
System-level security, the login name there is a new user with the same name, authorized there is nothing to choose, will not prompt the user already exists, and then execute the following SQL statement, the database user and the login name associated with:
use qikai_guanwang --数据库名,中间带点用[]
go
sp_change_users_login
‘update_one‘
,
‘qikai‘
,
‘qikai‘ --‘qikai‘
,
‘qikai‘
用户名和登录名
Bind a SQL Server database to a user and login name