Open the oracle installation directory and find the tnsnames file. ora file, usually in the path D: \ oracle \ product \ 10.2.0 \ db_1 \ network \ admin (oracle 10g) oracle11g also creates the following configuration in a directory similar to netword \ admin: You can copy and modify the configuration by default. ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = E1KO2ZD950PMTFH) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl ))) description of parameters for www.2cto.com: HOST = oracle Server HOST Name or IP address Port = Port number SERVICE_NAME = oracle Instance name (Database Name) or SID = Instance name and the following are the parameters: BSY2-PWC-IP50 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.30.50) (PORT = 1521) (CONNECT_DATA = (SID = orcl ))) PLSQL login is display name: BSY2-PWC-IP50 address is: 192.168.30.50 port: 1521 link SID: ord
Author's code