Reputation: 3244
When my SSMS (SQL Server management studio) is connected to my shared hosting db server, all databases including those not owned by me are listed in the left pane( the explorer of SSMS).
Ideally, I want only databases owned by me to be shown here. To display others' database is a security leak, though I have not permission to view their data. At least I know the db names of them.
Is it possible to achieve this, either by configuring my SSMS, or asking the support team of the service provider to change their settings ( I think it should be configured at server side)?
Thanks.
Upvotes: 1
Views: 599
Reputation: 3244
I figured this out by running below SQLs.
DENY VIEW any DATABASE TO PUBLIC;
GRANT CREATE DATABASE TO PUBLIC;
ALTER AUTHORIZATION ON DATABASE::testdb TO testuser;
Upvotes: 0
Reputation: 1157
You can achieve this through schema permissions. Check out this thread for more information.
Upvotes: 1