Oracle/PLSQL: ORA-06550
参考:
http://blog.csdn.net/haiross/article/details/20612135
Oracle/PLSQL: ORA-06550
Learn the cause and how to resolve the ORA-06550 error message in Oracle.
Description
When you encounter an ORA-06550 error, the following error message will appear:
ORA-06550: line num, column num: str
Cause of Error
You tried to execute an invalid block of PLSQL code (like a stored procedure or function), but a compilation error occurred.
How to Resolve the Error
The option(s) to resolve this Oracle error are:
Option #1
Refer to the line and column numbers (in the error message) to find the compilation error and correct it. Then try recompiling your code.
Let's look at an example of how to resolve an ORA-06550 error. For example, if you created a procedure calledTestProc as follows:
SQL> CREATE OR REPLACE PROCEDURE TestProc
2 AS
3 vnum number;
4 BEGIN
5 vnum := vAnotherNum;
6 END;
7 /
Warning: Procedure created with compilation errors.
This procedure was created with compilation errors. So if we try to execute this procedure, we will get an ORA-06550 error as follows:
SQL> execute TestProc();
BEGIN TestProc(); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00905: object EXAMPLE.TESTPROC is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
You can run the SHOW ERROR command to view the errors as follows:
SQL> show error procedure TestProc;
Errors for PROCEDURE TESTPROC:
LINE/COL ERROR
5/1 PL/SQL: Statement ignored
5/9 PLS-00201: identifier 'VANOTHERNUM' must be declared
As you can see, the error is caused by the variable called VANOTHERNUM not being declared. To resolve this error, we can modify ourTestProc procedure to declare the variable as follows:
SQL> CREATE OR REPLACE PROCEDURE TestProc
2 AS
3 vnum number;
4 vAnotherNumber number;
5 BEGIN
6 vAnotherNum := 999;
7 vnum := vAnotherNum;
8 END;
9 /
Procedure created.
And now when we execute our TestProc procedure, the ORA-06550 error has been resolved.
SQL> execute TestProc();
PL/SQL procedure successfully completed.
Oracle/PLSQL: ORA-06550的更多相关文章
- oracle tnsnames.ora文件用法说明
oracle tnsnames.ora文件用法说明 CreationTime--2018年8月10日08点32分 Author:Marydon 1.用途 oracle客户端所需要的一个文件,通过该 ...
- Oracle sqlnet.ora配置
Oracle sqlnet.ora配置 sqlnet.ora的作用(官网指出的) www.2cto.com 1.限制客户端访问(如指定客户端域为不允许访问) 2.指定命名方法(local nami ...
- Oracle PLSQL读取(解析)Excel文档
http://www.itpub.net/thread-1921612-1-1.html !!!https://code.google.com/p/plsql-utils/ Introduction介 ...
- MyEclipse+Weblogic+Oracle+PLSQL配置注意事项
Weblogic配置详情:<Weblogic安装与配置图文详解>Oracle+PLSQL配置详情:<PL/SQL访问远程Oracle服务器(多种方式)>MyEclipse配置: ...
- oracle Plsql 运行update或者delete时卡死问题解决的方法
oracle Plsql 运行update或者delete时 遇到过Plsql卡死问题或者导致代码运行sql的时候就卡死. 在开发中遇到此问题的时候,本来把sql复制出来,在plsql中运行,Sql本 ...
- oracle plsql基本语法
oracle plsql 基本语法 --plsql默认规则:plsql赋值用":=" plsql判断用"=" plsql输入用"&" ...
- Oracle/PLSQL存储过程详解
原文链接:https://blog.csdn.net/zezezuiaiya/article/details/79557621 Oracle/PLSQL存储过程详解 2018-03-14 17:31: ...
- 本地不安装Oracle,plsql远程连接数据库
由于Oracle的庞大,有时候我们需要在只安装Oracle客户端如plsql.toad等的情况下去连接远程数据库,可是没有安装Oracle就没有一切的配置文件去支持.最后终于发现一个很有效的方法,Or ...
- plsql连接oralce数据的配置 PLSQL配置怎么连ORACLE plsql连接多个数据库设置 Oracle 服务命名(别名)的配置及原理,plsql连接用
Oracle 服务命名(别名)的配置及原理,plsql连接用 Oracle 服务命名(别名)的配置及原理 连接数据库必须配置服务命名(别名,用于plsql的连接),不管是本地还是远程,服务命名即简单命 ...
随机推荐
- git 行动指南
Git是一个分布式的版本管理工具. 在本地项目和服务器都会拥有版本库,本地版本库由自己控制,自由选择提交代码到服务器端 windows上也建议使用命令的方式来使用git,推荐使用客户端 :http:/ ...
- STM32基于HAL库通过DMA读写SDIO
通过STM32CUBEMX生成DMA读写sdio的工程,再读写过程中总会卡死在DMA中断等待读写完成的while中,最终发现while等待的标志在SDIO的中断里置位的,而SDIO中断优先级如果小于或 ...
- Bucket不为空,请检查该Bucket是否包含未删除的Object或者未成功的Multipart碎片
异常处理汇总 ~ 修正果带着你的Net飞奔吧!http://www.cnblogs.com/dunitian/p/4599258.html 图示解决==>详细如下:
- SQL Server 合并复制遇到identity range check报错的解决
最近帮一个客户搭建跨洋的合并复制,由于数据库非常大,跨洋网络条件不稳定,因此只能通过备份初始化,在初始化完成后向海外订阅端插入数据时发现报出如下错误: Msg 548, Level 16, S ...
- 【.NET深呼吸】基础:自定义类型转换
照例,老周在开始吹牛之前,先讲讲小故事,这是朋友提出的建议,老TMD写技术有什么了不起的,人人都会写.后来老周想想,也确实,代码谁不会写,能写到有品位有感悟,就不容易做到.于是,老周接受了该朋友的建议 ...
- WPF中异步更新UI元素
XAML 界面很简单,只有一个按钮和一个lable元素,要实现点击button时,lable的内容从0开始自动递增. <Grid> <Label Name="lable_p ...
- JavaScript权威设计--JavaScript表达式与运算符,语句(简要学习笔记六)
1.delete是一元操作符,用来删除对象属性或者元素. var a={ x:1, y:2 } delete a.x; //删除x属性 “x”in a //false:a对象中已经不存在x属性 ale ...
- 5.SVM核函数
核函数(Kernels) 定义 1.1 (核或正定核) 设是中的一个子集,称定义在上的函数是核函数,如果存在一个从到Hilbert空间的映射 使得对任意的,都成立.其中表示Hilbert空间中的内积. ...
- Mono的简单例子
一直对移动端开发有些兴趣,但苦于不会Java,好在终于找到了个好玩的. 安装方法略了,先建立一个玩玩 不多说,贴代码了,需要注意的只有些JAVA和C#写法不太一样的地方,不细介绍了,因为没什么经验,乱 ...
- 【Oracle 集群】11G RAC 知识图文详细教程之RAC在LINUX上使用NFS安装前准备(六)
RAC在LINUX上使用NFS安装前准备(六) 概述:写下本文档的初衷和动力,来源于上篇的<oracle基本操作手册>.oracle基本操作手册是作者研一假期对oracle基础知识学习的汇 ...