如何在 Oracle 中增加 TEMP TABLE Space 值?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25434429/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 00:35:13  来源:igfitidea点击:

How to increase the TEMP TABLE Space value in Oracle?

oracleoracle11gredhattablespace

提问by Ullan

Currently my Oracle 11g temp TABLESPACE value is 34GB. I need to increase the table space value to a large value (45GB)

目前我的 Oracle 11g temp TABLESPACE 值为 34GB。我需要将表空间值增加到一个大值(45GB)

I tired the following sql command to increase the temp table space.

我累了下面的sql命令来增加临时表空间。

    ALTER TABLESPACE temp ADD TEMPFILE '/oradata/temp01.dbf' SIZE  45G

The error:

错误:

SQL Error: ORA-01144: File size (5536951 blocks) exceeds maximum of 4194303 blocks 01144. 00000 - "File size (%s blocks) exceeds maximum of %s blocks" *Cause: Specified file size is larger than maximum allowable size value. *Action: Specify a smaller size.

SQL 错误:ORA-01144:文件大小(5536951 个块)超过 4194303 个块的最大值 01144.00000 -“文件大小(%s 个块)超过 %s 个块的最大值” *原因:指定的文件大小大于最大允许大小值. *操作:指定较小的尺寸。

    SELECT value FROM v$parameter WHERE name = 'db_block_size';

The "db_block_size" value is 8192

“db_block_size”值为 8192

  1. How do I decide the maximum allowed db_block_size and the corresponding temp TABLESPACE value
  2. How do I increase the TEMP tablespace?
  1. 如何确定允许的最大 db_block_size 和相应的临时 TABLESPACE 值
  2. 如何增加 TEMP 表空间?

回答by Justin Cave

The error message is pretty clear, the maximum file size is 4194303 blocks. If you multiply that out

错误消息非常清楚,最大文件大小为 4194303 块。如果你乘以它

4194303 blocks * 8192 bytes/ block / 1024^3 = 32 GB

So you're limited to individual data/ temp files of up to 32 GB. You can, however, have thousands of data files in a tablespace. So you could have a 32 GB temp file and another 13 GB temp file or 2 22.5 GB temp files or 9 5 GB temp files.

因此,您只能使用最大 32 GB 的单个数据/临时文件。但是,您可以在一个表空间中拥有数千个数据文件。所以你可以有一个 32 GB 的临时文件和另一个 13 GB 的临时文件或 2 个 22.5 GB 的临时文件或 9 个 5 GB 的临时文件。