解压安装PL/SQL。首次不登录,点击cencel进入PL界面
点击Tools–>preference–>配置Oracle Home 和OCI library
其中Oracle Home路径匹配到tnsnames.ora文件夹,OCI library匹配到oci.dll文件
配置tnsnames.ora文件如下:
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)
)
)
最后当登录窗口多了Connect as 下拉选框,说明配置成功
输入用户密码,和数据库名,数据库名必须与tnsnames.ora文件中配置的数据库名一致。如上配置的ORCL