时间:2021-07-01 10:21:17 帮助过:19人阅读
3、连接信息 1)连接信息:可以是ip:1521/实例名 (例:192.168.0.1:1521/test) 2)也可以是network/admin目录下的tnsname.ora中配置的TNS别名 打开安装目录下—— instantclient_12_2\network\admin\tnsnames.ora文件 编辑:
# 本地Oracle数据库
TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-8BJ7RH7)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
# 在线Oracle数据库
TEST2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
需要另存为——》替换原文件
4、测试
登陆成功后 ——》新建sql ——》select * from dual;
执行看看,是否正常
PLSQL连接oracle数据库
标签:http strong png inf tcl 属性 serve 登陆 执行