Chen Kozhan-Welcome reprint, Reproduced Please indicate, thank you!
=====================
Newly installed oracle11g R2 data, this want to use Sql*plus test test, did not expect to appear the above picture problem:
Cause: There is no configuration environment variable (oracle_home=oracle install the home directory, that is, install the Oracle software location, Note-not the Oracle Base directory ).
Solution:
1. Setting temporary environment variables
Note: General Oracle_home=/u01/app/product/11.2.0/dbhome_1, but I did not pay attention when installing the main directory installed in product
Look, there's something coming out of the execution sqlplus-help.
Next we'll log in to a user to see
Another error (ORA-12162):
Cause: The problem with the environment variable is not specified oracle_sid.
Solution (Set TEMP environment variable): As with Oracle_home, execute export oracle_sid=oracl,oracl The instance name created when the database is installed.
How has appeared the mistake, after the notice, may discover, the authority is insufficient, originally is the login user is wrong.
OK, cut back to the Oracle user, and then execute the command:
Login Successful!
Write a SELECT Search statement, query the data table, another problem
It's annoying to report that Oracle is not available!
========================================================================================
Because I was a VMware-installed Oracle database, I suddenly remembered that I had reported an "IP" error during the installation, and then I looked at Listener.ora and Tnsnames.ora, and then I found the problem.
Listener.ora content:
Switch
Tnsnames.ora content:
Switch
=============================
1. Restart the Monitoring service
Found no, this time the boot monitoring service was successful!
2. Start the DB instance:
1). For Sqlplus
2). Connect to Sysdba
3). Start the DB instance
If not required, you can close the instance, execute the command: shut; Turn off listening, execute command: Lsnrctl stop
==================================================
Okay, let's write the Select Search statement, query the data table .
It finally worked!
Linux oracle-Run Sqlplus issues (ORA-01031, ORA-12162, sp2-0667, sp2-0750, ORA-01034) and start listening, instance, and test retrieval SELECT statements