Server-side configuration
If you do not want to write it yourself, you can configure it through Net Manager .
The following configuration file is localhost
changed to an ip
address, otherwise, the remote cannot be accessed.
1. Network Monitoring Configuration
# listener.ora Network Configuration File: C:\app\Administrator\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:\app\Administrator\product\11.2.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\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:\app\Administrator
Multiple IPs, as follows:
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.226.2)(PORT = 1521)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.226.3)(PORT = 1521)) ) )
2.TNS Configuration
# tnsnames.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora# Generated by Oracle configuration tools.ORCL= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
Multiple IPs, as follows:
ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.226.2)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 172.24.226.3)(PORT = 1521)) ) (SOURCE_ROUTE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
3. Stop and start the service
Stop the following services before you start.
- Oracleoradb11g_hometnslistener
- oracleservice*
Client Configuration
1. Download the ODAC
compressed package.
2. Unzip the downloaded ODAC
compressed package.
3. Execute the Install command
Example:
install.bat all D:\Program\ODAC\112040x64 OracleHome true
4. Add Environment variables
- oracle_home : is
ODAC
the installed directory.
- tns_admin : is
tnsnames.ora
the directory where the files are located, typically ODAC
in the installation directory network\admin
.
Note: Tns_admin can be copied directly to the tnsnames.ora
ODAC
installation directory without adding it.
will be %ORACLE_HOME%
added to the PATH
environment variable.
5. Configure TNS
In the configuration file tnsnames.ora
, add
DBORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = <db-host>)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <db-name>) ) )
Description
- <db-host>: IP or computer name of the database computer
- <db-name>: Name of the database TNS configuration
Oracle Remote Access configuration