(local)和“。”之间是否有区别?和本地主机? [英] Is there a difference between (local), '.' and localhost?

查看:95
本文介绍了(local)和“。”之间是否有区别?和本地主机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在与数据库进行本地编程连接时,我已经使用了所有这三种方法。它们之间有什么真正的区别?

I've used all three of these when making local programmatic connections to databases. Is there any real difference between them?

推荐答案

最终结果是相同的。区别在于:

The final result is the same. The difference is:


  • localhost在TCP / IP级别解析,相当于IP地址127.0.0.1

  • 取决于应用程序(local)可能只是 localhost的别名。在SQLServer中,(本地)和。表示连接将使用同一台机器中的命名管道(共享内存)协议进行(不需要通过TCP / IP堆栈)。

这是理论。实际上,如果您使用其中任何一种,我认为性能或功能都没有实质性差异。

That's the theory. In practice, I don't think there is substantial difference in performance or features if you use either one of them.

这篇关于(local)和“。”之间是否有区别?和本地主机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆