ORACLE: Configure database connection
// Database configuration file directory
E: \ oracle \ ora92 \ Network \ admin \ tnsnames. ora
(Database name)
Fwmsdb =
(Description =
(Address_list = Server IP Address
(Address = (Protocol = TCP) (host = 10.10.6.40) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = oracledb)
)
)
II.
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 the tnsnames. ora file in Directory D: \ oracle installation directory \ ora92 \ Network \ admin.
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.
Extracted from: http://blog.csai.cn/user1/19399/archives/2008/29696.html
# Tnsnames. ora network configuration file: F: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ Network \ admin \ tnsnames. ora
# Generated by Oracle configuration tools.
Qis_dev =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 192.168.0.8) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = QIS)
)
)
QIS =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = localhost) (Port = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = QIS)
)
)
Export lr_connection_data =
(Description =
(Address_list =
(Address = (Protocol = IPC) (Key = extproc1521 ))
)
(CONNECT_DATA =
(SID = clrextproc)
(Presentation = Ro)
)
)