【Datafile】Oracle單個datafile大小的限制
最近在維護資料庫空間,給tablespace新增datafile的時候,由於達到了資料庫最大datafile的個數,所以不能再新增。而我們的單個datafile的大小為2G,所以我就在想,單個datafile的大小限制到底是多少,我們可以相應擴大單個datafile的大小,以減少datafile的個數。
在網上參考了很多專業人士的技術文件,也做了相應的測試,現在記錄如下:
1、建立普通tablespace時,報錯
SYS@MTH> create tablespace TEST
2 datafile '/oradat/MTH/TEST01.dbf' size 2000M
3 autoextend on next 10M maxsize 50000M
4 extent management local
5 segment space management auto;
create tablespace TEST
*
ERROR at line 1:
ORA-03206: maximum file size of (6400000) blocks in AUTOEXTEND clause is out of range
2、Oracle官方相關限制設定
Item |
Type of Limit |
Limit Value |
Database Block Size |
Minimum |
2048 bytes; must be a multiple of operating system physical block size |
Database Block Size |
Maximum |
Operating system dependent; never more than 32 KB |
Database Blocks |
Minimum in initial extent of a segment |
2 blocks |
Database Blocks |
Maximum per datafile |
Platform dependent; typically 2^22 - 1 blocks |
Controlfiles |
Number of control files |
1 minimum; 2 or more (on separate devices) strongly recommended |
Controlfiles |
Size of a control file |
Dependent on operating system and database creation options; maximum of 25,000 x (database block size) |
Database files |
Maximum per tablespace |
Operating system dependent; usually 1022 |
Database files |
Maximum per database |
65533 May be less on some operating systems Limited also by size of database blocks and by the DB_FILES initialization parameter for a particular instance |
Database extents |
Maximum per dictionary managed tablespace |
4 GB * physical block size (with K/M modifier); 4 GB (without K/M modifier) |
Database extents |
Maximum per locally managed (uniform) tablespace |
2 GB * physical block size (with K/M modifier); 2 GB (without K/M modifier) |
Database file size |
Maximum |
Operating system dependent. Limited by maximum operating system file size; typically 2^22 or 4 MB blocks |
MAXEXTENTS |
Default value |
Derived from tablespace default storage or DB_BLOCK_SIZE initialization parameter |
MAXEXTENTS |
Maximum |
Unlimited |
Redo Log Files |
Maximum number of logfiles |
Limited by value of MAXLOGFILES parameter in the CREATE DATABASE statement Control file can be resized to allow more entries; ultimately an operating system limit |
Redo Log Files |
Maximum number of logfiles per group |
Unlimited |
Redo Log File Size |
Minimum size |
4 MB |
Redo Log File Size |
Maximum Size |
Operating system limit; typically 2 GB |
Tablespaces |
Maximum number per database |
64 K Number of tablespaces cannot exceed the number of database files because each tablespace must include at least one file |
Bigfile Tablespaces |
Number of blocks |
A bigfile tablespace contains only one datafile or tempfile, which can contain up to approximately 4 billion ( 2^32 ) blocks. The maximum size of the single datafile or tempfile is 128 terabytes (TB) for a tablespace with 32 K blocks and 32 TB for a tablespace with 8 K blocks. |
Smallfile (traditional) Tablespaces |
Number of blocks |
A smallfile tablespace is a traditional Oracle tablespace, which can contain 1022 datafiles or tempfiles, each of which can contain up to approximately 4 million (2^22) blocks. |
External Tables file |
Maximum size |
Dependent on the operating system. An external table can be composed of multiple files. |
每個datafile最多包含2^22-1個block,存在這個限制是因為Oracle的內部ROWID使用22位2進位制數來儲存不同的block號,所以22位最多代表(2^22-1)個block。
3、根據文件,計算我的資料庫單個檔案的大小限制
SYS@MTH> show parameter db_block_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_block_size integer 8192
單個檔案的最大大小:(2^22-1) × 8K=33554432K=32G
顯然我指定的50000M超過了最大限制,所以報錯。
檢視到文件中建議單個datafile的大小設定成8G,既避免datafile過小導致的個數過多,難以維護,又能避免datafile過大,一旦出現問題很難恢復的情況。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30776559/viewspace-2146790/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Rename or Move a datafile In Oracle 19c RAC-20220117Oracle
- RMAN-06214: Datafile Copy
- [20201103]set newname for datafile.txt
- ORA-19909: datafile 1 belongs to an orphan incarnation
- 利用offline datafile檔案方式遷移資料
- Sqlserver移動檔案路徑move datafile的三種方法SQLServer
- 【故障處理】ORA-39123,ORA-19722 datafile is an incorrect version
- RMAN restore fails with ORA-01180: can not create datafile 1 (文件 ID 1265151.1)RESTAI
- 關於Oracle 10g ASM磁碟大小的限制Oracle 10gASM
- [20190312]檢視v$datafile欄位OFFLINE_CHANGE#, ONLINE_CHANGE#.txt
- ocp 19c考題,科目082考試題(15)-move datafile to
- OMF管理自動新增資料檔案指令碼add_datafile.sh指令碼
- 對SQL Server 2014 alwayson 架構的資料庫在主節點加新的datafile檔案SQLServer架構資料庫
- JavaScript限制上傳檔案的大小JavaScript
- 探究intent傳遞大小限制Intent
- 限制 Apache日誌檔案大小的方法Apache
- apache上傳檔案大小限制Apache
- PbootCMS上傳檔案大小限制boot
- php檔案上傳大小限制PHP
- 限制單個IP併發TCP連線的方法TCP
- Android Intent 傳遞資料大小限制AndroidIntent
- 限制檔案大小及顯示檔案大小(正規表示式
- 如何對xtrabackup 備份限制使用IO大小
- 禪道檔案大小限制-nginx 調整Nginx
- Nginx 調整檔案上傳大小限制Nginx
- elementui表單驗證 對比兩個表單大小UI
- CentOS限制實體記憶體大小方法CentOS記憶體
- 遠端下載上傳命令(繞過大小限制)
- Facebook 小遊戲上傳的遊戲包有大小限制遊戲
- oracle 報大小寫錯誤Oracle
- 如何使用極狐GitLab Runner 修改日誌大小限制Gitlab
- Oracle中left join中右表的限制條件Oracle
- Facebook Instant Game 小遊戲上傳的遊戲包有大小限制GAM遊戲
- 修改SharePoint上傳檔案大小限制(Changing Maximum Upload Size)
- Oracle資料庫限制訪問IPOracle資料庫
- ORACLE RAC+DG調整redo大小Oracle
- 【git】github如何上傳超過100MB大小的單個檔案Github
- Oracle的過載保護-資料庫資源限制Oracle資料庫
- Linux: 如何分割檔案,不再被 4G 大小限制了Linux