创建用户

一、创建用户

只有dba权限的用户才可以创建用户:

create user username

identified {by password|EXTERNALLY|GLOBALLY AS external name}

[default tablespace tablespace_name]

[temporary tablespace tablespace_name]

[quota{正整数 [K|M]} on tablespace_name]

[quota{正整数[K|M]} on tablespace_name]

[password expire]

[a、ccount{lock|unlock}]

[profile{概要文件|default}]

创建用户时一定要指定默认表空间和默认临时表空间。这样在创建数据库对象时默认存储在默认表空间中。如果不设置默认表空间,在创建db对象时忘记指定表空间后,创建的db对象

会存储在system表空间中。这样会严重冲击数据库的性能。

在表空间上给用户分配配额可以防止因用户错误的操作占用过多的磁盘空间

查看用户在表空间上的配额的视图是dba_ts_quotas

查看用户的视图是dba_users

二、创建概要文件

create profile profile_name limit

  {资源限制参数}

  {口令限制参数}

ex:

create profile profile_name limit

  failed_login_attempts 8

  password_life_time 90

  password_lock_time unlimited

  password_reuse_time 28

  password_grace_time 7

  sessions_per_user 3

  cpu_per_session 16800

  logical_reads_per_session 23688

  connect_time 180

  idle_time 28;

三、将概要文件赋予给用户

alter user username profile profile_name;

 

posted on 2014-09-22 20:30 moonfans 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/moonfans/p/3986677.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值