Reputation: 67
Is it possible to hide the databases used in my application from the user. What I need is that when user opens SQL Server management studio, he should not see the databases used in my application developed in C# and VB6
Upvotes: 0
Views: 465
Reputation: 303
Accessing the database with a user login only gives access to the databases for which that use has been given permission. Different users have access to different databases. Perhaps you have 3 users: root, admin, user.
As a start point, try looking at http://msdn.microsoft.com/en-us/library/ms187936.aspx
Upvotes: 1
Reputation: 26086
Don't grant the user permission to access the database. Instead embed credentials in to your program that allow it to access the DB via a dedicated account. When the user uses your program the program's user is granted access, but if the user tries connect directly he is denied access.
Upvotes: 0
Reputation: 22323
You would need to revoke the permission 'VIEW ANY DATABASE' from the role PUBLIC (SQL SERVER 2005 onwards).From Stackoverflow. For more details see a ans Hide SQL database from Management Studio
Upvotes: 0
Reputation: 2126
There are 2 ways to forbid access to db content:
Upvotes: 4