oracle创建用户过程,Oracle用户创建过程

对于Oracle用户创建过程,估计大家在熟悉不过了,无论是自己练习玩,还是工作用,都免不了做这步,有的人已经熟练的记住了,有的人还是喜欢复制粘贴,把创建用户的脚本存在记事本里,直接拿来用。但是这种脚本太简单,所以最容易被弄丢了。

关键时刻找不到,又没记住。烦了吧!所以最好记住,忘了就看看这里!

第一步:创建表空间

create tablespace ICB datafile 'D:\oracle\product\10.2.0\oradata\icb\icb.dbf' size 2048M

autoextend on next 256M maxsize unlimited logging extent management local autoallocate segment space management auto;

alter tablespace ICB add datafile 'D:\oracle\product\10.2.0\oradata\icb\icb01.dbf' size  2048M autoextend on next 256M;

注意:“maxsize unlimited logging extent management local autoallocate segment space management auto” 这段可以根据需要可不加;

“alter tablespace ICB add datafile 'D:\oracle\product\10.2.0\oradata\icb\icb01.dbf' size  2048M autoextend on next 256M" 不需要可不加。

第二步:创建用户

create user test

identified by "test"

default tablespace ICB

temporary tablespace TEMP

profile DEFAULT

quota unlimited on system

quota unlimited on test

quota unlimited on users;

第三步:授权

-- Grant/Revoke role privileges

grant connect to test with admin option;

grant resource to test with admin option;

-- Grant/Revoke system privileges

grant create any table to test;

grant create any view to test;

grant create table to test with admin option;

grant select any table to test;

grant unlimited tablespace to test with admin option;

注意:权限根据需要自己来设置。

最后:就是退出

exit;

总结:oracle用户的创建一共就三个步骤,

1)创建表空间(如果表空间已存在,则可以不做这步)

2)创建用户

3)授权

参考阅读:

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值