I have VS 2008 Professional Edition. After the installation (which included SQL Server 2008), I decided to install SQL Server 2008 Express Edition with Advanced Tools (so I could get SQL Server Management Studio on it). So I uninstalled the SQL Express that came with VS 2008, and installed the standalone SQL Server Express 2008 version with advanced tools.
我有VS 2008专业版。安装完成后(包括SQL Server 2008),我决定使用高级工具安装SQL Server 2008 Express Edition(这样我就可以在上面安装SQL Server Management Studio)。因此,我卸载了与VS 2008一起使用的SQL Express,并使用高级工具安装了独立的SQL Server Express 2008版本。
However, When I try to logon onto SQL Server Management Studio using:
但是,当我尝试使用:
.\SQLEXPRESS
as Server name and Windows Authentication as the authentication, I get the following message:
作为服务器名和Windows身份验证,我得到以下消息:
TITLE: Connect to Server ------------------------------ Cannot connect to .\SQLEXPRESS. ------------------------------ ADDITIONAL INFORMATION: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1) For help, click: http//go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------
Any suggestions on how to get it to work? I have tried disabling Windows Firewall as well and still no luck. I am using WIndows Vista and SQL Server 2008 Express SP1 Patch has also been applied recently.
关于如何让它工作有什么建议吗?我也尝试过禁用Windows防火墙,但还是没有成功。我正在使用WIndows Vista和SQL Server 2008 Express SP1补丁,最近也在使用。
FIX: For those interested: I did not have any of the Instance Based installation installed (i.e. the Database engine). I Installed the instance based stuff and it fixed it!
修正:对于那些感兴趣的人:我没有安装任何基于实例的安装(例如数据库引擎)。我安装了基于实例的东西,它修复了它!
8 个解决方案
#1
1
you can look for your instance name in SQL Server Configuration Manager. It is written between brackets after SQL Server service in the services list.
您可以在SQL Server Configuration Manager中查找实例名。它写在服务列表中的SQL Server服务后的括号中。
the . notation is correct and it's the same as (local)
的。表示法是正确的,和(局部)一样
#2
2
Start your Local SQL Server Service
启动本地SQL服务器服务
- Start SQL Config Manager: Click Start -> Microsoft SQL Server 2008 R2 -> SQL Server Configuration Manager
- 启动SQL配置管理器:单击Start -> Microsoft SQL Server 2008 R2 -> SQL Server配置管理器
- Start SQL Services: Set the SQL Server (SQLEXPRESS) and SQL Server Browser services to automatic start mode. Right-click each service -> Properties -> Go into the Service Tab
- 启动SQL服务:将SQL Server (SQLEXPRESS)和SQL Server浏览器服务设置为自动启动模式。右键单击每个服务——>属性——>进入service选项卡
This will ensure they start up again if you restart your computer. Please check to ensure the state is "Running" for both services.
这将确保它们在重新启动计算机时重新启动。请检查以确保两个服务的状态都在“运行”。
Login and authenticate with your Local SQL Server
使用本地SQL服务器登录并进行身份验证
- Now open up SQL Server Management Studio and click "Connect to Object Explorer" and select Server Name:
- 现在打开SQL Server Management Studio,点击“Connect to Object Explorer”,选择服务器名:
[Your PC name]\SQLEXPRESS
(你的电脑名字)\ SQLEXPRESS
Example: 8540P-KL\SQLEXPRESS or (localhost)\SQLEXPRESS
例子:8540 p-kl \ SQLEXPRESS \ SQLEXPRESS(localhost)
-
To find your PC name: Right click My Computer -> Properties -> Computer Name tab
要找到你的电脑名称:右击我的电脑->属性->电脑名称标签
-
Alternative: Login using windows authentication: Using the user name [Your Domain]/[Your User Name]
选择:使用windows身份验证登录:使用用户名[您的域]/[您的用户名]
Setup User Account
设置用户帐户
-
Create a new Login acct: In SQL Mgmt Studio -> Expand your local Server -> Security -> Right click on Logins -> New Login
创建一个新的登录acct:在SQL Mgmt工作室->扩展您的本地服务器->安全性->右键单击登录->新登录
-
Set Password settings on New User Account: Uncheck Enforce password policy, password expiration and user must change pw(Since this is local) Default database -> Your Database
设置新用户帐户的密码设置:取消检查执行密码策略,密码过期,用户必须更改pw(因为这是本地的)默认数据库——>您的数据库
-
Grant roles to New User Account: User Mapping Page -> Map to your db and grant db_owner role Status Page -> Grant Permission to connect and Enable Login
为新用户帐户授予角色:用户映射页面->映射到您的db并授予db_owner角色状态页面->授予连接和启用登录的权限
Setup Access Permissions/Settings for User
为用户设置访问权限/设置
- Enable all auth modes: Right click your Local Server -> Properties -> Security Tab -> Enable SQL Server and Windows Authentication Mode
- 启用所有auth模式:右键单击您的本地服务器—>属性—> Security选项卡—>启用SQL Server和Windows身份验证模式
- Enable TCP/IP: Open SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> Enable TCP/IP
- 启用TCP/IP: Open SQL Server Configuration Manager -> SQL Server Network Configuration ->协议用于SQLEXPRESS ->支持TCP/IP。
- Restart SQL Server Service: You will have to restart the SQL Server(SQLEXPRESS) after enabling TCP/IP
- 重新启动SQL Server服务:在启用TCP/IP之后,您必须重新启动SQL Server(SQLEXPRESS)
Database Properties File for Spring Project
Spring项目的数据库属性文件
-
database.url=jdbc:jtds:sqlserver://[local PC Computer
name];instance=SQLEXPRESS;DatabaseName=[db name];数据库。url=jdbc:jtds:sqlserver://[本地PC机名];instance=SQLEXPRESS;DatabaseName=[db name];
-
database.username=[Your user name] database.password=[Your password]
数据库。数据库用户名=(用户名)。密码=(密码)
-
database.driverClassName=net.sourceforge.jtds.jdbc.Driver
database.driverClassName = net.sourceforge.jtds.jdbc.Driver
If you want to view larger screen shots and better formatting of the answer with more details please view the blog article below: Setting up a Local Instance of SQL Server 2008 Blog Post:
如果您想查看更大的屏幕截图和更详细的答案格式,请查看下面的博客文章:设置SQL Server 2008 blog Post的本地实例:
#3
1
Did you try using (local)\SQLEXPRESS in the name? I've not seen that . notation before.
你试过用(local)\SQLEXPRESS这个名字吗?我没见过。符号。
#4
1
Scott,
斯科特,
I had to enable SQL Server Browser in services once I did that I was able to connect on My recent install.
我必须在服务中启用SQL Server浏览器,这样我才能在最近的安装中连接。
after that I only had to use the computer name as the server.
之后我只需要用计算机名作为服务器。
edit, while researching further on finding sql server browser, noted that reporting services, service showed its instance as .\computer name.
编辑,当进一步研究寻找sql server浏览器时,注意到报告服务,服务显示它的实例为.\计算机名。
try that as the server name.
尝试将其作为服务器名。
edit again change to backslash been playing with linux recently :)
编辑再次更改为反斜线,最近一直在使用linux:)
#5
0
There is a possibility that you installed as Default instance. In this case, try connecting using (local) - just (local). Then go to Programs/Microsoft SQL Server/Configuration Tools/SQL Server Configuration Manager. Go to SQL Server Network Configuration/Protocols for MSSQLSERVER and enable Named Pipes.
有可能您将其安装为默认实例。在这种情况下,尝试使用(local) - just (local)连接。然后转到program /Microsoft SQL Server/Configuration Tools/SQL Server Configuration Manager。转到MSSQLSERVER的SQL Server网络配置/协议,并启用命名管道。
#6
0
Have you tried looking at the SQL Server Surface Area Configuration? You might only have SQL Authentication setup and might need to enable Network and SQL Authentication.
您尝试过SQL Server表面积配置吗?您可能只有SQL身份验证设置,可能需要启用网络和SQL身份验证。
-JFV
-JFV
#7
0
I have an application that uses a connection string trough VSOT in Word 2007. The application gave a connection error. I allways install Sql server 2008 Express R2 in mixed mode so that i can use the build in sa with i password to connect. I re-entered the password to be sure its correct. In a next step i opened: ‘Configuration manager’ in ‘Program files’ ‘Microsoft Sql Server 2008’ –->’ Configuration Tools’ and set all the other instances on the properties --> hide instance 'yes' That solved the problem in my case. Danny
我有一个在Word 2007中使用VSOT连接字符串的应用程序。应用程序给出了一个连接错误。我总是在混合模式下安装Sql server 2008 Express R2,以便使用sa中的build和I密码进行连接。我重新输入了密码,以确保它是正确的。下一步我打开:“配置管理器”“程序文件”“Microsoft Sql Server 2008”- - >“配置工具”和设置上的所有其他实例属性- - >隐藏实例“是的”,在我的情况下解决了这个问题。丹尼
#8
0
If you still have problems connecting to SQL Express 2008,
如果您仍然无法连接到SQL Express 2008,
read this article http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/
阅读本文http://www.linglom.com/2009/03/28/enable -远程-连接- - 2008 express/ - sql服务器上
It tells you about configuring SQL express after installation
它告诉您如何在安装后配置SQL express
#1
1
you can look for your instance name in SQL Server Configuration Manager. It is written between brackets after SQL Server service in the services list.
您可以在SQL Server Configuration Manager中查找实例名。它写在服务列表中的SQL Server服务后的括号中。
the . notation is correct and it's the same as (local)
的。表示法是正确的,和(局部)一样
#2
2
Start your Local SQL Server Service
启动本地SQL服务器服务
- Start SQL Config Manager: Click Start -> Microsoft SQL Server 2008 R2 -> SQL Server Configuration Manager
- 启动SQL配置管理器:单击Start -> Microsoft SQL Server 2008 R2 -> SQL Server配置管理器
- Start SQL Services: Set the SQL Server (SQLEXPRESS) and SQL Server Browser services to automatic start mode. Right-click each service -> Properties -> Go into the Service Tab
- 启动SQL服务:将SQL Server (SQLEXPRESS)和SQL Server浏览器服务设置为自动启动模式。右键单击每个服务——>属性——>进入service选项卡
This will ensure they start up again if you restart your computer. Please check to ensure the state is "Running" for both services.
这将确保它们在重新启动计算机时重新启动。请检查以确保两个服务的状态都在“运行”。
Login and authenticate with your Local SQL Server
使用本地SQL服务器登录并进行身份验证
- Now open up SQL Server Management Studio and click "Connect to Object Explorer" and select Server Name:
- 现在打开SQL Server Management Studio,点击“Connect to Object Explorer”,选择服务器名:
[Your PC name]\SQLEXPRESS
(你的电脑名字)\ SQLEXPRESS
Example: 8540P-KL\SQLEXPRESS or (localhost)\SQLEXPRESS
例子:8540 p-kl \ SQLEXPRESS \ SQLEXPRESS(localhost)
-
To find your PC name: Right click My Computer -> Properties -> Computer Name tab
要找到你的电脑名称:右击我的电脑->属性->电脑名称标签
-
Alternative: Login using windows authentication: Using the user name [Your Domain]/[Your User Name]
选择:使用windows身份验证登录:使用用户名[您的域]/[您的用户名]
Setup User Account
设置用户帐户
-
Create a new Login acct: In SQL Mgmt Studio -> Expand your local Server -> Security -> Right click on Logins -> New Login
创建一个新的登录acct:在SQL Mgmt工作室->扩展您的本地服务器->安全性->右键单击登录->新登录
-
Set Password settings on New User Account: Uncheck Enforce password policy, password expiration and user must change pw(Since this is local) Default database -> Your Database
设置新用户帐户的密码设置:取消检查执行密码策略,密码过期,用户必须更改pw(因为这是本地的)默认数据库——>您的数据库
-
Grant roles to New User Account: User Mapping Page -> Map to your db and grant db_owner role Status Page -> Grant Permission to connect and Enable Login
为新用户帐户授予角色:用户映射页面->映射到您的db并授予db_owner角色状态页面->授予连接和启用登录的权限
Setup Access Permissions/Settings for User
为用户设置访问权限/设置
- Enable all auth modes: Right click your Local Server -> Properties -> Security Tab -> Enable SQL Server and Windows Authentication Mode
- 启用所有auth模式:右键单击您的本地服务器—>属性—> Security选项卡—>启用SQL Server和Windows身份验证模式
- Enable TCP/IP: Open SQL Server Configuration Manager -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> Enable TCP/IP
- 启用TCP/IP: Open SQL Server Configuration Manager -> SQL Server Network Configuration ->协议用于SQLEXPRESS ->支持TCP/IP。
- Restart SQL Server Service: You will have to restart the SQL Server(SQLEXPRESS) after enabling TCP/IP
- 重新启动SQL Server服务:在启用TCP/IP之后,您必须重新启动SQL Server(SQLEXPRESS)
Database Properties File for Spring Project
Spring项目的数据库属性文件
-
database.url=jdbc:jtds:sqlserver://[local PC Computer
name];instance=SQLEXPRESS;DatabaseName=[db name];数据库。url=jdbc:jtds:sqlserver://[本地PC机名];instance=SQLEXPRESS;DatabaseName=[db name];
-
database.username=[Your user name] database.password=[Your password]
数据库。数据库用户名=(用户名)。密码=(密码)
-
database.driverClassName=net.sourceforge.jtds.jdbc.Driver
database.driverClassName = net.sourceforge.jtds.jdbc.Driver
If you want to view larger screen shots and better formatting of the answer with more details please view the blog article below: Setting up a Local Instance of SQL Server 2008 Blog Post:
如果您想查看更大的屏幕截图和更详细的答案格式,请查看下面的博客文章:设置SQL Server 2008 blog Post的本地实例:
#3
1
Did you try using (local)\SQLEXPRESS in the name? I've not seen that . notation before.
你试过用(local)\SQLEXPRESS这个名字吗?我没见过。符号。
#4
1
Scott,
斯科特,
I had to enable SQL Server Browser in services once I did that I was able to connect on My recent install.
我必须在服务中启用SQL Server浏览器,这样我才能在最近的安装中连接。
after that I only had to use the computer name as the server.
之后我只需要用计算机名作为服务器。
edit, while researching further on finding sql server browser, noted that reporting services, service showed its instance as .\computer name.
编辑,当进一步研究寻找sql server浏览器时,注意到报告服务,服务显示它的实例为.\计算机名。
try that as the server name.
尝试将其作为服务器名。
edit again change to backslash been playing with linux recently :)
编辑再次更改为反斜线,最近一直在使用linux:)
#5
0
There is a possibility that you installed as Default instance. In this case, try connecting using (local) - just (local). Then go to Programs/Microsoft SQL Server/Configuration Tools/SQL Server Configuration Manager. Go to SQL Server Network Configuration/Protocols for MSSQLSERVER and enable Named Pipes.
有可能您将其安装为默认实例。在这种情况下,尝试使用(local) - just (local)连接。然后转到program /Microsoft SQL Server/Configuration Tools/SQL Server Configuration Manager。转到MSSQLSERVER的SQL Server网络配置/协议,并启用命名管道。
#6
0
Have you tried looking at the SQL Server Surface Area Configuration? You might only have SQL Authentication setup and might need to enable Network and SQL Authentication.
您尝试过SQL Server表面积配置吗?您可能只有SQL身份验证设置,可能需要启用网络和SQL身份验证。
-JFV
-JFV
#7
0
I have an application that uses a connection string trough VSOT in Word 2007. The application gave a connection error. I allways install Sql server 2008 Express R2 in mixed mode so that i can use the build in sa with i password to connect. I re-entered the password to be sure its correct. In a next step i opened: ‘Configuration manager’ in ‘Program files’ ‘Microsoft Sql Server 2008’ –->’ Configuration Tools’ and set all the other instances on the properties --> hide instance 'yes' That solved the problem in my case. Danny
我有一个在Word 2007中使用VSOT连接字符串的应用程序。应用程序给出了一个连接错误。我总是在混合模式下安装Sql server 2008 Express R2,以便使用sa中的build和I密码进行连接。我重新输入了密码,以确保它是正确的。下一步我打开:“配置管理器”“程序文件”“Microsoft Sql Server 2008”- - >“配置工具”和设置上的所有其他实例属性- - >隐藏实例“是的”,在我的情况下解决了这个问题。丹尼
#8
0
If you still have problems connecting to SQL Express 2008,
如果您仍然无法连接到SQL Express 2008,
read this article http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/
阅读本文http://www.linglom.com/2009/03/28/enable -远程-连接- - 2008 express/ - sql服务器上
It tells you about configuring SQL express after installation
它告诉您如何在安装后配置SQL express