发布网友 发布时间:2022-04-29 19:03
共2个回答
懂视网 时间:2022-04-29 23:24
关于plsql连接的教程有很多,其中最重要的就是D:oracleproduct10.2.0db_1 etworkADMIN下的listener和tnsnames两个文件。经过反复修改与测试,终于成功了。
Listener文件:
# listener.ora Network Configuration File: d:oracleproduct10.2.0db_1 etworkadminlistener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:oracleproduct10.2.0db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBANAME = orcl)
(ORACLE_HOME = D:oracleproduct10.2.0db_1)
(SID_NAME = ticelab)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = hitliyong)(PORT = 1521))
)
)
Tnsnames文件:
# tnsnames.ora Network Configuration File: C:oracleproduct10.2.0db_1 etworkadmin nsnames.ora
# Generated by Oracle configuration tools.
TICELAB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hitliyong)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ticelab)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
[Oracle]Plsql连接Oracle
标签:
热心网友 时间:2022-04-29 20:32
首先去下载oracleclient客户端工具
小编这里已经下载的有了,目录结构如下所示
打开PLSQL,点取消进去,然后弹出PLSQL主界面,找到菜单栏的tools选择属性preferences进去
弹出如下界面,配置oracleclient
配置好两个设置项,点apply,然后点ok,关闭PLSQL,重启PLSQL
上边的两个填写项就是第一步中的目录,以及目录下的一个文件
如下图所示,在哪个目录就对应的去找就可以了。
重启PLSQL进入到登录界面,输入相关信息,用户名密码,以及连接信息
连接信息:可以是ip:1521/实例名
也可以是network/admin目录下的tnsname.ora中配置的TNS别名。
连接进去成功之后
可以随便写一个语句查查,是否正常
select * from al;