To connect to a remote database, the traditional feasible method is to install an oracle database locally, then use the "NetworkConfigurationAssistant" configuration, and then use PLSQLDev to connect, because the database needs to be installed locally, so it is not very convenient to introduce another method below 1. First, go to the oracle official website to download the three required compressed packages
To connect to a remote database, the traditional feasible method is to install an oracle database locally, use "Network Configuration Assistant" for Configuration, and then connect to the database using PL/SQL Dev, because the database needs to be installed locally, it is not very convenient to introduce another method 1. First download three required compressed packages on the oracle Official Website
To connect to a remote database, the traditional feasible method is to install an oracle database locally, use "Network Configuration Assistant" for Configuration, and then connect to the database using PL/SQL Dev, it is not convenient to install the database locally.
The following describes another method.
1. First download three required packages from the oracle official website.
The address is: http://www.oracle.com/technetwork/topics/winsoft-085727.html
Required packages:
Instantclient-basic-nt-12.1.0.1.0.zip
Instantclient-odbc-nt-12.1.0.1.0.zip
Instantclient-sqlplus-nt-12.1.0.1.0.zip
Download PLSQL Developer
Decompress all downloaded installation packages and place them in the same directory, for example, in D: \ oracle
2. "Control Panel"-"System"-"advanced"-"environment variables"-"system variables" add several environment variables:
NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK (or AMERICAN_AMERICA.ZHS16GBK)
TNS_ADMIN = D: \ oracle
LD_LIBRARY_PATH = D: \ oracle
SQLPATH = D: \ oracle
Add D: \ oracle at the end of Path variable
3. Create tnsnames under D: \ oracle. configure the following code in the ora file. It is easy to write errors by yourself. We recommend that you copy the code to the directory where the oracle database is installed. If oracle is installed on your computer, the Directory of this file is under D: \ Oracle \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN. This is my directory.
# tnsnames.ora Network Configuration File: D:\Oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora# Generated by Oracle configuration tools.LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
In the preceding file, ORCL is a connection identifier and can be modified by yourself. The HOST is the address of the remote Oracle Server, and the PORT is the service PORT of Oracle. If it has not been modified, the default value is 1521. Service_name is the name of the remote instance. You can modify it directly or add a new piece of code, as shown below:
zyback= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.88)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = zyback) ) )
4. Run odbc_install.exe in the d: \ oracledirectory to install the ODBC driver.
5. Configure the PLSQL Developer client,
Disable and restart PLSQL Developer, and enter the user, password, and database,
In this way, you can remotely access the oracle database in other places.