关于Oracle 12c中的用户 [英] Regarding Users in Oracle 12c

查看:85
本文介绍了关于Oracle 12c中的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在系统上安装了Oracle 12c数据库.我有一个需要访问数据库的应用程序.

I have installed an Oracle 12c database on my system. I had an application which need to access the database.

以前,在Oracle 11g中,我使用以下命令创建用户.

Previously in Oracle 11g, I used the following commands to create an user.

create user name identified by name;  
grant connect,create session,resource,create view to name;

有人可以告诉我如何根据我的上述要求在Oracle 12c中创建用户吗? 我使用以下语句,但是我的安装显示致命错误,提示

Can anyone tell me how to create a user in Oracle 12c with my above requirements? I used the following statements but my installation is showing a fatal error saying

FATAL ERROR - java.sql.SQLException: ORA-01950: no privileges on tablespace 'USERS'

以下是所使用的语句.

create user c##test1 identified by test1 container = ALL;
grant connect,create session,resource,create view to test1;

推荐答案

最佳实践是创建一个表空间并将其分配给用户.

Best Practice is to create a tablespace and assign that to the User.

只是为了更易于理解,对用户名和表空间使用相同的名称

Just to make it easier to understand use same name for username and tablespace

CREATE BIGFILE TABLESPACE C##1
DATAFILE '/path/to/datafile/C##1.dbf'
SIZE 10M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO NOLOGGING;

CREATE BIGFILE TABLESPACE C##1
DATAFILE '/path/to/datafile/C##1.dbf'
SIZE 10M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO NOLOGGING;

CREATE USER C##1
IDENTIFIED BY password DEFAULT TABLESPACE C##1
QUOTA UNLIMITED ON C##1;

CREATE USER C##1
IDENTIFIED BY password DEFAULT TABLESPACE C##1
QUOTA UNLIMITED ON C##1;

这篇关于关于Oracle 12c中的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆