orcal创建表空间
1创建表空间
create tablespace gtis_bl
datafile ‘D:\NJGT.Proj\Oracle\gtis_file\gtis_bl_tx.DBF’
size 1024m
autoextend on;
2查看创建的表空间
select default_tablespace,temporary_tablespace,d.username from dba_users d
3创建用户
create user gtis
identified by gtis
default tablespace gtis_bl
temporary tablespace temp;
4.授予权限
grant create session to zhangsan;//授予zhangsan用户创建session的权限,即登陆权限,允许用户登录数据库
grant unlimited tablespace to zhangsan;//授予zhangsan用户使用表空间的权限
grant create table to zhangsan;//授予创建表的权限
grant drop table to zhangsan;//授予删除表的权限
grant insert table to zhangsan;//插入表的权限
grant update table to zhangsan;//修改表的权限
grant all to public;//这条比较重要,授予所有权限(all)给所有用户(public)
5.赋予所有权限(可以省略掉第四步直接第五步)
GRANT “CONNECT” TO pf_gtis_cs;
GRANT RESOURCE TO pf_gtis_cs;
GRANT DBA TO pf_gtis_cs;
GRANT “JAVASYSPRIV” TO pf_gtis_cs;
GRANT “JAVAUSERPRIV” TO pf_gtis_cs;
GRANT CREATE VIEW TO pf_gtis_cs;
6.导入文件
imp 用户/密码 file=文件路径 full=y ignore=y;