Oracle12c installation, connection, and usage

Source: Internet
Author: User
Tags time 0 oracle developer

Oracle12c installation, connection, and usage

1. oracle12c Installation

See the following link:

Http://www.bkjia.com/database/201503/380453.html

2. A ORA-12514 error occurred while connecting to the database.

For more information about the solution, see the following link:

Http://www.bkjia.com/database/201109/102826.html

1) Make sure that all basic Oracle services are started

OracleDBConsoleorcl

OracleOraDb11g_home1TNSListener

OracleServiceORCL

2) Open the command line, use sqlplus nokia_user/oracle@202.206.0.233/orcl command to log on to oracle, the display is as follows:

C: \ Documents ents and Settings \ Administrator> sqlplus nokia_user/oracle@202.206.0.233/orcl

SQL * Plus: Release 11.2.0.1.0 Production on Friday December 23 10:37:52 2011

Copyright (c) 1982,201 0, Oracle. All rights reserved.

ERROR:
ORA-12541: TNS: no listeners

Under ORA-12541: TNS: No listener error, a ORA-12541: TNS: No listener error will be prompted whether or not you log on locally

3) execute lsnrctl status in the command line

C: \ Documents ents and Settings \ Administrator> lsnrctl status

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0-Production on-2011 09:27:35

Copyright (c) 1991,201 0, Oracle. All rights reserved.

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521 )))
LISTENER STATUS
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0-Production
Start Date: 23-12-2011 09:17:19
Normal operation time: 0 days, 0 hours, 10 minutes, 16 seconds
Tracking level off
Security ON: Local OS Authentication
SNMP OFF
Listener parameter file C: \ Program_Files \ Oracle \ DataBase_11G_R2 \ product \ 11.2.0 \ dbhome_1 \ network \ admin \ listener. ora
Listener log file c: \ program_files \ oracle \ database_11g_r2 \ diag \ tnslsnr \ dbserver-7ec4a9 \ listener \ alert \ log. xml
Listener endpoint overview...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \\\ pipe \ EXTPROC1521ipc )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 127.0.0.1) (PORT = 1521 )))
Service summary ..
The Service "CLRExtProc" contains one instance.
Instance "CLRExtProc", status UNKNOWN, contains one handler of this service...
The Service "orcl" contains one instance.
Instance "orcl", status READY, contains 1 handler of this service...
The Service "orclXDB" contains one instance.
Instance "orcl", status READY, contains 1 handler of this service...
Command executed successfully

Here we can see the location of the listener parameter file

4) modify the listener parameter file

The content is as follows:

# listener.ora Network Configuration File: C:\Program_Files\Oracle\DataBase_11G_R2\product\11.2.0\dbhome_1\network\admin\listener.ora# Generated by Oracle configuration tools.SID_LIST_LISTENER =(SID_LIST =(SID_DESC =(SID_NAME = CLRExtProc)(ORACLE_HOME = C:\Program_Files\Oracle\DataBase_11G_R2\product\11.2.0\dbhome_1)(PROGRAM = extproc)(ENVS = "EXTPROC_DLLS=ONLY:C:\Program_Files\Oracle\DataBase_11G_R2\product\11.2.0\dbhome_1\bin\oraclr11.dll")))LISTENER =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521))))



ADR_BASE_LISTENER = C: \ Program_Files \ Oracle \ DataBase_11G_R2

To:

# listener.ora Network Configuration File: C:\Program_Files\Oracle\DataBase_11G_R2\product\11.2.0\dbhome_1\network\admin\listener.ora# Generated by Oracle configuration tools.SID_LIST_LISTENER =(SID_LIST =(SID_DESC =(SID_NAME = orcl)(ORACLE_HOME = C:\Program_Files\Oracle\DataBase_11G_R2\product\11.2.0\dbhome_1)#(PROGRAM = extproc)(ENVS = "EXTPROC_DLLS=ONLY:C:\Program_Files\Oracle\DataBase_11G_R2\product\11.2.0\dbhome_1\bin\oraclr11.dll")))LISTENER =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = IPC)(KEY = orcl))(ADDRESS = (PROTOCOL = TCP)(HOST =202.206.0.233)(PORT = 1521))))



ADR_BASE_LISTENER = C: \ Program_Files \ Oracle \ DataBase_11G_R2

SID_NAME, the KEY value is changed to the name of the oracle instance to be accessed, and the HOST is changed to the address used by the oracle server.

 

5) Restart listener and execute lsnrctl stop and lsnrctl start in the command line.

C: \ Documents ents and Settings \ Administrator> lsnrctl stop

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0-Production on-2011 09:46:17

Copyright (c) 1991,201 0, Oracle. All rights reserved.

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = orcl )))
TNS-12541: TNS: no listeners
TNS-12560: TNS: protocol adapter error.
TNS-00511: no listeners
32-bit Windows Error: 2: No such file or directory
Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 202.206.0.233) (PORT = 1521 )))
Command executed successfully

C: \ Documents ents and Settings \ Administrator> lsnrctl start

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0-Production on-2011 09:46:31

Copyright (c) 1991,201 0, Oracle. All rights reserved.

Start tnslsnr: Please wait...

TNSLSNR for 32-bit Windows: Version 11.2.0.1.0-Production
The system parameter file is C: \ Program_Files \ Oracle \ DataBase_11G_R2 \ product \ 11.2.0 \ dbhome_1 \ network \ admin \ listener. ora.
Write log information for c: \ program_files \ oracle \ database_11g_r2 \ diag \ tnslsnr \ dbserver-7ec4a9 \ listener \ alert \ log. xml
Listener: (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \. \ pipe \ orclipc )))
Listener: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 202.206.0.233) (PORT = 1521 )))

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = orcl )))
LISTENER STATUS
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0-Production
Start Date: 23-12-2011 09:46:34
Normal operation time 0 days 0 hours 0 minutes 3 seconds
Tracking level off
Security ON: Local OS Authentication
SNMP OFF
Listener parameter file C: \ Program_Files \ Oracle \ DataBase_11G_R2 \ product \ 11.2.0 \ dbhome_1 \ network \ admin \ listener. ora
Listener log file c: \ program_files \ oracle \ database_11g_r2 \ diag \ tnslsnr \ dbserver-7ec4a9 \ listener \ alert \ log. xml
Listener endpoint overview...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \. \ pipe \ orclipc )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 202.206.0.233) (PORT = 1521 )))
Service summary ..
The Service "orcl" contains one instance.
Instance "orcl", status UNKNOWN, contains 1 handler of this service...
Command executed successfully

6) Check the status of lsnrctl start

C: \ Documents ents and Settings \ Administrator> lsnrctl start

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0-Production on-2011 09:46:31

Copyright (c) 1991,201 0, Oracle. All rights reserved.

Start tnslsnr: Please wait...

TNSLSNR for 32-bit Windows: Version 11.2.0.1.0-Production
The system parameter file is C: \ Program_Files \ Oracle \ DataBase_11G_R2 \ product \ 11.2.0 \ dbhome_1 \ network \ admin \ listener. ora.
Write log information for c: \ program_files \ oracle \ database_11g_r2 \ diag \ tnslsnr \ dbserver-7ec4a9 \ listener \ alert \ log. xml
Listener: (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \. \ pipe \ orclipc )))
Listener: (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 202.206.0.233) (PORT = 1521 )))

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = orcl )))
LISTENER STATUS
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0-Production
Start Date: 23-12-2011 09:46:34
Normal operation time 0 days 0 hours 0 minutes 3 seconds
Tracking level off
Security ON: Local OS Authentication
SNMP OFF
Listener parameter file C: \ Program_Files \ Oracle \ DataBase_11G_R2 \ product \ 11.2.0 \ dbhome_1 \ network \ admin \ listener. ora
Listener log file c: \ program_files \ oracle \ database_11g_r2 \ diag \ tnslsnr \ dbserver-7ec4a9 \ listener \ alert \ log. xml
Listener endpoint overview...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \. \ pipe \ orclipc )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 202.206.0.233) (PORT = 1521 )))
Service summary ..
The Service "orcl" contains one instance.
Instance "orcl", status UNKNOWN, contains 1 handler of this service...
Command executed successfully

7) log on to sqlplus nokia_user/oracle@202.206.0.233/orcl again

C: \ Documents ents and Settings \ Administrator> sqlplus nokia_user/oracle@202.206.0.233/orcl

SQL * Plus: Release 11.2.0.1.0 Production on Friday December 23 11:06:28 2011

Copyright (c) 1982,201 0, Oracle. All rights reserved.


Connect:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

The above information indicates that the logon is successful.


3. If you want to use the VS attach skill, that is, the DDEX skill, you need to install

Oracle Developer Tools for Visual Studio xxxxxx component, which is found in Oracle search for ODT, for example, the software in the following link.

Http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

4. Create a DataSource In the TNS format:

In
Add tnsnames. ora under xx \ product \ 12.1.0 \ client_1 \ Network \ Admin. Example:

oracle12c =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 193.160.18.91)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = orcl)))

 

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.