Oracle数据库初始化配置语句

1.创建数据表空间

CREATE TABLESPACE "MSGC" DATAFILE 
  '/u02/oradata/msgc.dbf' SIZE 21474836480
  AUTOEXTEND ON NEXT 104857600 MAXSIZE 32767M
  LOGGING ONLINE PERMANENT BLOCKSIZE 8192
  EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;

2.创建临时表空间

--暂时未用到
create temporary tablespace temp 
tempfile '/u02/oradata/temp.dbf' 
size 50m 
autoextend on 
next 50m maxsize 20480m 
extent management local; 

3.创建用户

create user citymsgc identified by "msgc78_+sj" 
default tablespace msgc
temporary tablespace temp; 

4.用户授权

--基本权限即可(没有设置dba)
--一般用户角色下,不建议使用with admin option
--grant connect,resource to username; 
-- Grant/Revoke role privileges 
grant connect to city_fy with admin option;
grant resource to city_fy with admin option;
-- Grant/Revoke system privileges 
grant debug any procedure to city_fy with admin option;
grant debug connect session to city_fy with admin option;
grant unlimited tablespace to city_fy with admin option;

你可能感兴趣的:(Oracle,oracle,数据库)