Get the App
SLTechnology News&Howtos  ›  Database  › 

How to configure remote access in Oracle

Shulou Source: shulou.com Published: 2022-05-31 23:12:27 10月01日 Update

How do I configure remote access in Oracle? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

1. Network snooping 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

For more than one IP, it is 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 = (PROTOCOL = IPC) (KEY = EXTPROC1521))) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO)) LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))

For more than one IP, it is 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 starting.

OracleOraDb11g_homeTNSListenerOracleService*

Client configuration

1. Download the ODAC package.

two。 Extract the downloaded ODAC package.

3. Execute installation command

Example:

Install.bat all D:\ Program\ ODAC\ 12040x64 OracleHome true

4. Add environment variabl

ORACLE_HOME: is the directory where ODAC is installed.

TNS_ADMIN: the directory where the file tnsnames.ora is located, usually in network\ admin under the ODAC installation directory.

Note: TNS_ADMIN can be directly copied to the ODAC installation directory without adding the tnsnames.ora file.

Add% ORACLE_HOME% to the PATH environment variable.

5. Configure TNS

Add to the configuration file tnsnames.ora

DBORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST =) (PORT = 1521)) CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =)

Description:

The IP or computer name of the database computer

: name of the database TNS configuration

After reading the above, have you mastered how to configure remote access in Oracle? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: Configuration directory file content variable multiple data database method more environment problem service helpless for this no reason name command customer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Technology Microsoft Redmi Shulou Information