当前位置:网站首页>你知道Oracle的数据文件大小有上限么?
你知道Oracle的数据文件大小有上限么?
2022-07-02 10:24:00 【bisal(Chen Liu)】
传统的关系型数据库,虽然客户端同数据库交互的时候,都是在和各种缓存打交道,但是"数据"还是要进行落盘的操作,文件是他的存储形式,既然是文件,就会有容量限制,那么,Oracle的数据文件大小究竟有何限制?
参考一些资料,每个数据文件最多只能包含2^22-1个数据块,这个限制是由于Oracle的Rowid中使用22位来代表Block号,这22位最多只能代表2^22-1个数据块。当然,Oracle10g引入了大文件表空间,Oracle就可以使用32位来代表Block号,因此,大文件表空间下每个文件最多可以容纳4G个Block。
P. S. 《什么是rowid?》
如果是默认的8k数据块,一个数据文件包含了2^22-1个数据块,他的文件大小,就是2^22-1 * 8k / 1024 /1024 = 32G,即最大不能超过32G。相应,
4k数据块的数据文件最大不超过16G。
16k数据块的数据文件最大不超过64G。
32k数据块的数据文件最大不超过128G。
64k数据块的数据文件最大不超过256G。
如果是大文件表空间,采用默认8k数据块,数据文件就可以达到32T,如果是32k的数据块,数据文件大小就可以达到128T。
虽然,按照上述计算,数据文件大小有个上限,但是,若操作系统支持的单个文件最大容量小于此值,则以操作系统的最大容量为限。另外,Windows中只能使用2k、4K、8K、16K的块大小,最大的块容量,就会略小。
和数据文件相关的有个db_files参数,他指定了一个实例可以创建的最大文件数量。这个值可以被修改,但只有重启实例后,才会生效。db_files设置得过低,可能造成不能添加新的数据文件的问题。设置得过高,会消耗更多的内存资源。对于如何设置,《Database Administrator’s Guide》给出了指引,但还是得结合实际情况,
https://docs.oracle.com/en/database/oracle/oracle-database/19/admin/managing-data-files-and-temp-files.html#GUID-BB7D8910-FCAE-4DAD-BDE5-B5EE35C69C6B

因此,包括不仅限于Oracle和数据文件大小的问题,当我们碰到实际需求场景的时候,了解这些限制,有助于我们选择最合适的方案。
参考资料,
http://www.eygle.com/archives/2007/07/oracle_datafile_limit.html
https://www.modb.pro/db/386663?utm_source=index_ai
近期更新的文章:
《小白学习MySQL - 增量统计SQL的需求 - 开窗函数的方案》
近期的热文:
文章分类和索引:
边栏推荐
- 693. Travel sequencing (map + topology)
- Selenium element positioning method
- 2022 Heilongjiang provincial examination on the writing skills of Application Essays
- Browser driven Download
- Selenium installing selenium in pycharm
- Daily practice of C language --- monkeys divide peaches
- Node.js通过ODBC访问PostgreSQL数据库
- 默认插槽,具名插槽,作用域插槽
- Partner cloud form strong upgrade! Pro version, more extraordinary!
- 故事點 vs. 人天
猜你喜欢

错误:EACCES:权限被拒绝,访问“/usr/lib/node_modules”
![[true topic of the Blue Bridge Cup trials 43] scratch space flight children's programming explanation of the true topic of the Blue Bridge Cup trials](/img/42/21f6d0fdd159faa8b63713624c95a2.png)
[true topic of the Blue Bridge Cup trials 43] scratch space flight children's programming explanation of the true topic of the Blue Bridge Cup trials

Node. JS accessing PostgreSQL database through ODBC

Getting started with QT - making a simple calculator

QT - make a simple calculator - realize four operations

QT new project_ MyNotepad++

Selenium element positioning method

BeanUtils--浅拷贝--实例/原理
![[技术发展-22]:网络与通信技术的应用与发展快速概览-2- 通信技术](/img/a7/44609a5acf25021f1fca566c3d8c90.png)
[技术发展-22]:网络与通信技术的应用与发展快速概览-2- 通信技术

全屋Wi-Fi:一个谁也解决不好的痛点?
随机推荐
Answer: can the audio be set to on by default during easydss video on demand?
验证失败,请检查您的回电网址。您可以按照指导进行操作
为什么switch 的default后面要跟break?
全屋Wi-Fi:一个谁也解决不好的痛点?
The 29 year old programmer in Shanghai was sentenced to 10 months for "deleting the database and running away" on the day of his resignation!
How to use SAP's metadata framework (MDF) to build custom business rules?
D为何链接不了dll
Integral link, inertia link and proportion link in Simulink
2022 zero code / low code development white paper [produced by partner cloud] with download
QT how to set fixed size
JS reverse row query data decryption
使用BLoC 构建 Flutter的页面实例
Story points vs. human days
Launcher启动过程
[技术发展-22]:网络与通信技术的应用与发展快速概览-2- 通信技术
题解《子数整数》、《欢乐地跳》、《开灯》
[Blue Bridge Cup] children's worship circle
(POJ - 1984) navigation nightare (weighted and search set)
Daily practice of C language --- monkeys divide peaches
QT new project_ MyNotepad++