千家信息网

Oracle conncect role vs create session

发表于:2024-11-19 作者:千家信息网编辑
千家信息网最后更新 2024年11月19日,Oracle conncect role vs create sessionThe CONNECT role was introduced with OracleDatabase version 7,
千家信息网最后更新 2024年11月19日Oracle conncect role vs create session

Oracle conncect role vs create session

The CONNECT role was introduced with OracleDatabase version 7, which added new and robust support for database roles. TheCONNECT role is used in sample code, applications, documentation, and technicalpapers. The CONNECT role was established with the following privileges :

Privileges Originally Associated with the CONNECT Role

Alter Session Create Session

Create Cluster Create Synonym

Create Database Link Create Table

Create Sequence Create View

However, beginning in Oracle Database 10gRelease 2 (10.2), the CONNECT role has only the CREATE SESSION privilege, allother privileges are removed.

DBA: 拥有全部特权,是系统最高权限,只有DBA才可以创建数据库结构。
RESOURCE:拥有Resource权限的用户只可以创建实体,不可以创建数据库结构。
CONNECT:拥有Connect权限的用户只可以登录数据库,不可以创建实体,不可以创建数据库结构。
对于普通用户:授予connect, resource权限。
对于DBA管理用户:授予connectresource, dba权限。

SQL> select * from role_sys_privs where ROLE = 'CONNECT';ROLE                           PRIVILEGE                                ADM------------------------------ ---------------------------------------- ---CONNECT                        CREATE SESSION                           NOSQL> select * from v$version;BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionPL/SQL Release 11.2.0.4.0 - ProductionCORE    11.2.0.4.0      ProductionTNS for Linux: Version 11.2.0.4.0 - ProductionNLSRTL Version 11.2.0.4.0 - Production




0