Oracle表空间和数据文件

WBOY
풀어 주다: 2016-06-07 17:26:52
원래의
1051명이 탐색했습니다.

Oracle创建表空间 1.创建普通表空间create tablespace oracle_tablespacedatafile

Oracle创建表空间

1.创建普通表空间
create tablespace oracle_tablespace
datafile '/home/oracle/oradata/orcl/oracle_tablespace.dbf'
size 100m
autoextend on next 10M maxsize 200M
extent management local
uniform size 1m;

2.创建undo表空间
CREATE undo tablespace undo_oracle
datafile '/home/oracle/oradata/orcl/undo_oracle.dbf'
size 50m
extent management local;

3.创建temporary表空间
CREATE temporary tablespace temporary_oracle
tempfile '/home/oracle/oradata/orcl/temporary_oracle.dbf'
size 50m
autoextend on next 10M maxsize 100M
extent management local
uniform size 1m;

 


扩展表空间

1.扩展数据表空间

alter tablespace oracle_tablespace add datafile '/home/oracle/oradata/orcl/oracle_tablespace1.dbf' size 100M;

2.扩展undo表空间

alter tablespace oracle_tablespace add datafile '/home/oracle/oradata/orcl/undo_tablespace1.dbf' size 100M;

3.扩展temporary表空间

alter tablespace oracle_tablespace add tempfile '/home/oracle/oradata/orcl/temporary_tablespace1.dbf' size 100M;


删除表空间

--删除空的表空间,但是不包含物理文件
drop tablespace tablespace_name;
--删除非空表空间,但是不包含物理文件
drop tablespace tablespace_name including contents;
--删除空表空间,包含物理文件
drop tablespace tablespace_name including datafiles;
--删除非空表空间,包含物理文件
drop tablespace tablespace_name including contents and datafiles;
--如果其他表空间中的表有外键等约束关联到了本表空间中的表的字段,,就要加上CASCADE CONSTRAINTS
drop tablespace tablespace_name including contents and datafiles CASCADE CONSTRAINTS;

linux

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
최신 이슈
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!