Oracle Installation and basic configuration

Source: Internet
Author: User

Recently, I want to create an oracle-based job. The following describes how to install the server and client versions and common problems.

    • On the Oracle official website, I found an 11 GB address and downloaded Database 11 to familiarize myself with Oracle as soon as possible.GQuick Edition

After installationProgramMenu

 

It seems that this version is really for beginners. Click the "getting started" menu item. Here, you can perform database-related management operations through the Management page, such as creating databases and managing users.

    • To get familiar with Oracle enterprise applications, I found a 10 Gb Oracle version, including the Oracle client.

However, for developers, these two versions of the so-called client, namely SQL plus, operate on the database in the command line mode.

For those who are familiar with SQL Server, it is inconvenient to find the corresponding pl SQL developer. This software has a graphical interface.

    • In this installation and operation process, encountered a problem, Oracle client connection, always reported "ORA-12541: TNS: No listener program" error, found the relevant information for the following reasons:

1) The listening service is not started successfully.

2) The listening instance and the client connect to the instance port are inconsistent,

Solution 1:

1) First, go to the CMD command line window through the command line. Before that, you need to configure the environment variables (For details, refer to the Oracle environment variable configuration at the end) and listen to the service to start LSNRCTL start, during startup, You can see whether an exception exists.

The normal situation is as follows:

 

Otherwise, check the corresponding configuration file.

View oracle \ product \ 10.1.0 \ db_1 \ Network \ admin \ listener. ora

# Listener. ora network configuration file: D: \ oracle \ product \ 10.1.0 \ db_1 \ Network \ admin \ listener. ora

# Generated by Oracle configuration tools.

Sid_list_listener =

(Sid_list =

(Sid_desc =

(Sid_name = plsextproc)

(ORACLE_HOME = D: \ oracle \ product \ 10.1.0 \ db_1)

(Program = EXTPROC)

)

)

Listener =

(Description_list =

(Description =

(Address_list =

(Address = (Protocol = IPC) (Key = EXTPROC ))

)

(Address_list =

(Address = (Protocol = TCP) (host = machine name) (Port = 1521 ))

)

)

)

(Address = (Protocol = TCP) (host = machine name) (Port = 1521 ))

Change to (address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 ))

127.0.0.1: indicates the actual server address. Because it is currently tested locally, the IP address representing the local machine is used.

2) view oracle \ product \ 10.1.0 \ db_1 \ Network \ admin \ tnsnames. ora

Find the following statement:

Orcl =

(Description =

(Address_list =

(Address = (Protocol = TCP) (host = machine name) (Port = 1521 ))

)

(CONNECT_DATA =

(Server = dedicated)

(SERVICE_NAME = orcl)

)

)

(Address = (Protocol = TCP) (host = machine name) (Port = 1521 ))

Change to (address = (Protocol = TCP) (host = 127.0.0.1) (Port = 1521 ))

Step 3: after changing the configuration, restart the listener LSNRCTL stop (STOP) LSNRCTL start (start)

In this case, it is safe to configure the host as an IP address. In fact, both of them can be used,

If an exception occurs, you can switch to another server. If the server and client are not on the same server, you need to configure the client tnsnames. ora

Solution to the second situation

1) locate the customer service and server tnsnames. ora file and check whether the listening ports of each instance are consistent. If they are inconsistent, change

Listener_mydb =
(Address = (Protocol = TCP) (host = 127.0.0.1) (Port =1522))

Listener_orcl =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 127.0.0.1) (Port =1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

2) restart the listening service LSNRCTL start (start)

Oracle environment variable configuration

In the "my computer" Property Window, "advanced"-"" environment variables ", in the" System variables "column, select path, edit row, and add D: \ oracle \ product \ 10.2.0 \ db_1 \ bin is the installation directory, which is also the directory where the SQL plus command is located

If ORACLE_HOME and oracle_sid cannot be found in the "variables" column under the "system variables" list box, you need to set these two environment variables. You can click the new button, enter "ORACLE_HOME" in the "variable name" text box, and enter the path of the Oracle installation directory in the "variable value" text box, such as D: \ oracle \ product \ 10.2.0 \ db_1, and then click OK. Similarly, click "new", enter "oracle_sid" in the "variable name" text box, and enter "orcl" in the "variable value" text box ", this is the database instance name (the Instance name here is the same as the database name), and then click "OK"

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.