Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3354834
  • 博文数量: 1450
  • 博客积分: 11163
  • 博客等级: 上将
  • 技术积分: 11101
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-25 14:40
文章分类

全部博文(1450)

文章存档

2017年(5)

2014年(2)

2013年(3)

2012年(35)

2011年(39)

2010年(88)

2009年(395)

2008年(382)

2007年(241)

2006年(246)

2005年(14)

分类: Oracle

2006-05-30 13:19:44

0,首先要创建一个用户空间。即用户的所有操作都使用该空间。
create tablespace datafile "/opt/oracle/oradata/myspace.dbf" SIZE 7000M;
 
该语句的意思是创建一个7G大小的表空间,它的位置在/opt/oracle/oradat目录下,文件名为myspace.dbf.
 
1,创那新用户
create user cydba identified by cydbapwd defalut tablespace myspace;
 
这条sql语句的意思是创建军一个新用户,名子为cydba,指定它的密码为cydbapwd,它使用的默认表空间为myspace.
 
2,创建角色,它是用来控制各种资源的。
grant
create session, create any table, create any view ,create any index, create any procedure,
alter any table, alter any procedure,
drop any table, drop any view, drop any index, drop any procedure,
select any table, insert any table, update any table, delete any table,
to cyrole;
 
这条语句的意思是将各种权限授与cyrole这个角色。
 
3,将cyrole这个角色授与cydba,也就是说,使cydba这个用户可以管理和使用cyrole所拥有的资源。
grant cyrole to cydba;
 
到此为止,我们就为自己建立了一个新用户,它使用一个指定的空间,并且指明了他可以在这个表空间内做那些操作。:)
 
阅读(911) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~