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";
注:创建用户一般分四步:
第一步:创建临时表空间
第二步:创建数据表空间
第三步:创建用户并制定表空间
第四步:给用户授予权限