Home Database Mysql Tutorial oralce数据库的用户全介绍

oralce数据库的用户全介绍

Jun 07, 2016 pm 03:10 PM
oracle introduce database user Enter

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 ORACLE数据库是个多用户系统。为了保证数据库系统的安全,ORACLE数据库管理系统配制了良好的安全机制。例如,每一个ORACLE数据库都有一个用户表,它记载着每一个用户的有关信息,一旦用户进入系统,

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入

  ORACLE数据库是个多用户系统。为了保证数据库系统的安全,ORACLE数据库管理系统配制了良好的安全机制。例如,每一个ORACLE数据库都有一个用户表,它记载着每一个用户的有关信息,一旦用户进入系统,ORACLE系统会通过这张表来检查用户的合法性。又如,ORACLE系统通过合理分配用户的权限来管理用户。通常,ORACLE将用户分为三类,即DBA、RESOUCE和CONNECT三类角色,使不同的用户的权限各不相同。

  在创建数据库时,系统自动建立了两个用户,即SYS和SYSTEM用户,且授给这两个用户DB权限,由于DBA具有最高权限,建议将它们的口令及时修改,以免个别用户以DBA角色进入系统,有意无意地给系统造成损害。

  除了SYS、SYSTEM用户外,其余用户都要一一建立,建立用户的方法如下:

  假设要建的用户名为RSXT,口令为RSPASS;默认的表空间为USER,临时表空间为TEMP,表空间限额为3M,其余默认,则可用下面方法创建新用户:

  1. SQLDBA>CREATE USER RSXT IDENTIFIED BY RSPASS

  2. DEFAULT TABLESPACE USER

  3. TEMPORARY TABLESPACE TEMP

  4. QUOTA 3M ON USER;

  请注意,该用户建立后,还要及时授权,否则像上述刚刚建成的用户,则一无所为,甚至都不能连接数据库。对一般用户,通常授予CONNECT和RESOURCE角色权限,命令如下:

  SQLDBA>GRANT CONNECT,RESOURCE TO RSXT;

  对于一个有着许多用户的数据库系统,我们可以通过下述方法来了解数据库的用户情况。

  1.对于非DBA用户

  对于非DBA用户,有两条命令,即:

  (1)SQL>SELECT*FROM ALL-USERS;

  (2)SQL>SELECT*FROM USER-USERS;

  其中,从USER-USERS表中,可以了解到该用户的默认表空间和临时表空间等信息。

  2.对于DBA用户

  对于DBA用户,有三条命令,即:

  (1)SQLDBA>SELECT*FROM ALL-USERS;

  (2)SQLDBA>SELECT*FROM USER-USERS;

  (3)SQLDBA>SELECT*FROM DBA-USERS;

  其中,从DBA-USERS中,可以了解到所有用户的详细信息,因而该命令对于数据库管理员来说是很有用的。

  关于非DBA用户的信息

  由于DBA用户具有最高权限,为安全起见,只有Oracle系统管理员才授予DBA权限,大多数用户均为非DBA用户。尽管相应的权限少了,但是从ORACLE数据字典中,还是可以得到 很多关于非DBA用户的有用信息。

  我们可以采用下述方法来了解有关非DBA用户的信息。

  1.SQL>SELECT*FROM USER-USERS;

  可以查看该用户的默认表空间,临时表空间和用户创建时间。

  2.SQL>SELECT*FROM USER-TABLES;

  可以查看该用户创建的所有表的详细信息,由于列名较多,一屏看不了几个表。

  如果仅仅想查看用户所建表的表名,可以用下面的命令:

  SQL>SELECT TABLE-NAME FROM USER-TABLES;

  3.SQL〉SELECT*FROM USER-VIEWS;

  可以查看该用户所创建的视图,包括创建视图的文本。

  同样,如果仅仅想查看用户所建视图的视图名,可以用下面的命令:

  SQL>SELECT VIEW-NAME FROM USER-VIEWS;

  4.SQL>SELECT*FROM USER-TABLESPACES;

  可以查看该用户可存取的表空间的信息。

  5.SQL>SELECT TABLESPACE-NAME,SUM(BYTES),SUM(BLOCKS)

  FROM USER-FREE-SPACE GROUP BY TABLESPACE-NAME;

  可以查看该用户可存取的表空间的剩余空间。

  6.SQL>SELECT *FROM USER-TS-QUOTAS;

  可以查看该用户的表空间的份额。

  7.SQL>SELECT *FROM USER-ROLE-PRIVS;

  可以查看该用户被授予的角色。

  8.SQL>SELECT *FROM USER-SYS-PRIVS;

  可以查看该用户的系统权限及能否再授予其它用户的权限。

  9.SQL>SELECT *FROM USER-TAB-PRIVS-RECD;

  可以查看该用户能访问其它用户的表、视图等的对象权限。

  10.SQL>SELECT *FROM USER-TAB-PRIVS-MADE;

  可以查看该用户授予其它用户的表、视图等的对象权限。

oralce数据库的用户全介绍

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

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 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)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

Oracle scheduled tasks execute the creation step once a day Oracle scheduled tasks execute the creation step once a day May 10, 2024 am 03:03 AM

To create a scheduled task in Oracle that executes once a day, you need to perform the following three steps: Create a job. Add a subjob to the job and set its schedule expression to "INTERVAL 1 DAY". Enable the job.

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

Detailed introduction of Samsung S24ai functions Detailed introduction of Samsung S24ai functions Jun 24, 2024 am 11:18 AM

2024 is the first year of AI mobile phones. More and more mobile phones integrate multiple AI functions. Empowered by AI smart technology, our mobile phones can be used more efficiently and conveniently. Recently, the Galaxy S24 series released at the beginning of the year has once again improved its generative AI experience. Let’s take a look at the detailed function introduction below. 1. Generative AI deeply empowers Samsung Galaxy S24 series, which is empowered by Galaxy AI and brings many intelligent applications. These functions are deeply integrated with Samsung One UI6.1, allowing users to have a convenient intelligent experience at any time, significantly improving the performance of mobile phones. Efficiency and convenience of use. The instant search function pioneered by the Galaxy S24 series is one of the highlights. Users only need to press and hold

How to start the listening program in oracle How to start the listening program in oracle May 10, 2024 am 03:12 AM

Oracle listeners are used to manage client connection requests. Startup steps include: Log in to the Oracle instance. Find the listener configuration. Use the lsnrctl start command to start the listener. Use the lsnrctl status command to verify startup.

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())

See all articles