Home  >  Article  >  Database  >  Oracle用户创建过程

Oracle用户创建过程

WBOY
WBOYOriginal
2016-06-07 17:33:38960browse

对于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)授权

参考阅读:

Oracle教程:用户管理的备份

Oracle基础教程之通过RMAN复制数据库

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn