How to set login name after login only to see and operate a database this user cannot see other databases
There are three databases on a server I want to create three new logins each login can only see the corresponding database can not see the remaining two how to set it?
Share to:
------Solution--------------------
1. SQL database Assignment permissions
Open the Sql-server management tool? security? Login name? Right-click (new Login)
Enter the appropriate information (here to remove the mandatory password policy, enforce password expiration, the user must change the password at the next logon selection)
User mapping? Select the database that we want to set permissions for? Set permissions for new users by selecting database role Memberships
General permissions for the entire library when all the permissions are required to check the db_owner (OK)
This will allow us to access our database server with our newly created username, and this username will only have all the permissions of the database we have checked.
------Solution--------------------
Each database is set up with a set of permissions to make an account
------Solution--------------------
Remove the View any DATABASE permission from the public role.
Simply explain:
The public role defaults to view any database permissions, which means that metadata describing all the databases can be viewed.
All database users inherit the public role by default. This means that all database users can view the metadata for all databases by default.
------Solution--------------------
DENY VIEW any DATABASE to public
------Solution--------------------
GRANT VIEW any DATABASE to public
We can recover.
------Solution--------------------
Look at this, it should be useful to you, you want the login to see several databases, you see several databases.
How to set login name after login only to see and operate a database this user cannot see the other database