经常遇到一些java.sql.SQLException异常,从网上汇集一些前人的资料,以供以后调试查阅!
ORA-00904: invalid column name 无效列名
ORA-00942: table or view does not exist 表或者视图不存在
ORA-01400: cannot insert NULL into () 不能将空值插入
ORA-00936: 缺少表达式
ORA-00933: SQL 命令未正确结束
ORA-01722: 无效数字:(一般可能是企图将字符串类型的值填入数字型而造成)
ORA-06530: ACCESS_INTO_NULL
Your program attempts to assign values to the attributes of an uninitialized (atomically null) object.
企图将值写入未初化对象的属性
ORA-06592: CASE_NOT_FOUND
None of th choice in the WHEN clauses of a CASE statement is selected, and there is no ELSE clause.
case语句格式有误,没有分支语句
ORA-06531: COLLECTION_IS_NULL
Your program attempts to apply collection methods othe than EXIST to an uninitialized(atomically null) nested table or varray, or th program attempts to assign values to the elements of an uninitialized nested table or varray.
企图将集合填入未初始化的嵌套表中
ORA-06511: CURSOR_ALREADY_OPEN
Your program attempts to open an already open cursor. A cursor must be closed before it can be reopened. A cursor FOR loop automatically opens the cursor to which it refers. So, your program cannot open that cursor inside the loop.
企图打开已经打开的指针.指针已经打开,要再次打开必须先关闭.
ORA-00001: DUP_VAL_ON_INDEX
Your program attempts to store duplicate values in a database column that is constrained by a unique index.
数据库字段存储重复,主键唯一值冲突
ORA-01001: INVALID_CURSOR 无效指针
Your program attempts an illegal cursor operation such as closing an unopened cursor.
非法指针操作,例如关闭未打开的指针
ORA-01722: INVALID_NUMBER 无效数字
In a SQL statement, the conversion of a character string into a number fails because the string does not represent a valid number. (In procedural statements, VALUE_ERROR is raised.) This exception is also raised when the LIMIT-clause expression in a
bulk FETCH statement does not evaluate to a positive number.
在sql语句中,字符数字类型转换错误,无法将字符串转化成有效数字.此错误也可能因为在limit从句表达式中fetch语句无法对应指定数字
ORA-01017: LOGIN_DENIED 拒绝访问
Your program attempts to log on to Oracle with an invalid username and/or password.
企图用无效的用户名或密码登录oracle
ORA-01403: NO_DATA_FOUND 无数据发现
A SELECT INTO statement returns no rows, or your program references a deleted element in a nested table or an uninitialized element in an index-by table. SQL aggregate functions such as AVG and SUM always return a value or a null. So,
a SELECT INTO statement that calls an aggregate function never raises NO_DATA_FOUND. The FETCH statement is expected to return no rows eventually, so when that happens, no exception is raised.
ORA-01012: NOT_LOGGED_ON 未登录
Your program issues a database call without being connected to Oracle.
程序发送数据库命令,但未与oracle建立连接
ORA-06501: PROGRAM_ERROR 程序错误
PL/SQL has an internal problem.
pl/sql系统问题
ORA-06504: ROWTYPE_MISMATCH 行类型不匹配
The host cursor variable and PL/SQL cursor variable involved in an assignment have incompatible return types.
For example, when an open host cursor variable is passed to a stored subprogram, the return types of the actual and formal parameters must be compatible.
ORA-30625: SELF_IS_NULL
Your program attempts to call a MEMBER method on a null instance. That is, the built-in parameter SELF (which is always the first parameter passed to a MEMBER method) is null.
ORA-06500: STORAGE_ERROR 存储错误
PL/SQL runs out of memory or memory has been corrupted.
PL/SQL运行内存溢出或内存冲突
ORA-06533: SUBSCRIPT_BEYOND_COUNT 子句超出数量
Your program references a nested table or varray element using an index number larger than the number of elements in the collection.
ORA-06532: SUBSCRIPT_OUTSIDE_LIMIT 子句非法数量
Your program references a nested table or varray element using an index number (-1 for example) that is outside the legal range.
ORA-01410: SYS_INVALID_ROWID 无效的字段名
The conversion of a character string into a universal rowid fails because the character string does not represent a valid rowid.
ORA-00051: TIMEOUT_ON_RESOURCE 资源等待超时
A time-out occurs while Oracle is waiting for a resource.
ORA-01422: TOO_MANY_ROWS 返回超过一行
A SELECT INTO statement returns more han one row.
ORA-06502: VALUE_ERROR 值错误
An arithmetic, conversion, truncation, or size-constraint error occurs. For example, when your program selects a column value into a character variable, if the value is longer than the declared length of the variable, PL/SQL aborts the assignment
and raises VALUE_ERROR. In procedural statements, VALUE_ERROR is raised if the conversion of a character string into a number fails. (In SQL statements, INVALID_NUMBER is raised.)
ORA-01476: ZERO_DIVIDE 除0错误
Your program attempts to divide a number by zero.
分享到:
相关推荐
oracle之中一些常见的异常,方便进行查找归档总结,第一次书写望见谅
oracle异常处理步骤自己总结的,不太成熟,大家可以不看,只是我的备忘录
### Oracle常用异常代码详解 #### 1. ACCESS_INTO_NULL (ORA-06530) **异常描述:** 当尝试访问一个未初始化或者值为NULL的引用时触发此异常。通常发生在对一个NULL对象执行操作(如读取或修改其属性)时。 **解决...
通过以上对Oracle PL/SQL中常见预定义异常的介绍,我们可以了解到,在编写PL/SQL代码时如何有效地利用这些异常来增强程序的健壮性和可维护性。正确处理这些异常不仅可以避免程序崩溃,还可以提高程序的运行效率和...
### Oracle常见异常详解 在Oracle数据库管理与应用开发过程中,会遇到各种各样的异常情况,这些异常往往会影响到数据处理的准确性以及系统的稳定性。为了更好地理解和处理这些异常,本篇文章将详细介绍Oracle中常见...
oracle预定义异常, ORACLE开发存储过程,函数,触发器等程序时,会经常使用到异常处理,该文档列举了常见的异常以及异常说明
ORACLE预定义了一组常见的异常,这些异常可以直接在程序中引用。下面列出了一些常用的预定义异常及其对应的错误信息和含义: - `ORA-0001 Dup_val_on_index`:违反了唯一性约束。 - `ORA-0051 Timeout-on-resource`...
对于预定义异常,现将最常用的异常列举如下: * NO_DATA_FOUND(ORA-01403):SELECT INTO 语句没有符合条件的记录返回 * TOO_MANY_ROWS(ORA-01422):SELECT INTO 语句符合条件的记录有多条返回 * DUP_VAL_ON_...
预定义异常是Oracle系统已经内置的一些常见错误,它们都有对应的错误代码(ORA-xxx)。下面,我们将深入探讨一些常见的Oracle异常及其解决策略。 1. **NO_DATA_FOUND** (ORA-01403): 当执行`SELECT INTO`语句时,...
预定义异常是 Oracle 为常见错误预先定义的一组异常,这些异常通常与数据库操作相关。例如: 1. `Access_info_null` (ora-06530):当尝试访问未初始化的对象时触发。 2. `Case_not_found` (ora-06592):CASE 语句中...
"Oracle常用监控脚本"通常包含了多种用于检查数据库性能、资源使用情况以及问题排查的工具和脚本。这些脚本可以帮助DBA(数据库管理员)实时了解数据库的状态,及时发现并解决问题,确保系统的健康运行。 1. **SQL ...
Oracle ORA 异常处理详解 Oracle 是一个强大的关系数据库管理系统,然而,在使用 Oracle 时,总是会遇到各种错误信息,这些错误信息是Oracle抛出的异常信息,用于提示开发者出现了什么问题。了解这些错误信息是...
以下是一些关于Oracle常见面试题的知识点,这些知识点对于理解Oracle数据库的核心概念、功能和最佳实践至关重要。 1. **Oracle数据库版本与组件**:了解Oracle的不同版本(如Standard Edition、Enterprise Edition...
### Oracle数据库常见维护问题手册-精典 #### 数据库基础 **数据库启动方式** Oracle数据库启动通常通过`SQL*Plus`工具来进行。首先确保已经安装并配置了正确的Oracle客户端环境,然后通过以下命令来启动数据库:...
##### 2.2 Oracle常见关键字 **问题**: Oracle有哪些常见的关键字? **解答**: Oracle中有许多关键字,如SELECT、FROM、WHERE、INSERT、UPDATE、DELETE、CREATE等,这些关键字不能用作对象名。 - **示例**: 查看...
以上列出的Oracle异常是开发和维护Oracle数据库应用程序时常见的问题。了解这些异常的原因和解决方案有助于提高数据库应用的稳定性和效率。对于每一种异常,都应该采取相应的预防措施和处理策略,确保应用程序能够...
在本文中,我们将介绍 Oracle 存储过程的基本结构、参数传递方式、游标处理、异常处理等常用技巧。 一、存储过程的基本结构 一个 Oracle 存储过程通常由以下几个部分组成: 1. 创建语句:create or replace ...
"Oracle常用语句-总结文档汇总"提供了丰富的资源,涵盖了SQL语句的基础到进阶应用,包括列行转换、SQL性能优化等多个关键知识点。 首先,列行转换是数据处理中常见的需求,Oracle提供了多种方法来实现这一操作。...
本资料集主要涵盖了Oracle中的常用SQL语句以及在实际应用中可能遇到的常见问题及其解决策略。 1. **SQL基本操作**: - **SELECT语句**:用于从表中选择数据。例如,`SELECT * FROM table_name;` 将获取表中的所有...