Set CentOS to automatically start Oracle at startup

Source: Internet
Author: User

After the installation is complete (read the following link: Installing Oracle 10G R2 on CentOS 5.6), after you reactivate the instance, you will find that Oracle is not started on your own. This is normal, because Oracle Installation in Linux does not start on its own, you must set relevant parameters. First, we will introduce how to start Oracle:

Start Oracle in Linux
Log on to centos with a root account

Enable a terminal mode and enter:

Su-oracle

Operate with oracle permissions, and then enter:

Sqlplus "/as sysdba"
The original image will become
SQL>

Enter
Startup

The following error may occur:
ORA-01078: failure in processing system parameters
LRM-00109: cocould not open parameter file '/opt/oracle/product ~~~~ /Dbs/initorac. ora'
When these errors occur, it is because the correct SID is not switched,
In this case, enter exit to exit SQL>

Input echo $ ORACLE_SID to confirm what the current SID is. If it is built according to the previous file, the preset SID will be orcl, and then you can enter

Export ORACLE_SID = orcl
Or
Oraenv
Enter the correct SID.

Enter
Sqlplus "/as sysdba"

Enter startup
You can start the database normally.

In addition, the command to stop a database is as follows:
Shutdown immediate

Check whether the Oracle DB listener is normal
You can return to Terminal Mode and enter:
Lsnrctl status (check whether the listener is started)
If it is not started, enter:
Lsnrctl start (the command to start the listener)

SQL> conn sys @ orcl as sysdba
Enter the password
Appears:
ORA-12154: TNS: cocould not resolve the connect identifier specified
Warning: You are no longer connected to ORACLE
You can execute the command first to see if it can communicate through the listener
Tnsping orac

Start emctl
In addition, we can also find that http://localhost.localdomain: 1158/em is currently no response, here to start another, the startup command is as follows:

Emctl start dbconsole
The execution of this command takes a long time. The execution result is as follows:

The next step is the important part of establishing a system to start oracle on its own:

  • 1
  • 2
  • 3
  • Next Page

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.