关于Oracle客户端运行SQLPlus.exe
1、tnsnames.ora文件定义了别名ORCL243(F:\app\guoshaoyue\product\11.2.0\client_1\network\admin\tnsnames.ora):
# tnsnames.ora Network Configuration File: f:\app\guoshaoyue\product\11.2.0\client_1\NETWORK\ADMIN\tnsnames.ora # Generated by Oracle configuration tools. ORCL242 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.99.242)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL) ) ) ORCL243 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.18.99.243)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ORCLBAK) ) )
2、运行SQLPlus.exe(F:\app\guoshaoyue\product\11.2.0\client_1\BIN\sqlplus.exe)使用别名ORCL243和用户登录:
输入用户名(注意需要带上别名RCL243,以@符号为别名前缀):
![](https://img2022.cnblogs.com/blog/35434/202203/35434-20220322175501512-1512331520.png)
也可以用户名和密码一起输入(apps/jetsun@orcl243):
![](https://img2022.cnblogs.com/blog/35434/202203/35434-20220322175643502-1751409240.png)
退出SQLPLUS可以使用命令exit或者quit。