介绍 (Introduction)

Microsoft SQL Server Server Management is an advanced development environment that enables us to configure, manage and administrate SQL Server database engines. SSMS is very popular and widely used by the database developers and administrators because of the following advantages:

Microsoft SQL Server服务器管理是一个高级开发环境,使我们能够配置,管理和管理SQL Server数据库引擎。 由于以下优点,SSMS受到数据库开发人员和管理员的广泛欢迎和广泛使用:

  • Cost-free 免费用
  • Advanced user experience 先进的用户体验
  • Various add-in options 各种加载项选项
  • Easy installation 简易安装

Firstly, we will learn the installation and then go through the other details of the SSMS.

首先,我们将学习安装方法,然后详细介绍SSMS的其他细节。

安装 (Installation)

We can download the latest version of the SSMS from the Microsoft download website and we can also find out the release notes.

我们可以从Microsoft下载网站下载最新版本的SSMS,也可以找到发行说明。

After downloading the setup file, we will open the setup file and click the install button in order to begin the installation. On this screen, the Location setting specifies the installation path of the Microsoft SQL Server Management Studio:

下载安装文件后,我们将打开安装文件并单击安装按钮以开始安装。 在此屏幕上,“ 位置”设置指定Microsoft SQL Server Management Studio的安装路径:

In the second screen, the installation process will be started and the progression of the setup will be shown:

在第二个屏幕中,将开始安装过程,并显示安装进度:

After the installation is completed, the following screen will appear and inform us that the installation has been completed successfully:

安装完成后,将出现以下屏幕,并通知我们安装已成功完成:

Now, we can launch SSMS from the Start menu:

现在,我们可以从“ 开始”菜单启动SSMS:

Also, we can use the Command Prompt to launch SSMS:

另外,我们可以使用命令提示符来启动SSMS:

连接到数据库引擎 (Connecting to the Database Engine)

When we launch the SSMS, the Connect to Server dialog screen will appear in front of us. In this screen, we will set the Server name and Authentication type of the SQL Server which we want to connect to and then click the Connect button. In the following illustration, we will connect to a SQL Express edition with the SQL Server Authentication type. If we click on the Remember password option, SSMS will remember our username and password for the next connection of the same SQL Server instance:

当我们启动SSMS时,“ 连接到服务器”对话框屏幕将出现在我们前面。 在此屏幕中,我们将设置我们要连接SQL Server的服务器名称身份验证类型 ,然后单击“ 连接”按钮。 在下图中,我们将连接到具有SQL Server身份验证类型SQL Express版本。 如果单击“ 记住 密码”选项,SSMS将为同一SQL Server实例的下一次连接记住我们的用户名和密码:

After a successful connection, the Object Explorer panel will appear on the left side of the main window of Microsoft SQL Server Management Studio.

成功连接后,“ 对象资源管理器”面板将出现在Microsoft SQL Server Management Studio主窗口的左侧。

On the Object Explorer, we can change various settings of the SQL Server Engine and deployed databases. This screen provides us to accomplish database related operations such as the backup, restore, detach, etc.:

对象资源管理器上 ,我们可以更改SQL Server Engine和已部署数据库的各种设置。 此屏幕为我们提供了完成与数据库相关的操作,例如备份,还原,分离等的操作:

At the same time, this screen helps us to maintain and manipulate the database objects.

同时,此屏幕可帮助我们维护和操作数据库对象。

Tip: Object Explorer Details panel helps us to find out more details about the server and database objects which are located under the selected folder. By default, this panel will be invisible, but we can open it under the View menu:

提示:“对象资源管理器的详细信息”面板可帮助我们找到有关位于所选文件夹下的服务器和数据库对象的更多详细信息。 默认情况下,该面板是不可见的,但是我们可以在“ 视图”菜单下将其打开:

For example, if we want to obtain more details about the tables which are contained by a particular database, selecting the tables folder will be enough to see these details. In addition, we can also add different data to this tabular list according to the type of the object. For example, it allows seeing the record number of rows for the tables:

例如,如果我们要获取有关特定数据库所包含的表的更多详细信息,则选择表文件夹将足以查看这些详细信息。 另外,我们还可以根据对象的类型将不同的数据添加到该列表中。 例如,它允许查看表的记录行数:

Microsoft SQL Server Management Studio上的查询编辑器 (Query Editor on Microsoft SQL Server Management Studio )

Another ability of the SSMS is that it enables to create and execute the T-SQL queries. When we click on the New Query button, which is placed on the toolbar, a new Query Editor will open. In this editor, we can create and execute SQL queries. In the following example, we will execute a very basic query that shows some of the synthetic customer data. First, we will open a new query editor window, type desired query and then, we will click the Execute button to run the query. The query result will be shown under the Results panel:

SSMS的另一个功能是,它可以创建和执行T-SQL查询。 当我们单击工具栏上的“ 新建查询”按钮时,将打开一个新的查询编辑器 。 在此编辑器中,我们可以创建和执行SQL查询。 在下面的示例中,我们将执行一个非常基本的查询,其中显示了一些综合客户数据。 首先,我们将打开一个新的查询编辑器窗口,键入所需的查询,然后单击执行按钮以运行查询。 查询结果将显示在“ 结果”面板下:

SELECT *
FROM(VALUES
(1, 'Gertie Michener', 'London'
),
(2, 'Colton Guion', 'New York'
),
(3, 'Ahmed Coty', 'Berlin'
),
(4, 'Devin Kimmons', 'Istanbul'
)) CustomerTable(Id, CustomerName, City)

SSMS query editor offers various productivity options to programmers. In the previous example, the result set of the query has been shown on the grid, but we can change this option. On the SQL Editor toolbar, we can change this setting to Results to File, so that the result set of the query will be shown in a text format:

SSMS查询编辑器为程序员提供了各种生产力选项。 在前面的示例中,查询的结果集已显示在网格上,但是我们可以更改此选项。 在SQL编辑器工具栏上,我们可以将此设置更改为Results to File ,以便查询的结果集将以文本格式显示:

When we want to separate the query window and result set window, we need to enable the Display results in a separate tab option. To enable this option we need to follow the below steps:

当我们想分开查询窗口和结果集窗口时,我们需要启用“ 在单独的选项卡中显示结果”选项。 要启用此选项,我们需要执行以下步骤:

  • Click the Options command which is placed under the Tools menu:

    单击“ 工具”菜单下的“ 选项”命令:

  • Enable the Display results in a separate tab option under either Results to Grid tab or Results to Text tab:

    在“ 结果到网格”选项卡或“ 结果到文本”选项卡下启用“ 在单独的选项卡中显示结果”选项:

After enabling this option, the query results will be shown in a separate window. However, this option will be enabled when a new Query Window is opened. When we run the following query, the result set will be shown in the separate tab:

启用此选项后,查询结果将显示在单独的窗口中。 但是,当打开新的查询窗口时,将启用此选项。 当我们运行以下查询时,结果集将显示在单独的选项卡中:

After the mentioned setting is changed, the query result will be shown as follows:

更改上述设置后,查询结果将显示如下:

The following illustration indicates the essential features of the SQL Editor toolbar:

下图说明了SQL编辑器工具栏的基本功能:

  1. Available Databases: In this drop-down menu, we can determine a database on which the query will be executed可用的数据库:在此下拉菜单中,我们可以确定要在其上执行查询的数据库
  2. Execute: This button starts the execution of a currently active query window执行:此按钮开始执行当前活动的查询窗口
  3. Cancel Executing Query: This button stops the execution of the query取消执行查询:此按钮停止执行查询
  4. Parse: This button validates the syntax of the query, but does not check the database objects解析:此按钮验证查询的语法,但不检查数据库对象
  5. Changing query result destination: In this button group, we can set the destination of the query result. It provides three different options: 更改查询结果的目的地:在此按钮组中,我们可以设置查询结果的目的地。 它提供了三种不同的选项:
    1. Results to Grid网格结果
    2. Results to Text结果文本
    3. Results to File结果存档
  6. Comment/Uncomment out the Selected Lines:

    These buttons provide the option for commenting or uncommenting on the selected code lines:

  7. 注释/取消注释选定的行:

    这些 按钮提供了对选定代码行进行注释或取消注释的选项:

Tip: Some programmers wish to see the line numbers of the code in the query editor. Therefore, we need to follow the below steps:

提示:某些程序员希望在查询编辑器中查看代码的行号。 因此,我们需要遵循以下步骤:

  • Options command, which is placed under the 选项”命令,该命令位于“ Tools menu 工具”菜单下
  • General tab, which is placed under 常规”选项卡,该选项卡位于“ Transact-SQL node Transact-SQL”节点下
  • Line numbers option 行号选项

After this setting change, the queries will be formatted as follows:

更改此设置后,查询的格式将如下所示:

结论 (Conclusion)

In this article, we learned the basics of Microsoft SQL Server Management Studio and the following articles will help to improve SSMS-related skills :

在本文中,我们学习了Microsoft SQL Server Management Studio的基础知识,并且以下文章将有助于提高与SSMS相关的技能:

  • 10 SSMS Tips and Tricks to boost your Productivity 10个SSMS技巧和窍门可提高您的生产力
  • Top free add-ins for SQL Server Management Studio (SSMS) SQL Server Management Studio(SSMS)的顶级免费加载项
  • 10 SSMS Tips and Tricks to boost your Productivity 10个SSMS技巧和窍门可提高您的生产力

翻译自: https://www.sqlshack.com/overview-of-microsoft-sql-server-management-studio-ssms/

Microsoft SQL Server Management Studio(SSMS)概述相关推荐

  1. [Microsoft SQL Server Management Studio]SSMS查询年龄最大学生的姓名和年龄问题及查询最高的学生的学号问题分析及解决

    查询年龄最大学生的姓名和年龄问题 问题描述 使用以下语句查询年龄最大学生的姓名和年龄的时候系统报错,为什么?要如何修改? SELECT StName, MAX(YEAR(GETDATE())-YEAR ...

  2. ssms2008 代码自动提示_使用 SSMS 的提示和技巧 - SQL Server Management Studio (SSMS) | Microsoft Docs...

    使用 SQL Server Management Studio (SSMS) 的提示和技巧Tips and tricks for using SQL Server Management Studio ...

  3. SQL Server Management Studio (SSMS)

    SQL Server Management Studio (SSMS) 官网: https://docs.microsoft.com/zh-cn/sql/ssms/sql-server-managem ...

  4. 下载 SQL Server Management Studio (SSMS)

    SSMS 是一种集成环境,用于管理从 SQL Server 到 SQL 数据库的任何 SQL 基础结构. SSMS 提供用于配置.监视和管理 SQL 实例的工具. 使用 SSMS 部署.监视和升级应用 ...

  5. SQL Server Management Studio (SSMS)单独安装,仅安装连接工具

    简单来说,SSMS是用于远程连接数据库与执行管理任务的一个工具.当安装SQL SERVER时,会默认安装.但也可以单独安装在不是数据库服务器的主机上. SQL Server Management St ...

  6. Microsoft Sql Server Management studio与visual studio 建立连接数据库

    打开Microsoft Sql Server Management studio 点击文件---连接对象资源管理器 找到数据库  表 开始设计表id name 两个字段 添加记录1 2 3 4 查询添 ...

  7. 使用Microsoft SQL Server Management Studio连接远程阿里云SQL Server数据库

    首先我买的是阿里云域名与网站->云虚拟主机:如下 点云虚拟主机进去后,可以看到你的主机: 点击主机,看到详细信息: 这里重点看数据库的信息. 主要到有两点: 数据库类型: SqlServer 数 ...

  8. Microsoft SQL Server Management Studio ------- 附加数据库 对于 服务器“xxxamp;amp;quot;失败(错误码5120)

    标题: Microsoft SQL Server Management Studio ------------------------------ 附加数据库 对于 服务器"DESKTOP- ...

  9. Microsoft SQL Server Management Studio ------- 附加数据库 对于 服务器“xxx失败(错误码5120)

    标题: Microsoft SQL Server Management Studio ------------------------------附加数据库 对于 服务器"xxx" ...

最新文章

  1. linkin大话面向对象--多态
  2. Linux Daemon Writing HOWTO
  3. 用户描述 和 组描述 和 远程连接
  4. Oracle原理:11g的体系结构
  5. idea快速从dao层跳转到mapper.xml文件的插件
  6. 【专题介绍】视频内容生产与消费创新(Part1)
  7. ajax request headers,ajax request VS normal request
  8. python实例属性引用-python之对象(实例)
  9. linux 删除提示没有那个文件或目录,rm 无法删除没有那个文件或目录
  10. pyqt与mysql例子_PyQt 连接MySql数据库,C++代码转Python3代码
  11. ++递归 字符串全排列_一文看懂全排列算法
  12. 一步一步学Repast 第五章——模拟粒子运动,了解Schedule
  13. 天网防火墙Athena 2006正式发布
  14. python程序打印出10行的杨辉三角_GitHub 标星 6.5w+,Python 小白 100 天学习计划,从新手到玩转!...
  15. chm打开空白(chm打开空白)
  16. 直播系统 java_直播系统软件定制开发
  17. VC 多屏控制显示文章整理
  18. 安利7个冷门好用的在线工具,每一个都足够惊艳
  19. 强袭自由高达,我的第一个作品
  20. matplotlib之pyplot模块——填充多边形(fill)

热门文章

  1. css为什么要用浮动_CSS问题和解决
  2. python百度人脸识别_python 与 百度人脸识别api
  3. date()---求N个月后的1号
  4. python 六剑客(匿名函数和内建函数)
  5. 51nod 1086 背包问题 V2 【二进制/多重背包】
  6. 关于事件模型,js事件绑定和解除的学习
  7. 【totti】一道weblogic认证考题所想到的
  8. RN环境搭建(Android端)
  9. JavaScript学习(四十八)—原型对象的增删改查
  10. JavaScript学习(三十八)—面向过程与面向对象