azure云数据库_Azure Data Studio中Windows的数据库管理工具扩展

azure云数据库

Azure Data Studio provides a modern and productive experience for managing on-premise and cloud-based SQL Server instances. Previously, we discussed many useful features of it, and you can explore these articles in Azure Data Studio category.

Azure Data Studio为管理本地和基于云SQL Server实例提供了现代而富有成效的体验。 以前,我们讨论了它的许多有用功能,您可以在Azure Data Studio类别中浏览这些文章。

Microsoft provides monthly release of Azure Data Studio and provides enhancements to its features for bringing exciting features and bug fixes. At the time of writing this article, the latest release of ADS is 1.13.1 (release date – November 15, 2019).

Microsoft每月提供一次Azure Data Studio版本,并对其功能进行了增强,以带来令人兴奋的功能和错误修复。 在撰写本文时,ADS的最新版本是1.13.1(发布日期– 2019年11月15日)。

Install or update ADS to the latest version on appropriate platform Windows, macOS or Linux:

在适当的平台Windows,macOS或Linux上将ADS安装或更新为最新版本

Azure Data Studio installation

An extension adds new features to Azure Data Studio. We can download extensions from the marketplace in-built in ADS. In this article, we will explore the SQL Server Schema Compare extension.

扩展将新功能添加到Azure Data Studio。 我们可以从ADS内置市场中下载扩展。 在本文中,我们将探索SQL Server Schema Compare扩展。

数据库管理工具扩展概述 (Overview of Database Administration Tool Extension )

Launch Azure Data Studio and navigate to extensions in the marketplace:

启动Azure Data Studio并导航到市场中的扩展:

Extensions overview

In this extension, you can see an extension Database Administration Tool Extension for Windows:

在此扩展中,您可以看到Windows的扩展数据库管理工具扩展

Database Administration Tool Extension for Windows

It is a recommended extension by Azure Data Studio. Installation is straightforward for this. Click on the Install button, and it enables the extension globally:

这是Azure Data Studio推荐的扩展。 为此,安装很简单。 单击安装按钮,它将在全局启用扩展:

Installation of Database Administration Tool Extension for Windows

We do not require a restart of ADS. This extension provides the following features:

我们不需要重新启动ADS。 此扩展提供以下功能:

  • SSMS Property Dialog

    SSMS属性对话框
  • Generate script wizard

    生成脚本向导

SSMS属性对话框 (SSMS property dialog box)

You might be familiar with server and database property dialog in SSMS. We get much useful information using this property dialog. Once you have installed database administration tool extension, connect to a SQL instance.

您可能熟悉SSMS中的服务器和数据库属性对话框。 使用此属性对话框,我们可以获得很多有用的信息。 安装数据库管理工具扩展后,请连接到SQL实例。

Azure Data Studio中的服务器属性对话框 (Server property dialog in Azure Data Studio)

We get SSMS property dialog for the server and database properties.

我们获得服务器和数据库属性的SSMS属性对话框。

Right-click on the server instance and you get an option Properties in the contex menu bar:

右键单击服务器实例,然后在contex菜单栏中获得“ 属性 ”选项:

Server property

It opens the dialog box for server property in Azure Data Studio similar to SQL Server Management Studio:

它将打开与SQL Server Management Studio类似的Azure Data Studio中的服务器属性对话框:

Server property dialog box

It is interesting. Right! You can check the SQL instance property similar to SSMS in the Azure Data Studio as well. Let’s explore the information provided in the server property dialog box.

挺有趣的。 对! 您也可以在Azure Data Studio中检查类似于SSMSSQL实例属性。 让我们探索服务器属性对话框中提供的信息。

一般 (General)

This page gives information about SQL Server instance, edition, version, host operating system, language, RAM (total server memory), processors, language, SQL Server installation root directory, server collation. We can also determine whether the SQL instance is part of a cluster or not.

本页提供有关SQL Server实例,版本,版本,主机操作系统,语言,RAM(服务器总内存),处理器,语言,SQL Server安装根目录,服务器归类的信息。 我们还可以确定SQL实例是否是集群的一部分。

记忆 (Memory)

It is a best practice to define a minimum and maximum memory for SQL instance. SQL Server 2019 introduced memory configurations in the installation wizard as well. In this memory section, we can view existing memory configurations and define the minimum, maximum memory appropriately. We can also control index creation memory and minimum memory per query as well. We should make changes with these parameters if required to do:

最佳实践是为SQL实例定义最小和最大内存。 SQL Server 2019还在安装向导中引入了内存配置。 在此内存部分中,我们可以查看现有的内存配置并适当地定义最小,最大内存。 我们还可以控制索引创建内存和每个查询的最小内存。 如果需要,我们应该使用以下参数进行更改:

Memory page

处理器 (Processors)

We can define the processors, their affinity setting for SQL Server using this page. By default, SQL Server uses all processors available in the system. You should be careful in making changes in processors for SQL Server. It might affect queries performance, as well.

我们可以使用此页面定义处理器及其对SQL Server的相似性设置。 默认情况下,SQL Server使用系统中所有可用的处理器。 在更改SQL Server的处理器时,应格外小心。 它也可能会影响查询性能。

Another configuration is maximum worker threads. By default, SQL Server uses the maximum worker threads as per the logical processors. You can follow the article Max Worker Threads for SQL Server Always on Availability Group databases for more details. It’s default value is zero.

另一种配置是最大工作线程数。 默认情况下,SQL Server使用每个逻辑处理器使用的最大工作线程数。 您可以按照文章SQL Server Always On可用性组数据库上的最大工作线程数了解更多详细信息。 默认值为零。

Processors configurations

安全 (Security)

We can control the SQL Server security configuration using this page. It provides the following configurations.

我们可以使用此页面控制SQL Server安全配置。 它提供以下配置。

服务器认证 (Server Authentication )

We can define a server authentication model, Windows or mixed (Windows and SQL) authentication using this option.

我们可以使用此选项定义服务器身份验证模型,Windows身份验证或混合(Windows和SQL)身份验证。

登录审核 (Login auditing)

SQL Server provides individual options for auditing SQL Server logins. Here we can define the following options:

SQL Server提供了用于审核SQL Server登录名的各个选项。 在这里,我们可以定义以下选项:

  • No audit login

    没有审核登录
  • Audit logins for failed logins

    审核登录失败的登录
  • Audit logins for successful logins only

    仅审核成功登录的登录
  • Audit logins for both failed and successful logins

    审核失败和成功登录的登录

Security configuration

Apart from this, we can define the following configurations as well:

除此之外,我们还可以定义以下配置:

  • Enable and define the server proxy account

    启用并定义服务器代理帐户
  • Enable common criteria compliance

    启用通用标准
  • Enable C2 auditing

    启用C2审核
  • Cross-database ownership chaining

    跨数据库所有权链

连接数 (Connections)

In the connections page, we define the following options:

在连接页面中,我们定义以下选项:

  • Maximum number of concurrent connections

    最大并发连接数
  • We can enable query governor for preventing long-running queries

    我们可以启用查询调控器来防止长时间运行的查询
  • We can define connection options such as ANSI Warning, ANSI Padding, quote identifier, No Count. We should be careful in changing these options at the instance level as it might change query behavior. It is advisable to set query options at connection level for an individual session

    我们可以定义连接选项,例如ANSI警告,ANSI填充,引用标识符,无计数。 我们应该在实例级别更改这些选项时要小心,因为它可能会更改查询行为。 建议在连接级别为单个会话设置查询选项
  • By default, SQL Server allows remote connections with query timeout 600 seconds

    默认情况下,SQL Server允许查询超时为600秒的远程连接

数据库设置 (Database settings)

We can define the following configurations in this database-setting page:

我们可以在此数据库设置页面中定义以下配置:

  • Default index fill factor

    默认索引填充因子
  • Backup and restore setting such as enable compress backup, enable backup checksum for all database backups

    备份和还原设置,例如启用压缩备份,为所有数据库备份启用备份校验和
  • We can also define the recovery interval in minutes. We should be cautious while making a change in this parameter. It might affect database recovery and availability

    我们还可以以分钟为单位定义恢复间隔。 更改此参数时,我们应该谨慎。 它可能会影响数据库的恢复和可用性
  • We also define default database locations for data file, log file and backup. By default, any new SQL Server database uses this path unless we specify a separate directory explicitly

    我们还为数据文件,日志文件和备份定义了默认的数据库位置。 默认情况下,任何新SQL Server数据库都使用此路径,除非我们明确指定一个单独的目录

Database setting page

高级 (Advanced)

In the advanced page, we do SQL Server instance advanced configurations that affect overall server and query behavior.

在高级页面中,我们执行影响整体服务器和查询行为SQL Server实例高级配置。

  • Enable or disable contained database

    启用或禁用包含的数据库
  • Define SQL FILESTREAM feature access level

    定义SQL FILESTREAM功能访问级别
  • We can define the blocked process threshold

    我们可以定义阻塞的过程阈值
  • We can enable query optimizer behaviour for Ad-hoc workloads

    我们可以为临时工作负载启用查询优化器行为
  • We can define parallelism settings such as the Cost threshold for parallelism and the max degree of parallelism. We should change this configuration with proper testing in the lower environment

    我们可以定义并行度设置,例如并行度的Cost阈值和最大并行度。 我们应该在较低的环境中通过适当的测试来更改此配置

Advanced page

权限 (Permissions)

In this page, we can grant or revoke server-level permissions such as alter any database, alter any login, alter trace, create server role, view any database, view any definition, etc.:

在此页面中,我们可以授予或撤销服务器级别的权限,例如更改任何数据库,更改任何登录名,更改跟踪,创建服务器角色,查看任何数据库,查看任何定义等:

Server permissions

数据库属性对话框 (Database properties dialog)

We can also check database property similar to SSMS in the Azure Data Studio admin tool extension as well.

我们还可以在Azure Data Studio管理工具扩展中检查类似于SSMS的数据库属性。

Right-click on the database and click on Properties.

右键单击数据库,然后单击属性

Database properties

It opens the following database properties page:

它打开以下数据库属性页面:

Database properties general page

Let’s explore the database properties configurations as well.

让我们也探索数据库属性配置。

一般 (General)

We get the following information on the general page:

我们在一般页面上获得以下信息:

  • Database name

    数据库名称
  • Database status

    数据库状态
  • DB owner

    数据库所有者
  • DB creation date and size

    数据库创建日期和大小
  • Number of users in the database

    数据库中的用户数
  • Database collation

    数据库整理
  • Memory allocated to memory optimized objects

    分配给内存优化对象的内存
  • Database last full and log backup timestamp

    数据库最近已满,日志备份时间戳记

档案 (Files)

It gives the following configurations:

它提供以下配置:

  • View or change the database owner

    查看或更改数据库所有者
  • View the database files (primary, secondary and log file) along with its path, filegroup and auto-growth configuration

    查看数据库文件(主文件,辅助文件和日志文件)及其路径,文件组和自动增长配置
  • Add or remove database secondary or additional log files. We cannot remove the primary data file and transaction log file

    添加或删除数据库辅助或其他日志文件。 我们无法删除主要数据文件和交易日志文件

database files

文件组 (Filegroups)

We can view and add filegroup for database files in this page. If we use SQL FILESTREAM and Memory-optimized feature, we define FILESTREAM and memory-optimized filegroup on this page:

我们可以在此页面中查看和添加数据库文件的文件组。 如果使用SQL FILESTREAM和内存优化功能,则在此页面上定义FILESTREAM和内存优化文件组:

filegroup information

选件 (Options)

We control the database behavior using the configurations available in Azure Data Studio. These configurations options are as follows:

我们使用Azure Data Studio中可用的配置来控制数据库行为。 这些配置选项如下:

  • Database collation

    数据库整理
  • Recovery model – full, bulk-logged and simple recovery

    恢复模型–完整,批量记录和简单的恢复
  • Database compatibility level

    数据库兼容性级别
  • Containment option

    遏制选项
  • Database scoped configurations such as MAXDOP, Parameter sniffing, legacy cardinality estimation. This configuration depends upon the SQL Server version, and you might get different options

    数据库范围的配置,例如MAXDOP,参数嗅探,传统基数估计。 此配置取决于SQL Server版本,您可能会获得不同的选项
  • Query Configuration – snapshot isolation, delayed durability, Parameterization, ANSI options

    查询配置–快照隔离,延迟的持久性,参数化,ANSI选项
  • Recovery configuration – Page verification and target recovery

    恢复配置–页面验证和目标恢复
  • Database states – database read-only, restrict access

    数据库状态–数据库只读,限制访问

database options

变更追踪 (Change tracking)

We can enable, disable and configure change tracking for SQL Server database:

我们可以启用,禁用和配置SQL Server数据库的更改跟踪:

Change tracking

权限 (Permissions)

We can view and modify database properties using this permissions section. A few useful configurations are, as follows:

我们可以使用此权限部分查看和修改数据库属性。 一些有用的配置如下:

  • Alter any database

    修改任何数据库
  • Alter any database trigger

    更改任何数据库触发器
  • Alter any schema

    更改任何架构
  • Create function, procedure, full-text catalog

    创建功能,过程,全文目录
  • Showplan

    展示计划
  • View database state

    查看数据库状态
  • View definition

    查看定义

database Permissions

镜像,事务日志传送和查询存储 (Mirroring, Transaction log shipping and Query Store)

We can use the corresponding page for configuration of the database mirroring, transaction log shipping and query store.

我们可以使用相应的页面来配置数据库镜像,事务日志传送和查询存储。

在Azure Data Studio的数据库管理工具扩展中生成脚本 (Generate Scripts in database admin tool extension of Azure Data Studio)

We can also generate scripts in a database similar to an SSMS generate script wizard.

我们还可以在数据库中生成脚本,类似于SSMS生成脚本向导。

Right-click on a database and click on Generate scripts:

右键单击数据库,然后单击生成脚本

Generate Scripts in database admin tool extension of Azure Data Studio

It opens the following wizard that we use for generating a script for database objects:

它将打开以下向导,我们将使用该向导为数据库对象生成脚本:

Generate script wizard

We can use article Six different methods to copy tables between databases in SQL Server and refer the following section to learn this wizard.

我们可以使用文章“ 六种不同的方法”在SQL Server中的数据库之间复制表,并参考以下部分以学习此向导。

Article reference

结论 (Conclusion)

In this article, we explored Database Administration Tool Extensions for Windows and its usage for database administrators. It is useful for database developers as well to check specific configurations that might affect query performance. You should explore this tool in the Azure Data Studio.

在本文中,我们探讨了Windows的数据库管理工具扩展及其对数据库管理员的用法。 对于数据库开发人员来说,检查可能影响查询性能的特定配置也很有用。 您应该在Azure Data Studio中探索此工具。

翻译自: https://www.sqlshack.com/database-administration-tool-extension-for-windows-in-azure-data-studio/

azure云数据库

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值