我正在搜索如何创建一个用户并授予他所有的权限。
我发现这两种方法:
第一种方法:
- create user userName identified by password;
- grant connect to userName;
- grant all privileges to userName;
第二种方法:
- grant connect,resource to userName identified by password;
那么这两种方法有什么区别呢?
有两个区别:
- create user userName identified by password;
- grant connect to userName;
和
- grant connect to userName identified by password;
做完全一样它创建一个用户并授予他连接角色。
不同的结果
资源是oracle中的一个角色,它使您有权创建对象(表,过程,而不是视图!)。所有专有权授予更多的系统权限。
- grant all privileges to userName identified by password;