Excerpt 1
1. Use the Oracle Net manager tool
(1) Open Oracle Net Manager
(2) Add "service name"
Step 1. net service name: enter any name
Step 2 Communication Protocol: If you connect to Oracle on a remote machine, select TCP/IP (Internet Protocol)
Step 3. Host Name: Enter the IP address and port number. The default value is 1521.
Step 4 Sid: generally the same name as the database
Step 5 Test
(3) Start the PL/SQL connection
2. directly modify the configuration file:
(1) Open Directory D: file tnsnames. ora in Oracle installation directory ora92networkadmin.
(2) Add the following code:
Traffic_db = # net service name, which can be any
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.1.143) (Port = 1521) # host is the IP address of the connected database server, port is the terminal number of the connected database server, the default value is 1521.
)
(CONNECT_DATA =
(SID = carsys) # Database System ID, which is generally the same as the database name
)
)
(3) Save the file. Start the PL/SQL tool to log on.
Excerpt 2
In the local transname. ora file, configure TNS of the remote server and access the remote server by the server name mapped by TNS.
Add the following code to the/Oracle/ora92/Network/Admin directory where oracle is installed: tnsnames. ora
Test =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 222.22.22.22) (Port = 1521) // write the remote IP Address
)
(CONNECT_DATA =
(SERVICE_NAME = ora9) // write the remote service name
)
)
Excerpt 3
Using PLSQL developer to connect to a remote ORACLE database is roughly divided into two steps.
(1) create a new database in Oracle Enterprise Manager (OEM), that is, click to add the database to the database on the database tree map. Ask the remote data to get the host name (I used to write the IP address of the remote machine); the port number I used previously used is the default 1521 is not modified; the SID should ask what the remote is, (sometimes in tnsnames. in the ora script, the SID is changed to SERVICE_NAME. I am not very clear about the specific reason. The main reason is whether the remote database of the other party uses Sid or SERVICE_NAME ?); The final network service name is automatically generated without manual modification.
(2) In databaselink, the last and third item in the tree list on the left side of PLSQL developer, create a new one. You can set the name by yourself. The username and password must be provided by the other party and written in. The database must be the Database Name of the other party. If you use that server and database, you can check the public information. If it is a project, check whether it is public or not. Click Apply.
Then you can select * from a table name in the remote database @ dblink, and test whether the data can be viewed.