概述
-
第1步:创建临时表空间
create temporary tablespace pgenius_temp
tempfile '/data/oracle/oradata/orcl/pgenius_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
删除临时表空间:
drop tablespace pgenius_temp including contents and datafiles;
-
第2步:创建数据表空间
create tablespace pgenius
logging
datafile '/data/oracle/oradata/orcl/pgenius_0.dbf' size 1g autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_1.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_2.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_3.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_4.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_5.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_6.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_7.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_8.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_9.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_10.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_11.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_12.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_13.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_14.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_15.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_16.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_17.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_18.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_19.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_20.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
extent management local;
logging
datafile '/data/oracle/oradata/orcl/pgenius_0.dbf' size 1g autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_1.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_2.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_3.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_4.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_5.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_6.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_7.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_8.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_9.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_10.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_11.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_12.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_13.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_14.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_15.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_16.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_17.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_18.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_19.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
,'/data/oracle/oradata/orcl/pgenius_20.dbf' size 1m autoextend on next 1g maxsize UNLIMITED
extent management local;
删除表空间:
drop tablespace pgenius;//仅删除表空间 drop tablespace pgenius including contents and datafiles; //同时删除数据文件
-
第3步:创建用户并指定表空间
create user pgenius identified by "xxxxxx" default tablespace pgenius temporary tablespace pgenius_temp;
-
第4步:给用户授予权限
grant connect,resource,dba to pgenius;
转载于:https://www.cnblogs.com/champaign/p/7228865.html
最后
以上就是专注白云为你收集整理的Oracle11g创建表空间及用户的全部内容,希望文章能够帮你解决Oracle11g创建表空间及用户所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复