首页 > 代码库 > ORACLE创建表空间,用户及授权

ORACLE创建表空间,用户及授权

 1 /*此处默认数据库实例为ORCL, 为ORCL创建一个永久性的表空间, 区定制分配, 段采用自动管理方式*/ 2 CREATE TABLESPACE ORCLTBS01 DATAFILE 3   D:\app\darkdog\oradata\ORCL\ORCLTBS01_1.DBF SIZE 50M; 4    5 /*为ORCL创建临时表空间*/ 6 CREATE TEMPORARY TABLESPACE ORCLTEMP01 TEMPFILE 7   D:\app\darkdog\oradata\ORCL\ORCLTEMP01_1.DBF SIZE 20M 8   EXTENT MANAGEMENT LOCAL UNIFORM SIZE 16M; 9   10 /*创建用户*/11 CREATE USER ddog IDENTIFIED BY &pass;12 13 /*修改用户默认表空间*/14 ALTER USER ddog DEFAULT TABLESPACE ORCLTBS0115 QUOTA UNLIMITED ON ORCLTBS01;16 17 /*修改用户默认临时表空间*/18 ALTER USER ddog TEMPORARY TABLESPACE ORCLTEMP01;19 20 /*授权*/21 GRANT CONNECT TO ddog;22 GRANT RESOURCE TO ddog;

 

ORACLE创建表空间,用户及授权