自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle數(shù)據(jù)庫(kù)中管理表空間和數(shù)據(jù)文件

數(shù)據(jù)庫(kù) Oracle
Oracle數(shù)據(jù)庫(kù)是個(gè)復(fù)雜的關(guān)系數(shù)據(jù)庫(kù)管理系統(tǒng),功能是相當(dāng)強(qiáng)大的,本文主要為大家介紹Oracle數(shù)據(jù)庫(kù)中管理表空間和數(shù)據(jù)文件。

Oracle數(shù)據(jù)庫(kù)中管理表空間和數(shù)據(jù)文件

數(shù)據(jù)庫(kù)的三大組成部分:數(shù)據(jù)文件,控制文件,Redo日志。

表空間分為系統(tǒng)表空間和非系統(tǒng)表空間。

SYSTEM表空間是最基本的,必須的,Oracle建議你為用戶數(shù)據(jù),用戶索引,Undo數(shù)據(jù)段,臨時(shí)數(shù)據(jù)段創(chuàng)建單獨(dú)的表空間。

管理員可以對(duì)表空間執(zhí)行以下管理操作:

1.新建表空間,調(diào)整數(shù)據(jù)文件大小,添加數(shù)據(jù)文件到表空間。

2.設(shè)置和修改缺省的數(shù)據(jù)段存儲(chǔ)設(shè)置。

3.使表空間變?yōu)橹蛔x或讀寫(xiě)狀態(tài)。

4.設(shè)置表空間為臨時(shí)或永久。

5.刪除表空間。

創(chuàng)建表空間的命令:

SQL> create tablespace userdat datafile '/home/oracle/oradata/userdat01.dbf' size 10m autoextend on next 1m maxsize 20m;

Tablespace created.

表空間中的extents可以由數(shù)據(jù)字典表或位圖進(jìn)行管理,創(chuàng)建表空間時(shí)可以選擇:

本地管理表空間:extent management local

字典管理表空間:extent management dictionary

Undo表空間:

僅用于存儲(chǔ)undo數(shù)據(jù)段,extent只能采用本地管理。

Temp表空間:

僅用于排序操作,不包含任何永久對(duì)象,extent推薦采用本地管理。

以下命令用于指定系統(tǒng)的缺省臨時(shí)表空間:

SQL> alter database default temporary tablespace temp;

表空間離線:

離線的表空間無(wú)法訪問(wèn),用于數(shù)據(jù)維護(hù)。

system表空間,有活動(dòng)undo段的表空間和缺省的臨時(shí)表空間不能置于離線狀態(tài)。

操作命令:

SQL> alter tablespace users offline;

Tablespace altered.

SQL> alter tablespace users online;

Tablespace altered.

 

 

將表空間置為只讀模式和讀寫(xiě)模式:

SQL> alter tablespace users read only;

Tablespace altered.

SQL> alter tablespace users read write;

Tablespace altered.

刪除表空間:

SQL> drop tablespace userdat including contents and datafiles;

Tablespace dropped.

手工改變數(shù)據(jù)文件的大?。?/strong>

SQL> alter database datafile '/home/oracle/oradata/gldb/users01.dbf' resize 20m;

Database altered.

添加數(shù)據(jù)文件到表空間:

SQL> alter tablespace users add datafile '/home/oracle/oradata/gldb/users02.dbf' size 1m;

Tablespace altered.

設(shè)置表空間數(shù)據(jù)文件的缺省位置:

SQL> alter system set db_create_file_dest = '/home/oracle/oradata/gldb';

System altered.

SQL> create tablespace userdat2 datafile size 2m;

Tablespace created.

[oracle@redhatoracle gldb]$ pwd

/home/oracle/oradata/gldb

[oracle@redhatoracle gldb]$ ls -l | grep userdat2

-rw-r----- 1 oracle oinstall 2105344 Dec 16 06:53 o1_mf_userdat2_2r69vob3_.dbf

獲得表空間和數(shù)據(jù)文件信息:

SQL> select * from v$tablespace;

SQL> select * from v$datafile;
 

關(guān)于Oracle數(shù)據(jù)庫(kù)中管理表空間和數(shù)據(jù)文件的知識(shí)就為大家介紹到這,如果大家有更好的文章,歡迎大家拿出來(lái)與大家一起分享。

【編輯推薦】

  1. 全面解析Oracle數(shù)據(jù)庫(kù)中管理實(shí)例的方法
  2. SQL數(shù)據(jù)庫(kù)超級(jí)管理員賬號(hào)防護(hù)知識(shí)
  3. 如何將Oracle數(shù)據(jù)庫(kù)的普通表轉(zhuǎn)換成分區(qū)表
責(zé)任編輯:迎迎 來(lái)源: 天極網(wǎng)
相關(guān)推薦

2011-06-27 13:19:36

OMF托管文件ASM

2009-06-05 11:55:00

數(shù)據(jù)庫(kù)用戶管理數(shù)據(jù)導(dǎo)入導(dǎo)出

2011-08-29 17:00:47

Oracle數(shù)據(jù)庫(kù)RM表空間數(shù)據(jù)塊介質(zhì)

2010-05-06 09:42:28

Oracle表空間

2011-05-17 11:33:43

oracle數(shù)據(jù)庫(kù)

2011-08-29 16:41:14

OracleRMAN恢復(fù)數(shù)據(jù)文件的恢復(fù)

2010-04-21 11:43:33

Oracle數(shù)據(jù)庫(kù)

2011-08-05 12:44:57

Oracle數(shù)據(jù)庫(kù)表空間

2010-03-24 09:42:12

Oracle數(shù)據(jù)庫(kù)

2010-05-04 11:02:44

Oracle數(shù)據(jù)庫(kù)

2009-07-02 00:26:00

臨時(shí)表空間Oracle數(shù)據(jù)庫(kù)性能

2009-05-14 13:36:11

Oracle表空間優(yōu)化

2011-08-09 18:40:21

Oracle控制文件重做日志文件

2010-04-23 09:32:39

Oracle數(shù)據(jù)庫(kù)實(shí)例

2020-12-10 09:41:15

ZabbixOracle數(shù)據(jù)庫(kù)

2011-08-23 11:09:36

Oraclerman恢復(fù)system表空間恢復(fù)

2009-02-01 10:29:04

Oracle數(shù)據(jù)庫(kù)管理

2017-09-06 14:58:57

Oracle數(shù)據(jù)文件臨時(shí)文件

2010-04-23 12:39:02

Oracle7.X 回

2010-04-30 16:01:17

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)