oracle创建数据库表空间,用户及表空间及分配权限

-- Create the tablespace
//创建临时表空间
create temporary tablespace test_temp
tempfile 'E:/oracle/product/10.2.0/oradata/testserver/test_temp01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;

//创建数据表空间
create tablespace test_data
logging
datafile 'E:/oracle/product/10.2.0/oradata/testserver/test_data01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;


-- Create the user
create user DB_PTSMS
  identified by ""
  default tablespace PTSMS
  temporary tablespace TEMP
  profile DEFAULT
  quota unlimited on ptsms;
-- Grant/Revoke role privileges
grant connect to DB_PTSMS;
grant exp_full_database to DB_PTSMS;
grant imp_full_database to DB_PTSMS;
grant resource to DB_PTSMS;
-- Grant/Revoke system privileges
grant create public synonym to DB_PTSMS;
grant create synonym to DB_PTSMS;
grant delete any table to DB_PTSMS;
grant insert any table to DB_PTSMS;
grant select any table to DB_PTSMS;
grant unlimited tablespace to DB_PTSMS;
grant update any table to DB_PTSMS;


猜你喜欢

转载自lanyan-lan.iteye.com/blog/1977651