标签:des style blog color io os 使用 strong 文件
myorcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.130.100)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
localhost=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
该文件的目的是为了在命令行登陆时解析访问地址,pl/sql也会默认读取该文件来连接。myorcl即为一个别名,后面命令行中使用的就是它,可定义多个。
3、命令行登陆的两种方式,(登陆本机和登陆远程都一样):
sqlplus username/password@[tnsnames.ora文件中已经定义的别名]--后面不要加分号
① sqlplus /nolog--此时还没有登陆。后面不要加分号
②conn username/password@[tnsnames.ora文件中已经定义的别名]--后面不要加分号
标签:des style blog color io os 使用 strong 文件
原文地址:http://www.cnblogs.com/tq03/p/3995139.html