在Oracle中创建具有所有特权的用户 [英] Create a user with all privileges in Oracle

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

问题描述

我正在搜索如何创建用户并授予他所有特权.

I was googling about how to create a user and grant all privileges to him.

我发现了这两种方法:

第一种方法:

create user userName identified by password;
grant connect to userName;
grant all privileges to userName;

第二种方法:

grant connect , resource to userName identified by password;

那两种方法有什么区别?

So what's the difference between those two methods ?

推荐答案

有2个区别:

2种创建用户并向其授予特权的方法

create user userName identified by password;
grant connect to userName;

grant connect to userName identified by password;

做的完全一样.它会创建一个用户并授予他连接角色.

do exactly the same. It creates a user and grants him the connect role.

不同的结果

resource是oracle中的角色,它使您有权创建对象(表,过程,还有更多但没有视图!).所有特权都授予更多的系统特权.

resource is a role in oracle, which gives you the right to create objects (tables, procedures, some more but no views!). ALL PRIVILEGES grants a lot more of system privileges.

要授予用户所有权限,请先运行您的摘要或

To grant a user all privileges run you first snippet or

grant all privileges to userName identified by password;

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

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