北京优技教育科技有限公司

Oracle认证 OCP认证 OCM认证

当前位置: 优技教育 >> ocm教程 >

OCM培训课程-Server config 之管理表空间

OCM培训课程-Server config 之管理表空间

来源:优技教育    更新时间:2016/6/21 17:53:57    阅读次数:3127

OCM培训课程-Server config 之管理表空间

OCM考试大纲针对表空间的要求:

* Create and manage temporary, permanent, and undo tablespaces

* Create and manage bigfile tablespaces

这个环节的考点是要求熟练掌握表空间管理的语句,最好是记熟,到时查联机文档,时间可能会很紧张。

1、创建普通表空间

sql> create tablespace ts1 datafile ‘$ORACLE_BASE/oradata/orcl/datafile/ts1.dbf’ size 100m

autoextend on next 10m maxsize 200m extent management local uniform size 128k

space segment space management auto;

-- extent management local、space segment space management auto是默认的。

2、创建undo表空间

sql> create undo tablespace undo_ts2 datafile 'u01/app/oracle/oradata/orcl/datafile/undo_ts2.dbf' size 100m autoextend on next 10m maxsize 200m;

3、创建临时表空间

sql> CREATE TEMPORARY TABLESPACE temp2 TEMPFILE'u01/app/oracle/oradata/orcl/datafile/temp02.dbf'

SIZE 50M autoextend on next 10m maxsize 200m;

4、创建临时表空间组

alter tablespace temp1 tablespace group temp_grp;

alter tablespace temp2 tablespace group temp_grp;

查看数据库当前默认临时表空间:

select property_name,property_value from database_properties where property_name like '%TEMP%'

-------------------------------------------------------------------------------------------

DEFAULT_TEMP_TABLESPACE TEMP

修改数据库默认临时表空间:

alter database default temporary tablespace temp2;

只修改某用户的默认临时表空间:

alter user u1 temporary tablespace temp;

5、创建bigfile表空间

create bigfile tablespace bigts datafile '/u01/app/oracle/oradata/orcl/datafile/bigts.dbf' size 50G;

6、修改datafile大小

sql> alter database datafile ''u01/app/oracle/oradata/orcl/datafile/ts1.dbf' resize 500m;

7、重命名datafile

sql> alter tablespace datafile '''u01/app/oracle/oradata/orcl/datafile/ts1.dbf' to '''u01/app/oracle/oradata/orcl/datafile/ts1_new.dbf' ; 或

sql> alter database file '''u01/app/oracle/oradata/orcl/datafile/ts1.dbf' to '''u01/app/oracle/oradata/orcl/datafile/ts1_new.dbf' ;

OCA认证
OCP费用
OCP教程
OCP考试
OCM费用
OCM教程
OCM考试
ORACLE授权认证机构CUUG
CUUG与ORACLE合作15年,是ORACLE金牌合作伙伴,连续多年处于行业领先;
CUUG与工信部人才交流中心合作,是工信人才指定的PostgreSQL数据库培训合作伙伴;
CUUG与阿里云、腾讯云、人大金仓、奥星贝斯等众多数据库厂商合作,开设数据库认证与培训课程;
CUUG与企业合作提供人才输送、定制化培训、技术支持服务;

报名入口 点击进入

北京优技教育科技有限公司

联系电话:010-59426307

课程咨询:010-59426319

联系地址:海淀区紫竹院路88号