[20210506]]关于ORA-01450.txt --//参考链接: https://jonathanlewis.wordpress.com/2009/06/05/online-rebuild/ https://jonathanlewis.wordpress.com/2013/06/28/index-rebuild-12c/ --//按照链接https://jonathanlewis.wordpress.com/2013/06/28/index-rebuild-12c/介绍: Just one of those little snippets about 12c that might help someone. Further to an earlier post, online rebuild works in 12c even when the key is "too long". The internal code has changed completely, and there is no sign of the problematic journal table that caused the problem in earlier versions. --//视乎12c改变一些代码,导致下面的情况不会在出现ORA-01450错误。 $ oerr ora 01450 01450, 00000, "maximum key length (%s) exceeded" // *Cause: // *Action: 1.环境: TTT@XXXX> @ ver1 TTT@XXXX> @ prxx ============================== PORT_STRING : x86_64/Linux 2.4.xx VERSION : 18.0.0.0.0 BANNER : Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production BANNER_FULL : Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production Version 18.3.0.0.0 BANNER_LEGACY : Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production CON_ID : 0 PL/SQL procedure successfully completed. TTT@XXXX> create table t1( v1 varchar2(4000), v2 varchar2(2387), v3 varchar2(100)) ; Table created. TTT@XXXX> create index i_t1_v1_v2 on t1(v1, v2); Index created. TTT@XXXX> alter index i_t1_v1_v2 rebuild; Index altered. TTT@XXXX> alter index i_t1_v1_v2 rebuild online; Index altered. TTT@XXXX> drop index i_t1_v1_v2; Index dropped. --//OK没有这样的问题。如果以sys用户登录重复相同的操作: SYS@XXXX> create table t1( v1 varchar2(4000), v2 varchar2(2387), v3 varchar2(100)) ; Table created. SYS@XXXX> create index i_t1_v1_v2 on t1(v1, v2); Index created. SYS@XXXX> alter index i_t1_v1_v2 rebuild; Index altered. SYS@XXXX> alter index i_t1_v1_v2 rebuild online; alter index i_t1_v1_v2 rebuild online * ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-01450: maximum key length (3215) exceeded --//出现ORA-01450错误,无法解析。 --//主要问题出在一些开发胡乱定义字段类型长度,导致在维护中有可能出现ORA-01450错误。 SYS@XXXX> drop index i_t1_v1_v2; Index dropped. SYS@XXXX> create index i_t1_v1_v2 on t1(v1, v2) tablespace users; Index created. SYS@XXXX> alter index i_t1_v1_v2 rebuild; Index altered. SYS@XXXX> alter index i_t1_v1_v2 rebuild online; alter index i_t1_v1_v2 rebuild online * ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-01450: maximum key length (3215) exceeded --//一样出现,与表空间类型无关。 3.如果你在11g上重复前面的操作,普通用户下不会出现ORA-01450错误。 SCOTT@book> @ ver1 PORT_STRING VERSION BANNER ------------------------------ -------------- -------------------------------------------------------------------------------- x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production create table t1( v1 varchar2(4000), v2 varchar2(2387), v3 varchar2(100)) ; create index i_t1_v1_v2 on t1(v1, v2); SCOTT@book> alter index i_t1_v1_v2 rebuild; Index altered. SCOTT@book> alter index i_t1_v1_v2 rebuild online; Index altered. --//ok. SCOTT@book> drop table t1 purge ; Table dropped. SCOTT@book> create table t1( v1 varchar2(4000), v2 varchar2(2388), v3 varchar2(100)) ; Table created. SCOTT@book> create index i_t1_v1_v2 on t1(v1, v2); create index i_t1_v1_v2 on t1(v1, v2) * ERROR at line 1: ORA-01450: maximum key length (6398) exceeded --//参考链接https://jonathanlewis.wordpress.com/2009/06/05/online-rebuild/ My key value is at the limit for an 8KB block size in Oracle 9i and later – which is roughly 80% of (block size – 190 bytes). In earlier versions of Oracle (prior to 9i) the limit was roughly half that (i.e. 40% rather than 80%). If you try to create a longer key you'll see Oracle error ORA-01450: "maximum key length (6398) exceeded". (If you've built your indexes using a different blocksize the number in brackets will be different – and you will have to adjust the demo code for 16KB and 32KB block sizes). The difference between my declared column lengths and the error limit relates to the overheads in an index entry – but seems to "forget" the one byte extra for non-unique indexes. --//实际上面的测试主要有感而发,又遇到开发乱键字段长度的情况,没有根据实际的情况选择建立字段的长度,直接导致我根本不能建立索 --//引。我不可能建立更大的数据块来存放索引,无形增加维护的难度,大概这个也算一个理由不要顺便选择varchar2(1000)之类的字段 --//类型。
[20210506]]关于ORA-01450.txt
来源:这里教程网
时间:2026-03-03 16:38:43
作者:
编辑推荐:
- [20210506]]关于ORA-01450.txt03-03
- DG备库未启动SCN 新特性引起ORA-600 225203-03
- [20210506]oracle19c dbms_stats的缺省参数.txt03-03
- [20210426]execute immediate.txt03-03
- [20210506]RAC crsctl status ... -v 获取last started or status changes信息.txt03-03
- Oracle密码过期处理(ORA-28002)03-03
- [20210428]AnonHugePages与transparent hugepage.txt03-03
- 一次ODA宕机分析03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- Oracle密码过期处理(ORA-28002)
Oracle密码过期处理(ORA-28002)
26-03-03 - 一次ODA宕机分析
一次ODA宕机分析
26-03-03 - rac恢复到单机
rac恢复到单机
26-03-03 - [20210429]文件头块不会缓存.txt
[20210429]文件头块不会缓存.txt
26-03-03 - 【SWINGBENCH】使用SwingBench对Oracle压力测试
【SWINGBENCH】使用SwingBench对Oracle压力测试
26-03-03 - 如何用h5个人简历模板来制作自己的简历
如何用h5个人简历模板来制作自己的简历
26-03-03 - qq相册照片怎么批量下载到手机,qq相册批量下载功能
qq相册照片怎么批量下载到手机,qq相册批量下载功能
26-03-03 - 【RAT】Oracle Real Application Testing(真用应用测试)介绍
- Oracle数据库宕机案例分享
Oracle数据库宕机案例分享
26-03-03 - Oracle 11.2.0.4 本地/远程登录慢的问题
Oracle 11.2.0.4 本地/远程登录慢的问题
26-03-03
