Q
Problem solve Get help with specific problems with your technologies, process and projects.

SQL*Plus not working after Oracle 10g installation

I have successfully installed Oracle 10g on Linux Enterprise Edition 4 but after that the SQL*Plus command is not working.

I have successfully installed Oracle 10g on Linux Enterprise Edition 4 but after that the SQL*Plus command is not working. After I execute SQL*Plus I get a message that says no such command exists so that I am not getting the SQL prompt.

This generally indicates that your $ORACLE_HOME environment variable is not set so the sqlplus executable cannot...

be found. What you need to do before you create a new database is the following:

Edit /etc/oratab with the SID of the database you are going to create

Either run oraenv interactively to set your environment, or set it to run in your .profile when you log in. If you have more than one database on this server, it is preferable to run oraenv interactively.

The oraenv file gets copied to /usr/local/bin during an installation or Oracle software. This is so it can be executed without $ORACLE_HOME being set. To run oraenv …

. oraenv

It will ask you for a SID which you type in. Oraenv will then use the information in /etc/oratab to set the appropriate $ORACLE_HOME variable for that SID. After oraenv is run successfully, you should be able to see $ORACLE_HOME set:

echo $ORACLE_HOME

For more information on how to set up your environment refer to the Oracle Database 10g Release 2 (10.2) Administrator's Reference for UNIX-Based Operating Systems.

This should return the path where the Oracle software has been installed for that SID or database. You should now be able to run SQL*Plus. Remember that this setting is session-specific, so if you open another session to this server, you must run oraenv again.

Dig Deeper on Oracle database installation, upgrades and patches

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close