Setup a SQL Server database that's only visible to certain users -
i'm setting laptop developer interviews ready coding tests. want create database each candidate, in advance of interview itself. preparation goes this:
- logon admin.
- create local windows user each candidate.
- create database on local default instance of sql server each candidate (with name in database name).
such when logon windows each candidate, if open ssms can see own database in object explorer.
i want way, because there isn't quite enough time in-between interviews backup/detach previous candidate's database , create next candidate's database (the machine slowish, logging off/on again etc takes time).
is possible, , if so, how?
many in advance.
it appears there's option in sql server 2005+ accommodate needs here. sounds if requirement user doesn't see other databases in object explorer.
how hide databases in sql server highlights view database permission. may useful in situation database x needs hidden users other windows user x.
this msdn forum thread (see bottom-most posts) suggests combination of denying view database user, , giving authorization possible solution.
i've replicated on sql server 2008 machine, used sql server authentication in quick test. worked described: dbs hidden login, save 1 specified below.
use <customersdatabase> alter authorization on database::<customerdatabase> <customerlogin> use master deny view database <customerlogin>
Comments
Post a Comment