Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Implement new security capabilities in DB2 9.5, Part 1: Understanding roles in DB2 9.5

Secure your database

Paul Read (paul_read@uk.ibm.com), Product Introduction Manager, EMC
Paul Read
Paul Read is a product introduction manager in the Global BetaWorks team, based in the IBM Lab in Hursley, Hampshire, United Kingdom. Paul is the lead professional for Beta and Early Support Programs for Information Management products on Linux, Unix, and Windows. He has also provided technical consultancy and skills transfer for the Information Management software products across all platforms.
(An IBM developerWorks Contributing Author)

Summary: 

IBM® DB2® 9.5 provides new options for tighter security, and allows for more granularity and flexibility in administration of the database. This tutorial is the first of two tutorials that cover roles and trusted contexts. Follow the exercises in this tutorial, and learn how to take advantage of the new DB2 feature roles in combination with other essential e-business technologies such as Web services, Web application server, and DB2 database server.

View more content in this series

Date:  20 Dec 2007
Level:  Intermediate PDF:  A4 and Letter (101 KB | 26 pages)Get Adobe® Reader®

Activity:  8465 views
Comments:  

Before you start

About this tutorial

This tutorial will take you through a series of exercises to familiarize yourself with roles, a new feature in DB2 9.5. This tutorial is intended for DB2 technical specialists, database administrators, and programmers. You should have a good understanding of DB2 on Linux, UNIX, and Windows (hereafter called DB2 LUW). You should also be familiar with the DB2 command window and running DB2 scripts. Roles may also be created and managed using the new IBM Data Studio. However, they are not supported in the DB2 Control Center.


Objectives

This tutorial will help familiarize you with concepts and features of roles in DB2 9.5. In these exercises, you will learn:

  • The basic concepts for roles
  • How to create and manage roles
  • How to use various SQL queries and tools to analyze the usage of roles

System requirements

To run the examples in this tutorial, you need:

  • DB2 9.5 Express-C
  • Microsoft Windows 2003, XP or Linux (Validated Environment)
  • Java® Runtime Environment 1.4.2 or later

Also ensure that your hardware meets the requirements for DB2 9.5. (Refer to the DB2 9.5 system requirements page.)

DB2 9.5 Express C is available from the above link. DB2 9.5 is a full installation, not a fixpack upgrade. By default, DB2 will automatically start after installation unless you request it not to automatically start.

Use the sample scripts and data provided in the accompanying zip file (see Download section) to demonstrate the concepts in this tutorial. Extract the contents into a subdirectory called DB2Roles (C:\DB2Roles or home/userid/DB2Roles). This directory will be referred to simply as DB2Roles throughout the tutorial. This tutorial assumes that you have used the default directories for the DB2 installation. This tutorial requires the creation of a number of userids, and all the exercises will use the ids created.


Definition of a role

A role is a database object to which one or more DB2 privileges, authorities, or other roles can be granted or revoked. A role does not have an owner and it can only be created or dropped by the security administrator (SECADM).

By associating a role with a user, the user inherits all the privileges held by the role, in addition to privileges already held by the user.

The key advantage of database roles is that they simplify the administration and management of privileges in a database. For instance:

  • Security administrators can control access to their databases at a level of abstraction that is close to the structure of their organizations. For example, if the company has 12 branches and everyone within each branch has a set of identical privileges, then the SECADM would set 12 roles and then grant membership to users based on their location.
  • Users are granted membership in the roles based on their job responsibilities. As the user's job responsibilities change, which may be frequent in a large organization, user membership in roles can be easily granted and revoked. For example, if a user moves from the New York branch to the Boston branch, then the SECADM simply revokes his access to the role for New York and grants access to the role for the Boston branch.
  • The assignment of privileges is simplified. Instead of granting the same set of privileges to each individual user in a particular job function, the administrator can grant this set of privileges to a role representing that job function and then grant that role to the users in that job function. For example, individual jobs can often require many different privileges for a user. However, if the privileges are granted to a role, then it is simple to grant or revoke the privileges without having to maintain large scripts for each job. If the SECADM needs to alter the privileges for a role, he can alter it in one place without having to replicate to process for all users.
  • Roles can be updated without updating the privileges for every user on an individual basis. For example, if the SECADM needs to alter the privileges for the branch in New York, she can alter the definition for the role without having to replicate the process for all users.

All DB2 privileges and authorities that can be granted within a database, with the exception of SECADM, can be granted to a role. By granting privileges and authorities to roles only, and making users members in roles, the administration and management of privileges in the database is greatly simplified.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=278735
TutorialTitle=Implement new security capabilities in DB2 9.5, Part 1: Understanding roles in DB2 9.5
publish-date=12202007
author1-email=paul_read@uk.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.