Linux oracle-Run Sqlplus issues (ORA-01031, ORA-12162, sp2-0667, sp2-0750, ORA-01034) and start listening, instance, and test retrieval SELECT statements

Source: Internet
Author: User
Tags sqlplus

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.