成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

關于表空間offline小知識點

1、表空間offline的原因
Taking Tablespaces Offline
Taking a tablespace offline makes it unavailable for normal access.

You may want to take a tablespace offline for any of the following reasons:

To make a portion of the database unavailable while allowing normal access to the remainder of the database

To perform an offline tablespace backup (even though a tablespace can be backed up while online and in use)

To make an application and its group of tables temporarily unavailable while updating or maintaining the application

To rename or relocate tablespace data files  ##上次文檔就是因為要重命名數(shù)據(jù)文件offline了表空間
實驗1
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            +DATADG/arch
Oldest online log sequence     266
Next log sequence to archive   268
Current log sequence           268
SQL> 

SQL> alter tablespace users offline ;  ##默認使用normal參數(shù)
Tablespace altered.

SQL> alter system switch logfile;
System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> 
SQL> startup
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1006636072 bytes
Database Buffers          637534208 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL> 
SQL> alter tablespace users online;
Tablespace altered.

SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINE
UNDOTBS2                       ONLINE
6 rows selected.

SQL> 
實驗2
SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            +DATADG/arch
Oldest online log sequence     267
Next log sequence to archive   269
Current log sequence           269
SQL> alter tablespace users offline immediate;  ##參數(shù)immediate

Tablespace altered.

SQL> alter system switch logfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1653518336 bytes
Fixed Size                  2253784 bytes
Variable Size            1006636072 bytes
Database Buffers          637534208 bytes
Redo Buffers                7094272 bytes
Database mounted.
Database opened.
SQL> alter tablespace users online;
alter tablespace users online
*
ERROR at line 1:
ORA-01113: file 4 needs media recovery
ORA-01110: data file 4: '+DATADG/orcl/datafile/users.259.954803993'

SQL> recover tablespace users;
Media recovery complete.
SQL> alter tablespace users online;

Tablespace altered.

SQL> select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINE
UNDOTBS2                       ONLINE

6 rows selected.

SQL> 

小結:
默認offline表空間執(zhí)行一致性檢查點,使用normal參數(shù)來offline表空間。
如果使用immediate參數(shù)offline表空間需要進行recover操作。大家可以看實驗過程了解。

十年建站經驗, 做網站、網站制作客戶的見證與正確選擇。創(chuàng)新互聯(lián)提供完善的營銷型網頁建站明細報價表。后期開發(fā)更加便捷高效,我們致力于追求更美、更快、更規(guī)范。

新聞標題:關于表空間offline小知識點
鏈接分享:http://jinyejixie.com/article44/iihgee.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供面包屑導航、定制開發(fā)、網站制作、微信公眾號、App開發(fā)、企業(yè)網站制作

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)
红桥区| 广丰县| 临邑县| 新津县| 夏津县| 甘肃省| 陆良县| 宁波市| 黎城县| 旺苍县| 南城县| 汾西县| 贵定县| 乌兰浩特市| 方城县| 印江| 西宁市| 梁平县| 南京市| 宜宾市| 鄂托克前旗| 疏附县| 依安县| 九龙坡区| 台东市| 天镇县| 二连浩特市| 阳信县| 华安县| 桐庐县| 昆山市| 定兴县| 阿荣旗| 萨迦县| 盐边县| 永善县| 瑞金市| 澳门| 沾化县| 玉林市| 伊金霍洛旗|