oracle 创建表空间、用户、指定一般的权限

今天整公司的云服务器,有数据库、服务,下边介绍下数据库创建表空间语句

 1、创建临时表空间

create temporary tablespace abc_temp tempfile'/home/oracle/oradata/data_temp.dbf' 
size 1024m autoextend on next 100m maxsize 10240m extent management local;
1)data_temp 临时表空间名字
2)/home/oracle/oradata/abc 存放数据库文件的路径
3)1024m     表空间的初始大小
4)100m       表空间的自动增长大小
5)10240m     表空间最大的大小


2、创建数据表空间

create tablespace data logging datafile'/home/oracle/oradata/data.dbf' size 1024m 
autoextend on next 100m maxsize 10240m extent management local;

3、创建用户并指定表空间和一般权限

create user orcle  IDENTIFIED BY orcle
  default tablespace data
  temporary tablespace data_temp
  profile DEFAULT;
grant connect to orcle;
grant resource to orcle;
grant create any view to orcle;
grant drop any view to orcle;
grant unlimited tablespace to orcle;


发布了29 篇原创文章 · 获赞 6 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/u011592166/article/details/53096884