创建本地 SQL Server 数据库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43355971/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 05:12:04  来源:igfitidea点击:

Create Local SQL Server database

sqlsql-server

提问by gemmo

I've used SQL Server Management Studio before, but only when the server is already up and running.

我以前使用过 SQL Server Management Studio,但只有在服务器已经启动并运行时才使用。

I need to start from the beginning and create my own instance on the local computer.

我需要从头开始,在本地计算机上创建自己的实例。

The instructions I'm getting, is just put "." on the server name and use Windows Authentication. But that gives me a "server not found" error.

我得到的指令,只是把“。” 在服务器名称上并使用 Windows 身份验证。但这给了我一个“找不到服务器”的错误。

Can someone please help? I'm using SQL Server 2012 Management Studio.

有人可以帮忙吗?我正在使用 SQL Server 2012 Management Studio。

I really thought it would be just like Access, create my tables and start creating queries.

我真的认为它就像 Access 一样,创建我的表并开始创建查询。

采纳答案by Nico R

You need to install a so-called Instance of MSSQL server on your computer. That is, installing all the needed files and services and database files. By default, there should be no MSSQL Server installed on your machine, assuming that you use a desktop Windows (7,8,10...).

您需要在您的计算机上安装一个所谓的 MSSQL 服务器实例。也就是说,安装所有需要的文件和服务以及数据库文件。默认情况下,您的计算机上不应安装 MSSQL Server,假设您使用的是桌面 Windows(7、8、10...)。

You can start off with Microsoft SQL Server Express, which is a 10GB-limited, free version of MSSQL. It also lacks some other features (Server Agents, AFAIR), but it's good for some experiments.

您可以从Microsoft SQL Server Express 开始,它是 MSSQL 的 10GB 限制的免费版本。它还缺少一些其他功能(服务器代理、AFAIR),但对于一些实验来说是好的。

Download it from the Microsoft Website and go through the installer process by choosing New SQL Server stand-alone installation ..after running the installer.

从 Microsoft 网站下载它并通过New SQL Server stand-alone installation ..在运行安装程序后进行选择来完成安装程序过程。

Click through the steps. For your scenario (it sounds like you mainly want to test some stuff), the default options should suffice.

单击步骤。对于您的场景(听起来您主要是想测试一些东西),默认选项就足够了。

Just give attention to the step Instance Configuration. There you will set the name of your MSSQL Server Instance. Call it something unique/descriptive like MY_TEST_INSTANCEor the like. Also, choose wisely the Instance root directory. In it, the database files will be placed, so it should be on a drive that has enough space.

只要注意这一步Instance Configuration。您将在那里设置 MSSQL Server 实例的名称。称之为独特/描述性之类MY_TEST_INSTANCE的东西。此外,明智地选择Instance root directory. 其中,将放置数据库文件,因此它应该位于具有足够空间的驱动器上。

Click further through the wizard, and when it's finished, your MSSQL instance will be up and running. It will also run at every boot if you have chosen the default settings for the services.

在向导中进一步单击,完成后,您的 MSSQL 实例将启动并运行。如果您为服务选择了默认设置,它也会在每次启动时运行。

As soon as it's running in the background, you can connect to it with Management Studio by connecting to .\MY_TEST_INSTANCE, given that that's the name you chose for the instance.

只要它在后台运行,您就可以通过连接到 Management Studio 来连接到它.\MY_TEST_INSTANCE,因为这是您为实例选择的名称。

回答by Hyman James

Your best bet over here to install XAMPP..Follow the link download it , it has an instruction file as well. You can setup your own MY SQL database and then connect to on your local machine.

您最好在这里安装 XAMPP..按照链接下载它,它也有一个说明文件。您可以设置自己的 MY SQL 数据库,然后连接到本地计算机。

https://www.apachefriends.org/download.html

https://www.apachefriends.org/download.html