Oracle11g OEM cannot connect to the database instance solution, oracle11goem

Source: Internet
Author: User

Oracle11g OEM cannot connect to the database instance solution, oracle11goem

My computer is 32-bitWin7 family EditionSystem, can such a system be installed with oracle? Yes! An error may occur. When installing oracle, everyone encounters different problems. Some people have dual systems, and some others have redone the system,First let the computer disconnect the network (wireless or wired) and then install oracle (it is said that oracle will remember the network configuration at that time, and the next time the boot environment has changed, it will not be able to connect, but I don't think it is very relevant, I installed it twice, connected to the network once, and disconnected once, and the results were the same, so I could not connect to the database instance)After I have installed it according to the tutorial,You can enable OEM immediately, but cannot connect to the database instance the next time you start the system !!! It's easy to use at the beginning. It's not easy to use next time !! But cannot open the OEM, SQLDeveloper do not want to open it!After a week, I solved the problem one day before I made up my mind to install the dual system. Now, I want to solve the problem as follows. I hope more Chinese people can install oracle smoothly and take the first step.

Enterprise Manager cannot connect to the database instance !!


ORA-12505: TNS: The Listener currently cannot identify the SID in the connection Descriptor and other error Solutions

1. Check the database client File:

/App/oracle/product/11.2.0/dbhome_1/network/admin/listener. ora is your oracle installation directory.

My listener. ora is as follows:
# Listener. ora Network Configuration File: C: \ myoracle \ think \ product \ 11.2.0 \ dbhome_2 \ network \ admin \ listener. ora
# Generated by Oracle configuration tools.


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C: \ myoracle \ think \ product \ 11.2.0 \ dbhome_2)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS = ONLY: C: \ myoracle \ think \ product \ 11.2.0 \ dbhome_2 \ bin \ lrlr11.dll ")
)
)


LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521 ))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521 ))
)
)


ADR_BASE_LISTENER = C: \ myoracle \ think

The HOST marked in red is a special note. It is your computer name and cannot be simply written as localhost. If you are not sure about the computer name, you can use the dba to log on to sqlplus.
Select HOST_NAME from v $ instance statement to query the host name.

Pay attention to the usage when logging on to sqlplus

Sqlplus username/passwordLog on to the local database without the listener process and start the database instance. This command is not useful because ome cannot be opened.
Sqlplus username/password @ tnsnameThe listener process is required. The most common remote logon mode is to start the database instance and listener process. Not easy to use


Change localhost to THINK-THINK as shown in. If you do not have the modification permission and cannot save it, copy it to disk D and modify it. Then copy it back.

2. Modify./app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames. ora

My tnsnames. ora is as follows:

# Tnsnames. ora Network Configuration File: C: \ myoracle \ think \ product \ 11.2.0 \ dbhome_2 \ network \ admin \ tnsnames. ora
# Generated by Oracle configuration tools.


NEWDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP )(HOST = localhost) (PORT = 1521 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = newdb)
)
)


Export lr_connection_data =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521 ))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

You can also change it to the host name. newdb is the SID Name of my database.

3. Restart the listener.

Run cmd as the administrator. Enter cmd search in the Start Menu. Right-click the result and run cmd as the administrator.

Enter

Lsnrctl stop

Enter

Lsnrctl start


After the listener is restarted, the configuration just now takes effect,Note that you need to run these two commands each time you start the system,Lsnrctl stop lsnrctl start can enable OEM and SQLDevloper. No way, otherwise, you cannot connect to the instance every time, but you only need to change the configuration file once!


Successful! Sahua

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.