How to install Procedural Option in Oracle 11gr2 - oracle

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

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.

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

Related

SQL*Plus does not open anymore - Oracle Database 18c Express Edition

I have been using Oracle 18c since March for my college classes. I have always worked using SQLplus. The issue now is that I cannot start SQL*Plus when I tried to start it 2 days before.
When I try to launch it, it opens and closes in less than a second. I tried to open sqlplus via command prompt, but it shows an error saying:
Error 57 initializing SQL*Plus Error loading message shared library
I have no clue what went wrong so I thought re-installing the entire 18c product would solve something. Now that I go for uninstalling Oracle 18c, it shows an error message like shown here
Can someone please suggest me what is going wrong here? I would really like to have the SQLPlus working again like normally it would, so I can complete my DBMS projects.

Oracle Database 12c Installed, but no SQL developer showed up

I've been trying to use Oracle 12c and SQL Developer on a Virtual Machine running Oracle Linux for weeks now but the process gets worse and worse and this is the fifth time I do the same installation again.
I used oracle-rdbms-server-12cR1-preinstall for the preinstallation process, I also added the groups DBA, OPER, BACKUPDBA, DGDBA, KMDBA, and RACDBA.
I then used the./runInstaller file that comes with the Database and went through the installation process without any issues. But when the installation finished and I closed the installer, there is no trace of SQL Developer anywhere.
I'm not even sure if the Oracle Database was actually installed correctly, I've been running this command to see if it returns me anything in order to check if the database is actually installed but I don't know if i'm correct.
Don't give up. You can do it!
The daunting part of Oracle Database is that you are installing the exact same binaries for your learning environment as the largest bank on this planet has installed in their production environment! Oracle Database is a very sophisticated RDBMS and it takes years to learn it!
Oracle Database and SQL Developer
Oracle Database and SQL Developer are two separate products. You can download both from OTN and install them separately.
Database creation
Did you create a database (datafiles) while installing the binaries? There is a checkbox in the installer for that. You can create a database using the tool dbca (Database Creation Assistant) in the $ORACLE_HOME/bin folder.
Instance not running.
pmon is a vital process for the instance (processes + memory) which indicates it hasn't started. Check /etc/oratab if there is a database added to the file. If yes, fire up!
# set the environment
$. oraenv
ORCLDB
# login as sys and start the database
$sqlplus / as sysdba
SQL>startup
Best of luck!
Bjarte

v$version still showing 9i in sql developer after upgrade to 10g

I was working on Oracle 9i. I got it upgraded to 10g 3 hr. back. But when I query v$version to check the version in SQL Developer, it shows Oracle 9i.
Could you please let me know if I need to modify any settings in the SQL Developer tool to reflect the upgraded version?
Thanks,
Savitha
If you are referring to a client upgrade, you can get the Oracle Home being used by SQL Developer by clicking Help->About->Properties and checking the value for oracle.home. Usually the name of the Oracle Home will give you an indication of the version of Oracle that you are using. If not, navigate to the BIN directory in ORACLE HOME and execute sqlplus /nolog.

Oracle 10g express and 11g express DB homepage is not showing up

I just installed Oracle for the first time and the last step of the installer is to ask if I want to check the home page. I checked it, the browser opened a local website, but this website does not exists. So I am simply stuck here.
I tried 10g first, I uninstalled it and tried 11g. I always get a non-running webpage. I tried it because I saw in some answers that 10g was not supported by Windows 7 32 bits and that 11g was.
Each time, I checked if all the Oracle services were up and they are. I also checked if the port 8080 was used and it is not. Also, disabling the Windows firewall gives nothing.
I know nothing about Oracle so please give me some links if you are talking about Oracle specific things.
If you don't know the problem with the website, could you tell me which service is supposed to start the website and were is its logfile so that I could see the error?
Thanks
In a side note, in the project install guide, I am supposed to run "sqlplus system#xe" after Oracle is installed. When I do it, I have to enter the password and then I get "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor". Each questions about that error was about "it worked fine for a week and now no more" which is clearly not my situation, so this is not my question, just a side note.
One of my teammate found the answer. The problem was in the installation and here is what worked:
Warning for Windows7 only:
Oracle 10g installation on windows 7
32-bit completes without error but it is incomplete. In order to fix
the problem, before installing Oracle, shut down your PC, unplug your
network cable, boot your PC and install Oracle (not a joke), and
reconnect only after the installation of Oracle 10g.
That is weird, but it worked
NOTE----This method doesn't worked with 11g express R2 . (ofcourse i am talking of windows 7)
Try this:
1) First, make sure it's running. It sounds like it is from the error message you got in step 2, but double check that the Services (OracleServiceXE and OracleXETNSListener) are both started. Those are the only two services you need, and it does sound like the OracleServiceXE may not be running.
2) Make sure it's not running on a non-8080 port. From a command prompt, run netstat -an and see if anything is listening on port 8080. I've seen it get installed on alternate ports (including 9080) in the past.
3) If there's something listening on port 8080, try http://localhost:8080/ in your browser. If there's something on 9080, try that.
I too faced the same issue and fixed by following the below steps.
go to your Oracle XE 10g console using sqlplus. Replace mypassword with that your SYS user password (as specified during the installation process). Note that the number 2, 3, 4 at the left side is generated by the sqlplus tools prompt (you don't need to type them in).
[sourcecode lang="sql"]
C:\> sqlplus sys/mypassword#xe as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 18 17:53:47 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> begin
2 dbms_xdb.sethttpport('8484');
3 end;
4 /
[/sourcecode]
Oracle XE should reply:
[sourcecode lang="sql"]
PL/SQL procedure successfully completed.
[/sourcecode]
After that check to ensure that the configuration has been changed properly:
[sourcecode lang="sql"]
SQL> select dbms_xdb.gethttpport as "HTTP-Port is " from dual;
[/sourcecode]
You should get a message like this:
[sourcecode lang="sql"]
HTTP-Port is
------------
8484
[/sourcecode]
Exit from sqlplus by typing "exit" at the prompt.
Now restart the PC and check.e same issue.

I have problem to connect oracle DB with SQL developer

I try connect to my oracle db with oracle SQL developer and received that message:
pic (pictures 1 and 2)
if i try connect with sql plus, all well.
command : select userenv('LANGUAGE') from dual;
result:
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> select userenv('LANGUAGE') from dual;
*USERENV('LANGUAGE')
----------------------------------------------------
RUSSIAN_RUSSIA.CL8MSWIN1251*
in SQL DEVELOPER:
(picture 3)
check\uncheck "Skip NLS Settings", nothing changed.
what the issue is?
I've seen this problem before in an installation with Oracle 10g on AIX. The problem was that NLS files weren't accessible due to wrong file protection.
The problem is most likely not with SQL Developer but on the server side. When you log in, the server will always try to set regional settings that match the one on your client. That's when the error occurs because the required files aren't accessible.
If you haven't already I think it might be worth asking this question in the OTN SQL Developer Forum
I suspect you installed the Western European edition instead of the Universal. If that's not the case, post the file list from the nls/data directory.

Resources