I tried some methods provided on the Internet and finally solved some problems with SQL.
1. Select the database in the query analyzer and enter:
Exec sp_configure 'Allow updates', 1 -- allow updating system tables.
RECONFIGURE WITH OVERRIDE
2. Run the following SQL statement:
UPDATE sysobjects SET uid = 1 -- all objects in the database belong to the user dbo
3. Execute the following SQL statement:
Exec sp_configure 'Allow updates', 0 -- disable system table update
RECONFIGURE WITH OVERRIDE
4. Delete the users in the database and recreate the user.
The reasons for this problem are as follows:
Problems that are easily encountered when MSSQL backup is transplanted to another server for restoration ......
Problems that may occur when MSSQL backup is transplanted to another server for restoration, especially when the database backed up from the VM is restored locally...
The original user name and password of the SQL statement are invalid.
A system table cannot be deleted.
When the Select statement is connected using sa, the system prompts that the table name is invalid.
The user name in the original backup database cannot be deleted, and the prompt "the user cannot be deleted because the selected user has an object ."
The main reason is that the original user information is retained during Backup recovery, resulting in isolated users ......