/* Oracle创建表空间和用户的步骤 */
-- 第1步:创建临时表空间
create temporary tablespace yh_tycp_temp
tempfile 'D:\WorkProgfile\oracle\10.2.0\oradata\ecom\yh_tycp_temp.dbf'
size 50m
autoextend on
next 50m maxsize 1024m
extent management local;
--第2步:创建数据表空间
create tablespace yh_tycp_data
logging
datafile 'D:\WorkProgfile\oracle\10.2.0\oradata\ecom\yh_tycp_data.dbf'
size 50m
autoextend on
next 50m maxsize 10240m
extent management local;
--第3步:创建用户并指定表空间
create user tycp_deve identified by tycp_deve
default tablespace yh_tycp_data
temporary tablespace yh_tycp_temp;
--第4步:给用户授予权限
grant connect,resource to tycp_deve;
----------------------------------------
/* Oracle删除表空间和用户的步骤 */
--第1步:删除用户
drop user tycp_deve cascade;
--第2步:删除临时表空间
drop tablespace yh_tycp_temp including contents and datafiles;
--第3步:删除表空间
drop tablespace yh_tycp_data including contents and datafiles;
-- 第1步:创建临时表空间
create temporary tablespace yh_tycp_temp
tempfile 'D:\WorkProgfile\oracle\10.2.0\oradata\ecom\yh_tycp_temp.dbf'
size 50m
autoextend on
next 50m maxsize 1024m
extent management local;
--第2步:创建数据表空间
create tablespace yh_tycp_data
logging
datafile 'D:\WorkProgfile\oracle\10.2.0\oradata\ecom\yh_tycp_data.dbf'
size 50m
autoextend on
next 50m maxsize 10240m
extent management local;
--第3步:创建用户并指定表空间
create user tycp_deve identified by tycp_deve
default tablespace yh_tycp_data
temporary tablespace yh_tycp_temp;
--第4步:给用户授予权限
grant connect,resource to tycp_deve;
----------------------------------------
/* Oracle删除表空间和用户的步骤 */
--第1步:删除用户
drop user tycp_deve cascade;
--第2步:删除临时表空间
drop tablespace yh_tycp_temp including contents and datafiles;
--第3步:删除表空间
drop tablespace yh_tycp_data including contents and datafiles;