ssms只有空白解决方案
DBAs and developers manage a broad set of queries, codes, applications. It is a good practice to organize code or t-SQL scripts so that we can easily access them without wasting time searching for them. You might use Visual Studio, GitHub source control for it. In this article, we look at how Solutions and Projects help to organize T-SQL scripts.
DBA和开发人员管理着广泛的查询,代码和应用程序。 组织代码或t-SQL脚本是一种好习惯,这样我们就可以轻松访问它们而不会浪费时间搜索它们。 您可以使用Visual Studio,GitHub源代码控件。 在本文中,我们研究解决方案和项目如何帮助组织T-SQL脚本。
I am using the latest general availability release SSMS 18.4. You can download it from Microsoft docs.
我正在使用最新的一般可用性版本SSMS 18.4。 您可以从Microsoft文档下载它。
SQL Server Management Studio项目 (SQL Server Management Studio Projects)
We can organize T-SQL codes using SSMS projects. Go to New-> Project.
我们可以使用SSMS项目来组织T-SQL代码。 转到新建->项目。
It opens a new project configuration window. Here, we do the following configurations.
它打开一个新的项目配置窗口。 在这里,我们进行以下配置。
- SQL Server Scripts or SQL Server脚本”或“ Analysis Services Script. Let’s select SQL Server Scripts for this article Analysis Services脚本” 。 让我们为本文选择SQL Server脚本
- Specify a project name 指定项目名称
- Specify a directory to save this project 指定目录以保存该项目
Click OK, and it opens the Solution Explorer to manage the project and its resources.
单击“确定”,它将打开解决方案资源管理器来管理项目及其资源。
If this solution explorer is not visible, go to View-> Solution Explorer. You can also use keyboard shortcut Ctrl+Alt+L.
如果此解决方案资源管理器不可见,请转到“ 视图”->“解决方案资源管理器”。 您也可以使用键盘快捷键Ctrl + Alt + L。
The solution is a logical grouping of project-related resources. By default, SQL Server creates a solution for every project with a similar name. We can create multiple projects in a solution. Let’s create a new project in the same solution.
解决方案是对与项目相关的资源进行逻辑分组。 默认情况下,SQL Server为具有相似名称的每个项目创建一个解决方案。 我们可以在一个解决方案中创建多个项目。 让我们在相同的解决方案中创建一个新项目。
Go to File -> New -> Project. It opens the same new project window. Here, Select Add to Solution to add the project into exiting soluti