如果缺少MSSQLSERVER服务,如何连接到本地SQL Server? [英] How can I connect to local SQL Server if MSSQLSERVER service is missing?

查看:255
本文介绍了如果缺少MSSQLSERVER服务,如何连接到本地SQL Server?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于学习目的,我正在尝试对各种玩具项目进行本地开发.我在计算机上安装了Microsoft SQL Server Management Studio 2008 R2(10.50.1617.0)和Visual Studio Express 2013 for Web.使用诸如Membership和Entity Framework代码优先方法之类的项目无法创建数据库. SSMS被配置为连接到带有一堆我公司的DB的外部服务器,但是我无法连接到本地计算机的SQL Server实例,这可能是因为它不存在.

I am trying to do some local development on various toy projects for learning purposes. I have Microsoft SQL Server Management Studio 2008 R2 (10.50.1617.0) and Visual Studio Express 2013 for Web installed on my machine. Projects using things such as Membership and Entity Framework code-first approach are failing to create databases. SSMS is configured to make connections to an external server with a bunch of my company's DBs on it, but I cannot connect to the local machine's SQL Server instance, which might be because it doesn't exist.

在服务列表中绝对没有列出MSSQLSERVER服务,我认为这意味着本地没有安装SQL Server实例(即使我假设VS 2013或SSMS会安装MSSQLSERVER吗?).这导致我下载了SQL Server 2012 Express LocalDB的副本,但是当我尝试安装它时,它失败了,并出现以下错误:

There is definitely no MSSQLSERVER service listed in the services list, which I assumed meant no instance of SQL Server was installed locally (even though I assumed VS 2013 or SSMS would have installed MSSQLSERVER?). This led me to download a copy of SQL Server 2012 Express LocalDB, but when I tried to install it, it failed, giving the following error:

SQL Server 2012 Express LocalDB的安装失败,因为计算机上已经存在更高版本.要继续,请卸载更高版本,然后再次运行SQL Server 2012 Express LocalDB安装程序.

所以我想我的问题是,我真的安装了SQL Server吗?如果是这样,我如何启动该服务(甚至没有出现在服务列表中),以便可以在本地连接到该服务?

So I guess my question is, do I really have SQL Server installed? If so, how do I start the service (which is not even appearing in the services list) so that I can connect to it locally?

推荐答案

安装Sql Server Express(免费)版本(其中sql-server-express版本与您的SSMS版本匹配).

Install Sql Server Express (free) edition (where the sql-server-express version matches your SSMS version).

http://www.microsoft.com/zh-我们/download/details.aspx?id=25174

为了避免将来出现麻烦,我将实例"命名为"Express"或"SqlExpress"之外的其他名称.

I name my "instance" something besides "Express" or "SqlExpress" to avoid future complications.

MyComputerName \ SqlExpress2008R2

这篇关于如果缺少MSSQLSERVER服务,如何连接到本地SQL Server?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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