//创建临时表空间
create temporary tablespace NNDJ_CMS_temp
tempfile 'D:\oracledata\NNDJ_CMS_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
//创建数据表空间
create tablespace NNDJ_CMS
logging
datafile 'D:\oracledata\NNDJ_CMS.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
//创建用户并指定表空间
create user NNDJ_CMS identified by 123456
default tablespace NNDJ_CMS
temporary tablespace NNDJ_CMS_temp;
//给用户授予权限
grant connect,resource,dba to NNDJ_CMS;
//---------------------表空间删除操作-------------
--查找用户
select * from dba_users;
--查找工作空间的路径
select * from dba_data_files;
--删除用户
drop user 用户名称 cascade;
--删除表空间
drop tablespace 表空间名称 including contents and datafiles cascade constraint;
例如:删除用户名成为LYK,表空间名称为LYK
--删除用户,及级联关系也删除掉
drop user LYK cascade;
--删除表空间,及对应的表空间文件也删除掉
drop tablespace LYK including contents and datafiles cascade constraint;
oracle 表空间操作
最新推荐文章于 2023-10-19 11:31:50 发布