I need to test the security of the database roles I have created for a .net application by adding myself to a role and trying to access the data from the application.
I have the dev db on my PC, therefore I am accessing the local sql server 2005 as part of the BUILTIN\Administrators group. This naturally gives me the sysadmin role. To get round this I have then added my windows account as a logon and mapped it to the database with the public role, then logging on as sa I remove BUILTIN\Administrators from sysadmin.
Problem #1: I can still access all the data! I thought this would stop me accessing all the data as my only role membership is public.
Problem #2: If I add myself to db_denydatareader, I get the permission denied error. Which is expected. I then add myself to one of the database roles I created, I still get the permission denied error!
How can use my own login to test the data access for the db role?
Thanks,
Lee.
itlee. MCP\Analyst\Programmer\SQL\.NET\VB\C#
I have the dev db on my PC, therefore I am accessing the local sql server 2005 as part of the BUILTIN\Administrators group. This naturally gives me the sysadmin role. To get round this I have then added my windows account as a logon and mapped it to the database with the public role, then logging on as sa I remove BUILTIN\Administrators from sysadmin.
Problem #1: I can still access all the data! I thought this would stop me accessing all the data as my only role membership is public.
Problem #2: If I add myself to db_denydatareader, I get the permission denied error. Which is expected. I then add myself to one of the database roles I created, I still get the permission denied error!
How can use my own login to test the data access for the db role?
Thanks,
Lee.
itlee. MCP\Analyst\Programmer\SQL\.NET\VB\C#