The DatabaseRole object represents the properties of a single Microsoft® SQL Server™ database role.
SQL Server database roles establish groups of users with similar security attributes. Database permissions can be granted by role, simplifying database security planning and administration. With the DatabaseRole object, you can:
The Name property of a DatabaseRole object uses the SQL Server data type sysname.
To create a SQL Server database role
After creating the new SQL Server database role, you can use the Grant and Deny methods of the Database, StoredProcedure, Table, and View objects to set permissions for the new SQL Server database role.
To administer an existing SQL Server database role
Note The DatabaseRole object is compatible with instances of SQL Server 2000 and SQL Server version 7.0. However, the DatabaseRole2 object extends the functionality of the DatabaseRole object for use with features that are new in SQL Server 2000.