在连接登录过程中出现ora-12154:tns:could not resolve the connect错误,环境变量没有问题,此时在oracle配置文件tnsnames.ora中查看是否多一个空格,发现在配置过程中第一行中多了一个空格,导致出现这种错误。