Home Database Mysql Tutorial DB2权限和特权

DB2权限和特权

Jun 07, 2016 pm 03:01 PM
db2 Example database Permissions level

数据库权限分为实例权限级别(SYSADM、SYSCTRL、SYSMAINT、SYSMON)和数据库权限级别(DBAMD、LOAD)。SYSCTRL、SYSMAINT、SYSMON权限级别的用户不能访问数据,DBAMD、LOAD权限级别的用户可以访问数据。 特权是比权限更细力度的控制。 数据库特权: CONNECT

数据库权限分为实例权限级别(SYSADM、SYSCTRL、SYSMAINT、SYSMON)和数据库权限级别(DBAMD、LOAD)。SYSCTRL、SYSMAINT、SYSMON权限级别的用户不能访问数据,DBAMD、LOAD权限级别的用户可以访问数据。

特权是比权限更细力度的控制。

数据库特权:
CONNECT -允许用户连接数据库
BINDADD -允许用户在数据库中创建新的包
CREATETAB -允许用户在数据库中创建新的表
CREATE_NOT_FENCED -允许用户注册定义为 NOT FENCED 的用户定义函数(UDF)或存储过程
IMPLICIT SCHEMA -允许用户在尚不存在的模式中创建对象(它自动地创建模式)*
QUIESCE_CONNECT -允许用户连接处于 quiesced 状态的数据库
CREATE_EXTERNAL_ROUTINE -允许用户注册外部例程(用 C 和 Java 等外部语言编写的例程)

表空间特权:
USE -允许用户在指定的表空间中创建表

模式特权:
CREATEIN -允许用户在模式中创建对象
ALTERIN -允许用户在模式中修改对象
DROPIN -允许用户从模式中删除对象

表/视图特权:
CONTROL -授予用户在表和视图上的所有特权,以及将这些特权(除了 CONTROL)授予别人
ALTER -允许用户在表中添加列、在表和它的列上添加或修改注释、添加主键或惟一约束以及创建或删除表检查约束
DELETE -允许用户从表或视图中删除行
INDEX -允许用户在表上创建索引
INSERT -允许用户在表或视图中插入数据
REFERENCES -允许用户创建和删除外键,这需要指定关系中的父表
SELECT -允许用户从表或视图中检索行、在表上创建视图以及运行 EXPORT 实用程序
UPDATE -允许用户修改表、视图或者表或视图中某些列中的数据;用户可以只在特定列上具有这种特权

索引特权:
CONTROL -允许用户删除索引

包特权:
CONTROL -允许用户重新绑定、删除或执行包,以及将这些特权(除了 CONTROL)授予别人
BIND -允许用户重新绑定现有的包
EXECUTE -允许用户执行包

例程特权:
EXECUTE 允许用户调用例程,从例程创建函数(只应用于函数),以及在任何 DDL 语句(比如 CREATE VIEW、CREATE TRIGGER 或定义约束时)中引用例程

序列特权:
USAGE -允许用户对序列使用 NEXTVAL 和 PREVVAL 表达式
ALTER -允许用户使用 ALTER SEQUENCE 语句修改序列属性

特权的信息存储在七个系统编目视图中:
* SYSCAT.DBAUTH - 数据库特权
* SYSCAT.COLAUTH - 表和视图列特权
* SYSCAT.INDEXAUTH - 索引特权
* SYSCAT.PACKAGEAUTH - 包特权
* SYSCAT.SCHEMAAUTH - 模式特权
* SYSCAT.TABAUTH - 表和视图特权
* SYSCAT.TBSPACEAUTH - 表空间特权

查看当前连接用户权限:
$ db2 get authorizations
Administrative Authorizations for Current User
Direct SYSADM authority = NO
Direct SYSCTRL authority = NO
Direct SYSMAINT authority = NO
Direct DBADM authority = YES
Direct CREATETAB authority = YES
Direct BINDADD authority = YES
Direct CONNECT authority = YES
Direct CREATE_NOT_FENC authority = YES
Direct IMPLICIT_SCHEMA authority = YES
Direct LOAD authority = YES
Direct QUIESCE_CONNECT authority = YES
Direct CREATE_EXTERNAL_ROUTINE authority = YES
Direct SYSMON authority = NO
Indirect SYSADM authority = YES
Indirect SYSCTRL authority = NO
Indirect SYSMAINT authority = NO
Indirect DBADM authority = NO
Indirect CREATETAB authority = NO
Indirect BINDADD authority = NO
Indirect CONNECT authority = NO
Indirect CREATE_NOT_FENC authority = NO
Indirect IMPLICIT_SCHEMA authority = NO
Indirect LOAD authority = NO
Indirect QUIESCE_CONNECT authority = NO
Indirect CREATE_EXTERNAL_ROUTINE authority = NO
Indirect SYSMON authority = NO
“直接” 权限意味着此权限是明确授予此用户的。“间接” 权限意味着此用户属于具有此权限的组。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Enable root permissions with one click (quickly obtain root permissions) Enable root permissions with one click (quickly obtain root permissions) Jun 02, 2024 pm 05:32 PM

It allows users to perform more in-depth operations and customization of the system. Root permission is an administrator permission in the Android system. Obtaining root privileges usually requires a series of tedious steps, which may not be very friendly to ordinary users, however. By enabling root permissions with one click, this article will introduce a simple and effective method to help users easily obtain system permissions. Understand the importance and risks of root permissions and have greater freedom. Root permissions allow users to fully control the mobile phone system. Strengthen security controls, customize themes, and users can delete pre-installed applications. For example, accidentally deleting system files causing system crashes, excessive use of root privileges, and inadvertent installation of malware are also risky, however. Before using root privileges

How does Go language implement the addition, deletion, modification and query operations of the database? How does Go language implement the addition, deletion, modification and query operations of the database? Mar 27, 2024 pm 09:39 PM

Go language is an efficient, concise and easy-to-learn programming language. It is favored by developers because of its advantages in concurrent programming and network programming. In actual development, database operations are an indispensable part. This article will introduce how to use Go language to implement database addition, deletion, modification and query operations. In Go language, we usually use third-party libraries to operate databases, such as commonly used sql packages, gorm, etc. Here we take the sql package as an example to introduce how to implement the addition, deletion, modification and query operations of the database. Assume we are using a MySQL database.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

How does Hibernate implement polymorphic mapping? How does Hibernate implement polymorphic mapping? Apr 17, 2024 pm 12:09 PM

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

Introduction to how to set everyone permissions on win7 computer Introduction to how to set everyone permissions on win7 computer Mar 26, 2024 pm 04:11 PM

1. Take e-disk as an example. Open [Computer], and click [eDisk], right-click [Properties]. As shown in the figure: 2. In the [Window] page, switch the interface to the [Security] option, and click the [Edit] option below. As shown in the figure: 3. In the [Permissions] option, click the [Add] option. As shown in the figure: 4. The users and groups window pops up and click the [Advanced] option. As shown in the figure: 5. Click to expand the [Find Now] - [Everyone] options in order. When completed, click OK. As shown in the figure: 6. When you see that the user [everyone] has been added to [Group or User] on the [E Disk Permissions] page, select [everyone] and check the box in front of [Full Control]. After the setting is completed, Just press [OK]

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

An in-depth analysis of how HTML reads the database An in-depth analysis of how HTML reads the database Apr 09, 2024 pm 12:36 PM

HTML cannot read the database directly, but it can be achieved through JavaScript and AJAX. The steps include establishing a database connection, sending a query, processing the response, and updating the page. This article provides a practical example of using JavaScript, AJAX and PHP to read data from a MySQL database, showing how to dynamically display query results in an HTML page. This example uses XMLHttpRequest to establish a database connection, send a query and process the response, thereby filling data into page elements and realizing the function of HTML reading the database.

Analysis of the basic principles of MySQL database management system Analysis of the basic principles of MySQL database management system Mar 25, 2024 pm 12:42 PM

Analysis of the basic principles of the MySQL database management system MySQL is a commonly used relational database management system that uses structured query language (SQL) for data storage and management. This article will introduce the basic principles of the MySQL database management system, including database creation, data table design, data addition, deletion, modification, and other operations, and provide specific code examples. 1. Database Creation In MySQL, you first need to create a database instance to store data. The following code can create a file named "my

See all articles