Saminnet-Search Article Wiki Forum Piwigo SNS Cloud vtiger Sugar
DB2 Roles

  • Data-Articles
    • Baja iwf (106) Sun09,20:21pm

      sesuai post saya yang terakhirツdisini, rumah dua pohon sedang dalam pembangunan tahap 2 dengan material utama menggunakan baja. baja adalah material konstruksi yang paling padat apabila dibandingkan dengan beton dan kayu karena memiliki berat satuan yang cukup besar. karena baja bisa difabrikasi di pabrik, pemasangan di site bisa lebih cepat dibandingkan dengan beton yang mesti dicetak dan ditun…

      Read More...

DB2 Roles

Introduction

A role is a database object that groups multiple privileges that can be assigned to users, groups, PUBLIC or other roles by using GRANT statement.

Restrictions on roles

  • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">A role cannot own database objects.
  • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">Permissions and roles granted to groups are not considered when you create the following database objects.
    • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">Package Containing static SQL
    • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">Views
    • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">Materialized Query Tables (MQT)
    • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">Triggers
    • http://www.tutorialspoint.com/images/icon-bullet.png) 0px 4px no-repeat;">SQL Routines

Creating and granting membership in roles

Syntax:ツ[To create a new role]

db2 create role <role_name>

Example: [To create a new role named 窶sales窶 to add some table to be managed by some user or group]

db2 create role sales 

Output:

DB20000I The SQL command completed successfully.

Granting role from DBADM to a particular table

Syntax:ツ[To grant permission of a role to a table]

db2 grant select on table <table_name> to role <role_name>

Example: [To add permission to manage a table 窶shope.books窶 to role 窶sales窶兢

db2 grant select on table shope.books to role sales 

Output:

DB20000I  The SQL command completed successfully.

Security administrator grants role to the required users. (Before you use this command, you need to create the users.)

Syntax:ツ[To add users to a role]

db2 grant role <role_name> to user <username>

Example: [To add a user 窶藁astanvali窶 to a role 窶sales窶兢

db2 grant sales to user mastanvali  

Output:

DB20000I  The SQL command completed successfully.

Role hierarchies

For creating a hierarchies for roles, each role is granted permissions/ membership with another role.

Syntax:ツ[before this syntax create a new role with name of 窶徘roduction窶拆

db2 grant role <roll_name> to role <role_name>

Example: [To provide permission of a role 窶sales窶 to another role 窶湾roduction窶兢

db2 grant sales to role production 

Comments   

 
0 #1 Guest 2016-04-11 03:32
excellent issues altogether, you simply won a new reader.
What might you recommend in regards to your publish that you simply made some days ago?
Any sure?

Feel free to surf to my site; read books
Quote
 

Category Database

TweetTweet Share on LinkedInShare on LinkedIn Share on Google+Google+ Submit to RedditReddit Publish on WordPress WordPress Send emailSend email