Rename user sys
Upgrade Advisor detected the user name sys in a database. This name is reserved. Rename the user before you upgrade. If the user is not renamed, the database will be in a suspect state after the upgrade process and will be unavailable until the database is brought online.
User sys is reserved.
Before you upgrade, in each database that contains user sys, do the following:
Create a new user.
Use the following statements to display all permissions that are granted by user sys and granted to user sys.
-- Return permissions granted by user sys. SELECT * FROM sysprotects WHERE grantor = USER_ID('sys') -- Return permissions granted to user sys. SELECT * FROM sysprotects WHERE uid = USER_ID('sys')
To transfer ownership of all objects owned by sys to the new user, use sp_changeobjectowner.
Drop user sys.
To restore the original permissions captured in step 2, use the AS new_user clause of the GRANT statement.
Modify scripts to reference the new user. For example, scripts that contain statements such as SELECT * FROM sys.my_table must be changed to SELECT * FROM new_user.my_table.
If the user sys was not renamed prior to upgrading, do the following:
Execute the statement ALTER DATABASE db_name SET ONLINE. The database will be in SINGLE_USER mode.
Follow all steps in the Before Upgrade Procedure section.
Execute the statement ALTER DATABASE db_name SET MULTI_USER.