Test environment: Oracle Enterprise Linux 64-bit (5.8 version) + Oracle 11g 64-bit
Description: The oracle11g64-bit software is installed at/u01/app/oracle/product/11.2.0/dbhome_1, the database name is the default Orcl,linux the IP of the virtual machine is set to 192.168.1.121
I. Modify the contents of the Listener.ora file
command: [[email protected] ~]$ Vi/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Content:
Sid_list_listener=
(sid_list=
(sid_desc=
(Global_dbname= ORCL)
(oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME=ORCL)
)
)
Listener= (description= (address= (protocol=tcp) (host=192.168.1.121) (port=1521)))
Adr_base_listener =/u01/app/oracle
Ii. Modify the contents of the Tnsnames.ora file
command: [[email protected] ~]$ Vi/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
Content:
ORCL =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.121) (PORT = 1521))
)
(Connect_data =
(SID = ORCL)
)
)
Third, start monitoring and update the registration
command: [[email protected] ~]$ lsnrctl start
Output:
Lsnrctl for linux:version 11.2.0.1.0-production on 13-may-2014 10:13:32
Copyright (c) 1991, Oracle. All rights reserved.
Starting/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr:please wait ...
Tnslsnr for Linux:version 11.2.0.1.0-production
System parameter File Is/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages Written To/u01/app/oracle/diag/tnslsnr/gpdb/listener/alert/log.xml
Listening on: (Description= (Address= (protocol=tcp) (host=192.168.1.121) (port=1521)))
Connecting to (Description= (address= (protocol=tcp) (host=192.168.1.121) (port=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 11.2.0.1.0-production
Start Date 13-may-2014 10:13:32
Uptime 0 days 0 hr. 0 min. 0 sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File/u01/app/oracle/diag/tnslsnr/gpdb/listener/alert/log.xml
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (host=192.168.1.121) (port=1521)))
Services Summary ...
Service "ORCL" has 1 instance (s).
Instance "ORCL", status UNKNOWN, have 1 handler (s) for the This service ...
The command completed successfully
command: [[email protected] ~]$ Sqlplus/as SYSDBA
Sql> Startup
Sql> alter system register;
Sql> quit
[Email protected] ~]$ lsnrctl status
Output:
Lsnrctl for linux:version 11.2.0.1.0-production on 13-may-2014 10:19:18
Copyright (c) 1991, Oracle. All rights reserved.
Connecting to (Description= (address= (protocol=tcp) (host=192.168.1.121) (port=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 11.2.0.1.0-production
Start Date 13-may-2014 10:13:32
Uptime 0 days 0 hr. 5 min. sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Listener Parameter File/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File/u01/app/oracle/diag/tnslsnr/gpdb/listener/alert/log.xml
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (host=192.168.1.121) (port=1521)))
Services Summary ...
Service "ORCL" has 2 instance (s).
Instance "ORCL", status UNKNOWN, have 1 handler (s) for the This service ...
Instance "ORCL", status ready, have 1 handler (s) for the This service ...
Service "Orclxdb" has 1 instance (s).
Instance "ORCL", status ready, have 1 handler (s) for the This service ...
The command completed successfully
[Email protected] ~]$
Iv. test steps under Windows
1> Direct test with dos command
Command: C:\Documents and settings\administrator>tnsping 192.168.1.121
Output:
TNS Ping Utility for 32-bit windows:version 11.1.0.7.0-production on 13-may-2
014 10:25:27
Copyright (c) 1997, the Oracle. All rights reserved.
Used parameter files:
C:\Program files\oracle\instant Client\bin\sqlnet.ora
Used Ezconnect Adapter to resolve the alias
Attempting to contact (description= (connect_data= (service_name=)) (Address= (PROTO
COL=TCP) (host=192.168.1.121) (port=1521)))
OK (0 msec)
C:\Documents and Settings\administrator>
2> use Plsqldev.exe test, modify C:\Program files\oracle\instant Client\bin\tnsnames.ora file, add connection content to virtual machine Oracle
gpdb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.121) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = ORCL)
)
)
Running plsql, using SYS user login successful