sqlserver2005如何使用servername=localhost登录

zm1313 2008-09-17 11:55:05
sqlserver2000可以使用localhost或127.0.0.1登录, 但sqlserver2005 就只能用servername = 本机名登录, 使用localhost 提示服务名不存在?
...全文
397 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
fcuandy 2008-09-17
  • 打赏
  • 举报
回复
1,c:\WINDOWS\system32\drivers\etc\hosts
文件里有没有 对 127.0.0.1 localhost 的项目.
2,有的话,注意端口或实例名
utpcb 2008-09-17
  • 打赏
  • 举报
回复
你服务启动没有啊! 还有是不是有多个SQL实例 是的话请加上实例名
青锋-SS 2008-09-17
  • 打赏
  • 举报
回复
[Quote=引用楼主 zm1313 的帖子:]
sqlserver2000可以使用localhost或127.0.0.1登录, 但sqlserver2005 就只能用servername = 本机名登录, 使用localhost 提示服务名不存在?
[/Quote]200上用localhst也不可以吧.据我的测试,用
.
或者
(local)
都可以
utpcb 2008-09-17
  • 打赏
  • 举报
回复
localhost 2005 也是可以的!我试过
青锋-SS 2008-09-17
  • 打赏
  • 举报
回复
(local)
utpcb 2008-09-17
  • 打赏
  • 举报
回复
. 或127.0.0.1都可以啊
ChinaJiaBing 2008-09-17
  • 打赏
  • 举报
回复

试试.+实例名
青锋-SS 2008-09-17
  • 打赏
  • 举报
回复
用.试试
cyc_cheng 2008-09-17
  • 打赏
  • 举报
回复
用实例名多好了
zm1313 2008-09-17
  • 打赏
  • 举报
回复
用. 与(local) 好使, 机器上原先是装的2000, 卸载后装的2005,实例名都是机器名, hosts文件内容如下
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

# *********以下内容为360安全卫士为免疫机器狗木马病毒所添加******************
# *********结束******************

34,838

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧