SQL isolated user solution ~

Source: Internet
Author: User
The reference content often becomes inaccessible to tables by account after database backup and system replacement. The following is a general example.

Run the following statement to change the owner of the table in the current database to DBO. Of course, you can change the owner of the table to another one as long as you modify the UID value.

Sp_configure 'Allow updates', '1'
Go
Reconfigure with override
Go
Update sysobjects set UID = 1 where uid <> 1
Go
Sp_configure 'Allow updates', '0'
Go
Reconfigure with override

Then, delete the isolated account in the user option in the database...

Note: The following statements can be used for uid query:

Use master
Select *
From sysusers
Where uid> = '1'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.