本帖最后由 firemail 于 2016-12-3 11:57 编辑
首先,我们必须有下面步准备: 1.安装好Oracle 2.安装好PLSQL developer 选择:Net Configuration Assistant(红色框所指)1.配置监听程序
a.添加监听程序名称:LISTENER
选定协议:TCP
默认1521端口
启用此监听程序
b.本地Net服务名配置
添加服务名: orcl
协议:TCP
主机名 localhost 端口 1521
测试连接
添加网络服务名: netOrcl
可以在你oracle安装目录,我的是:F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN 找到文件:tnsnames.ora - # tnsnames.ora Network Configuration File: F:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
- # Generated by Oracle configuration tools.
- ORACT =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
- )
- (CONNECT_DATA =
- (SERVICE_NAME = oract)
- )
- )
- EXTPROC_CONNECTION_DATA =
- (DESCRIPTION =
- (ADDRESS_LIST =
- (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
- )
- (CONNECT_DATA =
- (SID = PLSExtProc)
- (PRESENTATION = RO)
- )
- )
复制代码 可以看到,刚才配置的信息在这里可以找到。
|