如何在 oracle 12c 中的 tablespace 上授予用户 space 资源

How to grant user space resource on the tablespace in oracle 12c

我在oracle 12c标准版中创建了一个用户。

现在我尝试使用 sql 开发人员中的用户名和密码创建一个 table,但出现以下错误。

SQL Error: ORA-01950: no privileges on tablespace 'USERS'01950. 00000 -  "no privileges on tablespace '%s'"

它还显示了原因和操作如下:

Cause:    User does not have privileges to allocate an extent in the
       specified tablespace.
Action:   Grant the user the appropriate system privileges or grant the user
           space resource on the tablespace.

谁能帮我解决这个问题。我的用户名是 c##santh

您需要向用户授予 tablespace 的配额。 Tablespaces 是一种逻辑组织可用于存储数据的磁盘 space 的方法。通常我们会授予普通用户固定数量的 space,即使在 "storage is cheap" 的这些日子里也是如此。例如,此命令将允许他们在 USERS tablespace:

上使用 128 兆字节的存储空间
alter user c##santh quota 128M on users;

您改为使用 QUOTA UNLIMITED,这显然对用户可以抓取的数量没有限制 space。无限配额有利于应用程序所有者架构。