Logged-in users such as SQL Server 2008 can only see their own database setup methods

Source: Internet
Author: User

By default, the logged-on user sees themselves in addition to the database for which they have administrative privileges. You can also see other databases, which prompt for no permissions when you click Open. The following settings enable the user to see only the databases for which they have administrative privileges, but not other databases that do not have permissions.

(1) Cancel default to view any database

DENY VIEW any DATABASE to public; --No permissions set, all default login users cannot view any database

(2) Permission to view a database with administrative privileges

ALTER AUTHORIZATION on DATABASE::D bname to DBUser; --Give Dbuser (here Dbuser for example, with the corresponding database administrator can) to view and Access dbname (here dbname to the distance database, replaced by the corresponding database name) database (do not give it to other databases to view permissions, You cannot view other databases.)

Logged-in users such as SQL Server 2008 can only see their own database setup methods

Related Article

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.