修改資料表空間(修改資料檔案的自動擴充性),資料擴充性

來源:互聯網
上載者:User

修改資料表空間(修改資料檔案的自動擴充性),資料擴充性
修改資料表空間(修改資料檔案的自動擴充性)
    在建立資料表空間時,可以設定資料檔案的自動擴充性。在為資料表空間增加新的資料檔案時,也

可以設定新資料檔案的自動擴充性。而對於已建立的資料表空間中的已有的資料檔案,則可以使用

alter database語句修改其自動擴充性,其文法如下:
alter database datafile file_name autoextend off|on[next number K|M maxsize 

unlimited|number K|M]
修改資料表空間中資料檔案的狀態
    資料檔案的狀態主要有三種,onlne,offline和offline drop。設定資料檔案狀態的文法

如下:
alter database datafile file_name online|offline|offline drop
     其中,online表示聯機狀態,此時資料檔案可以使用,offline表示離線狀態,此時資料

檔案不可使用,用於資料庫運行在歸檔模式下的情況,offline drop則會刪除資料檔案,與

offline一樣用於設定資料檔案不可用,但它用於資料庫運行在非歸檔模式下的情況。
     將資料檔案設定為offline狀態時,不會影響到資料表空間的狀態,但是將資料表空間設定為

offline狀態時,屬於該資料表空間的所有的資料檔案將都被ushezhi為offline狀態。
具體的操作如下:
SQL> alter database datafile'f:\\oracledata\myspace2.dbf'
  2  autoextend on
  3  next 5m maxsize 50m;
資料庫已更改。 
SQL> alter database datafile'f:\\oracledata\myspace2.dbf' offline; 
SQL> alter database datafile'f:\\oracledata\myspace2.dbf' online;


   

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.