ORA-01722: invalid number" During Upgrade/Downgrade

本文介绍了解决在Oracle数据库升级或降级过程中出现的ORA-01722:invalid number错误的方法。此错误通常发生在执行特定脚本如catupgrd.sql时,并提供了可能的原因及解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

"ORA-01722: invalid number" During Upgrade/Downgrade [ID 435536.1] 

 Modified 01-JUN-2010     Type PROBLEM     Status MODERATED 

In this Document
  Symptoms
  Cause
  Solution
  References


Platforms: 1-914CU;

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

 

Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.7 to 11.2.0.1 - Release: 9.2 to 11.2
Information in this document applies to any platform.

Symptoms

You are getting following error while performing upgrade/downgrade of the database. 
This error appears when executing script in the following release only

catbkout.sql( Available on  9.2.0.7 and Above )
catbkout.sql(Available on 10.1.0.5 and Above )
catbkout.sql( 10.2.0.2 and Above )
catupgrd.sql (For 10g R2 Above)

SQL> @?/rdbms/admin/catupgrd.sql 


DOC>#######################################################################
DOC>#######################################################################
DOC> The following statement will cause an "ORA-01722: invalid number"
DOC> error if the database has not been opened for UPGRADE.
DOC>
DOC> Perform a "SHUTDOWN ABORT" and
DOC> restart using UPGRADE.
DOC>#######################################################################
DOC>#######################################################################
DOC>#
SELECT TO_NUMBER('MUST_BE_OPEN_UPGRADE') FROM v$instance
*
ERROR at line 1:
ORA-01722: invalid number

Cause

Instance has not started with UPGRADE ( MIGRATE for 9.2) mode , which caused catupgrd.sql failed execute.

There can be multiple cause for the ORA-01722 error. Following are few listed

1. Database not started as UPGRADE or MIGRATE Mode.
2. SQL*PLUS session user running this script is not SYS.
3. Database server version is not correct for this script.
4. If the SYSAUX tablespace does not exist or is not ONLINE for READ WRITE, PERMANENT, EXTENT MANAGEMENT LOCAL, andSEGMENT SPACE MANAGEMENT AUTO.[Applicable Only For 10G]

Solution

1. Ensure you have followed the  following criteria

  •  Database as UPGRADE or MIGRATE Mode.
  • Logged on as SYS user when running this script.
  • Database server version  matches  for this script  i.e catupgrd.sql for 10.2 need to be executed for 10.2 database
  • If the SYSAUX tablespace  exist  and  is ONLINE for READ WRITE, PERMANENT, EXTENT MANAGEMENT LOCAL and SEGMENT SPACE MANAGEMENT AUTO.[Applicable Only For 10G]

2. If you are meeting above criteria , then  open the script from appropriate location %ORACLE_HOME%/rdbms/admin

3. Goto the SQL command which fails with error i.e in this case
SELECT TO_NUMBER('MUST_BE_OPEN_UPGRADE') FROM v$instance
and check you have performed the criteria mentioned above SQL command

While running the catbkout .sqlor catupgr.sql , you will also see the following appear on console . These are comments before SQL , which are for information purpose.

DOC 
######################################################################
######################################################################
The following statement will cause an "ORA-01722: invalid number"
error if the user running this script is not SYS. Disconnect
and reconnect with AS SYSDBA.
######################################################################
######################################################################

 



<<End_of_Article>> FOLDER:ST.Server.DBA.UpgradeAndMigration TOPIC:Miscellaneous DOCUMENT-ID:435536.1 ALIAS: SOURCE:AWIZ 6337004.994 DOCUMENT-TYPE:PROBLEM ZCXTECH TITLE:"ORA-01722: invalid number" During Upgrade/Downgrade IMPACT:LOW SKILL-LEVEL:NOVICE STATUS:MODERATED DISTRIBUTION:EXTERNAL ZCXPUBLIC ZCXCURRENT AUTHOR:DROUT.IN ERROR:ORA-1722 PRODID-5 COMPONENT:INSTALL MINVER:9.2.0.7 MAXVER:10.2.0.1 PORTID-0 FDRSEG-799 FDRSEG-788 FDRSEG-773 FDRSEG-465

References

NOTE:837570.1 - Complete Checklist for Manual Upgrades to 11gR2

Show Related Information Related


Products
  • Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
Keywords
MIGRATE; CATUPGRD.SQL; UPGRADE
Errors
ORA-1722; 501722 ERROR; 01722 ERROR
ORA-01722: invalid number错误是Oracle数据库中的一个常见错误,它表示在执行SQL语句时,尝试将一个无效的数字转换为数字类型。这个错误通常发生在以下几种情况下: 1. 数据类型不匹配:当尝试将一个非数字类型的值转换为数字类型时,就会出现这个错误。比如在关联表时,如果关联的值和类型不一致,Oracle会尝试将其隐式转换为数字类型,如果无法转换,就会报错。 2. 数据格式错误:当尝试将一个无效的数字格式转换为数字类型时,也会出现这个错误。比如在查询中使用了to_number函数,但是传入的参数不符合数字格式要求。 解决这个错误的方法有以下几种: 1. 检查数据类型:确保在进行数据转换时,源数据的类型和目标数据类型是匹配的。如果不匹配,可以考虑使用合适的转换函数或者修改数据类型。 2. 检查数据格式:如果使用了to_number函数或者其他需要数字格式的函数,确保传入的参数符合数字格式要求。可以使用合适的格式化函数或者修改数据格式。 3. 检查数据完整性:如果在关联表时出现了这个错误,可以检查关联的列中是否包含非数字类型的值。如果有,可以考虑修改数据或者使用合适的转换函数。 总之,ORA-01722: invalid number错误通常是由于数据类型不匹配或者数据格式错误导致的。通过检查数据类型、数据格式和数据完整性,可以解决这个错误。\[1\]\[2\]\[3\] #### 引用[.reference_title] - *1* *2* [【问题处理】ORA-01722: invalid number (类型隐式转换)](https://blog.youkuaiyun.com/haiross/article/details/49153317)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [sql报错处理:ora-01722:invalid number](https://blog.youkuaiyun.com/qq_36703810/article/details/130172990)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值