Wrox Programmer Forums
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 19th, 2008, 06:40 AM
Authorized User
Join Date: Jun 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Roles

what is role in sqlserver 2005? how to use role in sql server & benifit of the roles?

Old January 19th, 2008, 12:10 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Just like in any other user/role based system, you can assign users to roles and rights to the roles so that you don't have to assign specific rights to individual users.

For example, there is a role in sql server called "data_reader". That role has rights to read data from objects in the database. Instead of assigning each user read rights to individuals tables you could make them a member of the "data_reader" role. If you need to restrict a user's rights to specific objects (sprocs, tables, views) then you may need to remove them from a role with more rights and assign them very specific rights.

I have found in my work building database based applications that I don't do much specific permission management because the application abstracts the access to the database and controls what a user can or can't do. For example, a management section of a web site is only accessible to users in the application's "management" role (app role control, not sql server role control). So the web application accesses the database with a single database user which requires rights to everything used by the application.

Database security is a very broad subject. There are many books available on it and much online as well. I'd recommend doing some searching and reading online to get an idea of where you need to start.


Similar Threads
Thread Thread Starter Forum Replies Last Post
roles and management MunishBhatia ASP.NET 2.0 Professional 2 November 3rd, 2007 01:01 AM
RoleGroups and Roles durban ASP.NET 2.0 Basics 3 September 19th, 2007 01:24 PM
Sitemapnode and roles luca ASP.NET 2.0 Basics 0 September 12th, 2007 11:30 AM
Roles jackandjo BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 October 17th, 2006 03:12 AM
Roles Permissions Many to Many ... Why? seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 2 November 5th, 2004 10:51 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.