How to install Procedural Option in Oracle 11gr2

落爺英雄遲暮 提交于 2019-12-19 10:21:44

问题


I've been trying to create PL/SQL packages and running procedures on a local installation of Oracle 11gR2 on my computer, and I kept getting ORA-00900 error. Based on this article, it seems like Procedural Option has not been not installed.

This is the output of sqlplus when I logged in:

C:\Users\NgCH>sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 14 13:11:34 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter user-name: system@orcl
Enter password:

Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production

SQL>

How can I install it? If I've to reinstall Oracle, what are the options I must choose in the installer? I chosen Enterprise Edition, Desktop Class.

Thanks.

Edit:

This is very simple package code I tried to execute in DBeavor (64-bit) v2.0.6, to a local Oracle database with Oracle thin connection:

CREATE OR REPLACE PACKAGE TEST AS

hello_world constant varchar(20) := 'hello world';

END TEST;

Error from DBeavor:

Error occurred during SQL query execution

Reason:
SQL Error [900] [42000]: ORA-00900: invalid SQL statement

回答1:


I've followed the advice in the comments and learnt that my problem isn't with my Oracle database installation at all.

I was using DBeaver while attempting to run some pl/sql script, and for some reason I don't know it failed with the ORA-00900. After posting the question I ran the same script in Toad for Oracle, and it works without any problem. Running the same script in SQL Plus also works okay.

I don't know what causes the error in DBeaver yet, but at least now I know the error code ORA-00900 does not mean my database is missing any Procedural Option function. In hindsight I probably should have tested my script in SQL Plus first before posting the question.

Anyway, thanks for the comments guys, it really helped me tons.




回答2:


DBeaver cannot execute PL/SQL as they view it as Oracle specific, which it is. This may be implemented some time in the future.



来源:https://stackoverflow.com/questions/14868229/how-to-install-procedural-option-in-oracle-11gr2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!