oracle数据库建表(creatUser.sql)

创建表空间 指定表空间 为用户赋权限

select * from dba_data_files;
create tablespace "HFSG_DATA" datafile 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\HFSG.dbf' size 500M autoextend
 on next 100M maxsize unlimited logging extent management local segment space management auto;
create user "HFSG" profile "DEFAULT" identified by "HFSG" default tablespace "HFSG_DATA" account unlock;
grant "CONNECT" to "HFSG";
grant "RESOURCE" to "HFSG";
grant select any dictionary to "HFSG";
grant select any table to "HFSG";
grant unlimited tablespace to "HFSG";
grant dba to "HFSG";

注:创建用户一般分四步:

第一步:创建临时表空间

第二步:创建数据表空间

第三步:创建用户并制定表空间

第四步:给用户授予权限

posted on 2018-11-01 18:16  zouyh  阅读(502)  评论(0编辑  收藏  举报