In this article, we will discuss a number of questions that you may be asked when applying to a senior SQL Server database administrator position.

在本文中,我们将讨论申请高级SQL Server数据库管理员职位时可能会问到的许多问题。

  • Note: To learn more about Performance tuning as a DBA skill, please read this article: Why SQL Performance Tuning is the Most Important Database Management Skill to Have

    注意 :要了解有关作为DBA技能进行性能调优的更多信息,请阅读本文: 为什么SQL性能调优是最重要的数据库管理技能

Q1: You are working as an Azure database administrator in an international company. You are administrating an Azure SQL Database instance. Do you need to enable the Transparent Data Encryption feature to encrypt the database at rest?

Q1:您正在一家国际公司中担任Azure数据库管理员。 您正在管理Azure SQL数据库实例。 您需要启用透明数据加密功能来加密静态数据库吗?

No need to enable the Transparent Data Encryption feature on Azure SQL Database as it is enabled by default.

默认情况下已启用,因此无需在Azure SQL数据库上启用透明数据加密功能。

Q2: Could we store our database files in the temporary disks of the Azure Virtual Machine that hosts the SQL Server instance?

Q2:是否可以将数据库文件存储在承载SQL Server实例的Azure虚拟机的临时磁盘中?

When provisioning an Azure Virtual Machine to host a SQL Server instance, it comes with two default disks; the OS disk and a Temporary disk that is used to host the Pagefile.sys file. We cannot store the database files in the Temporary disk as data is not persisted on that disk.

在配置Azure虚拟机以承载SQL Server实例时,它带有两个默认磁盘;即,默认磁盘。 OS磁盘和用于承载Pagefile.sys文件的临时磁盘。 我们无法将数据库文件存储在临时磁盘中,因为数据未持久存储在该磁盘上。

Q3: You are working as a database administrator in an international company. You are administrating a SQL Server database that contains critical data stored in specific columns. What should you use in order to encrypt the critical data stored in these columns taking into consideration that the database administrators should not be able to view the critical data?

问题3:您正在一家跨国公司中担任数据库管理员。 您正在管理一个SQL Server数据库,该数据库包含存储在特定列中的关键数据。 考虑到数据库管理员不应该查看关键数据,您应该使用什么来加密存储在这些列中的关键数据?

You should use the Always Encrypted feature, by setting the column master key, the column encryption key then encrypts the required columns.

您应该使用始终加密功能,方法是设置列主密钥,然后列加密密钥对所需的列进行加密。

Q4: You are working as an Azure database administrator in an international company. Azure SQL Database allows you to create up to 128 firewall rules at the server level and at the database level. What should you use to create the server-level firewall rules and the database-level firewall rules?

问题4:您正在一家跨国公司中担任Azure数据库管理员。 Azure SQL数据库允许您在服务器级别和数据库级别最多创建128条防火墙规则。 您应使用什么来创建服务器级防火墙规则和数据库级防火墙规则?

Server-level firewall rules can be created using the Azure Portal and the T-SQL commands, where the database-level firewall rules can be created using T-SQL commands.

可以使用Azure门户和T-SQL命令创建服务器级防火墙规则,其中可以使用T-SQL命令创建数据库级防火墙规则。

Q5: You are working as an Azure database administrator in an international company. After provisioning an Azure SQL database instance. If you try to create the first server-level firewall rule using the T-SQL commands, will it work with you?

问题5:您正在一家国际公司中担任Azure数据库管理员。 设置Azure SQL数据库实例之后。 如果您尝试使用T-SQL命令创建第一个服务器级防火墙规则,它将适用于您吗?

It will not work. You need to create the first server-level firewall rule using the Azure Portal by adding the current client IP to be authorized to connect to the Azure SQL database instance from your machine using SQL Server Management Studio, then you can add other server-level and database-level firewall rules using the T-SQL commands.

不起作用。 您需要使用Azure门户创建第一个服务器级防火墙规则,方法是使用SQL Server Management Studio添加要授权从计算机连接到Azure SQL数据库实例的当前客户端IP,然后可以添加其他服务器级和使用T-SQL命令的数据库级防火墙规则。

Q6: You are working as a database administrator in an international company. You are administrating a SQL Server Always on Failover Cluster instance and you are planning to configure when a failover or restart is performed for the FCI. Which property should you set to achieve that?

Q6:您正在一家跨国公司中担任数据库管理员。 您正在管理“ SQL Server始终在故障转移群集”实例,并计划配置何时对FCI执行故障转移或重新启动。 您应该设置哪个属性来实现该目标?

The FailureConditionLevel property can be used to set the condition to perform a failover or restart for the FCI instance.

FailureConditionLevel属性可用于设置条件以执行FCI实例的故障转移或重新启动。

Q7: After encrypting the columns that contain critical data, you plan to increase the security by masking these columns using the Dynamic Data Masking masks. Will this achieve the security enhancement goal?

Q7:在对包含关键数据的列进行加密之后,您计划通过使用“动态数据掩码”掩码对这些列进行掩码来提高安全性。 这样是否可以达到安全性增强的目标?

This will not work as the Dynamic Data Masking feature does not apply to the columns that are encrypted with the Always Encrypted feature.

这将不起作用,因为动态数据屏蔽功能不适用于使用“始终加密”功能加密的列。

Q8: You are working as a database administrator in an international company. You are trying to enhance the performance of the application that is connecting to the SQL Server instance by controlling the parallelism behavior of the queries. This can be achieved by tuning the Max Degree of Parallelism and Cost Threshold for Parallelism server-level configurations. What are the two cases in which you will not consider tuning the Cost Threshold for Parallelism?

Q8:您正在一家跨国公司中担任数据库管理员。 您试图通过控制查询的并行行为来提高连接到SQL Server实例的应用程序的性能。 这可以通过为并行服务器级别配置调整“最大并行度”和“成本阈值”来实现。 在两种情况下,您将不考虑调整并行成本阈值?

When the Maximum Degree of Parallelism option is set to 1 or the number of logical processors available in the SQL Server is only one. In this case, the queries will always run in a single thread.

当“最大并行度”选项设置为1或SQL Server中可用的逻辑处理器数仅为1时。 在这种情况下,查询将始终在单个线程中运行。

Q9: You are administrating a SQL Server database in which you need to resolve an issue with the queries that become very slow after upgrading the SQL Server instance from SQL Server 2012 to SQL Server 2017. Which database level option should you configure to fix that issue?

Q9:您正在管理一个SQL Server数据库,在该数据库中,您需要解决将SQL Server实例从SQL Server 2012升级到SQL Server 2017之后变得非常慢的查询的问题。应配置哪个数据库级别选项来解决该问题?

The LEGACY_CARDINALITY_ESTIMATION database level option should be disabled, to set the cardinality estimation model of the database back to the SQL Server 2012.

应禁用LEGACY_CARDINALITY_ESTIMATION数据库级别选项,以将数据库的基数估计模型设置回SQL Server 2012。

Q10: You are working as a database administrator in an international company. You are administrating a large database table that is used to store the book’s information in the library. Although you are storing the library books information in a VARCHAR column with maximum varchar size equal to 50, you still need to minimize the amount of disk space used to store the table’s data as the table contains millions of records. Which compression method should you use?

Q10:您正在一家跨国公司中担任数据库管理员。 您正在管理一个大型数据库表,该表用于将书籍的信息存储在库中。 尽管您将图书馆图书信息存储在VARCHAR列中,最大varchar大小等于50,但是由于表包含数百万条记录,因此您仍需要最小化用于存储表数据的磁盘空间量。 您应该使用哪种压缩方法?

We should use the page-level compression as the row-level compression will not affect the VARCHAR columns.

我们应该使用页面级压缩,因为行级压缩不会影响VARCHAR列。

  • Note: To learn more about trends that impact Database Administration, please read this article: 5 DBMS Trends Impacting Database Administration

    注意 :要了解有关影响数据库管理的趋势的更多信息,请阅读本文: 5影响数据库管理的DBMS趋势

Q11: You are working as a database administrator in an international company. If a query that used to take a few seconds has been running for more than 30 minutes. What is the fastest method that can you use to check if that query is blocked by another session?

Q11:您正在一家国际公司中担任数据库管理员。 如果过去要花费几秒钟的查询已经运行了30分钟以上。 您可以使用最快的方法来检查该查询是否被另一个会话阻止了吗?

After getting the ID of the session that is running for a long time, you can easily execute the system stored procedure SP_Who2 providing that session number, then have a look at the BlkBy column from the result to see the ID of the session that is blocking that session.

获取长时间运行的会话的ID之后,您可以轻松执行提供该会话号的系统存储过程SP_Who2,然后从结果中查看BlkBy列以查看正在阻止的会话的ID那届会议。

Q12: Which system database is a read-only database that contains copies of all system objects?

Q12:哪个系统数据库是只读数据库,其中包含所有系统对象的副本?

Resource system database, that resides in the mssqlsystemresource.mdf file.

资源系统数据库,位于mssqlsystemresource.mdf文件中。

Q13: Which system database that is only created when the SQL Server instance is configured as a replication distributor?

Q13:仅当将SQL Server实例配置为复制分发服务器时才创建哪个系统数据库?

The Distribution database, that stores replications transactions and metadata.

分发数据库,​​用于存储复制事务和元数据。

Q14: Which DBCC command should you use to check the consistency of the system tables?

Q14:应该使用哪个DBCC命令来检查系统表的一致性?

DBCC CHECKCATALOG. The command that checks the catalog consistency.

DBCC CHECKCATALOG。 检查目录一致性的命令。

Q15: After running the DBCC CHECKDB command on a database, it is found that a non-clustered index is corrupted. How could you repair the corrupted index issue?

Q15:在数据库上运行DBCC CHECKDB命令后,发现非聚集索引已损坏。 您如何修复损坏的索引问题?

By rebuilding the index using ALTER INDEX REBUILD or using the REPAIR_REBUILD option of the DBCC CHECKDB command.

通过使用ALTER INDEX REBUILD或DBCC CHECKDB命令的REPAIR_REBUILD选项重建索引。

Q16: You are working as a database administrator in an international company. You are administrating a SQL Server instance and you plan to create a baseline of the properties and recovery model for all user databases that are created under that SQL Server instance. How could you achieve that?

Q16:您正在一家国际公司中担任数据库管理员。 您正在管理SQL Server实例,并计划为在该SQL Server实例下创建的所有用户数据库创建属性和恢复模型的基线。 你怎么能做到?

By applying the baselines to the Model system database that acts as a template for all newly created databases.

通过将基线应用于Model系统数据库,该数据库充当所有新创建数据库的模板。

Q17: You are administrating a SQL Server instance and you need to execute a SQL Agent job and notify the system administrator when a fatal error occurs on that SQL Server instance. How could you achieve that?

Q17:您正在管理SQL Server实例,并且需要执行SQL Agent作业,并在该SQL Server实例上发生致命错误时通知系统管理员。 你怎么能做到?

This can be achieved by defining an Alert that is fired when the severity of the raised errors is 17 and higher.

这可以通过定义在引发错误的严重性为17或更高时触发的警报来实现。

Q18: You are working as a database administrator in an international company. You are administrating a SQL Server instance on which you need to write a message to the server security log when a fixed server role is modified. How could you achieve that?

Q18:您正在一家跨国公司中担任数据库管理员。 您正在管理一个SQL Server实例,修改固定服务器角色后,需要在该实例上向服务器安全日志中写入一条消息。 你怎么能做到?

You need to define a SQL Server Audit Specification with the Server Audit target to the server Security Log.

您需要使用服务器安全日志的服务器审核目标定义SQL Server审核规范。

Q19: You are administrating a SQL Server database in which you are trying to overcome the current database storage limitation by stretching the table that you already enhanced using an indexed view and an index on the XML column. Will stretching the database to Azure achieves your goal?

Q19:您正在管理一个SQL Server数据库,在其中您试图通过使用索引视图和XML列上的索引来扩展已经增强的表,从而克服当前的数据库存储限制。 将数据库扩展到Azure是否可以实现您的目标?

No. This is because stretching the database to Microsoft Azure does not apply to the tables that have an indexed view or has a column with an XML data type.

不能。这是因为将数据库扩展到Microsoft Azure不适用于具有索引视图或具有XML数据类型的列的表。

Q20: You are working as a database administrator in an international company. You are administrating a SQL Server instance that serves multiple applications with no issue. In order to store data for another application that is not compatible with the current SQL Server version, you installed another named instance on that server. The application is not able to connect to the new SQL Server instance although the server is hosting another application that can connect to the default SQL Server instance. How could you fix this issue?

Q20:您正在一家跨国公司中担任数据库管理员。 您正在管理一个可以为多个应用程序提供服务SQL Server实例。 为了存储与当前SQL Server版本不兼容的另一个应用程序的数据,您在该服务器上安装了另一个命名实例。 尽管该服务器托管另一个可以连接到默认SQL Server实例的应用程序,但该应用程序无法连接到新SQL Server实例。 您如何解决此问题?

Start the SQL Browser service, as the default instance listening on the default TCP port 1433 and the named instance will listen on another TCP port.

启动SQL Browser服务,因为默认实例在默认TCP端口1433上侦听,命名实例将在另一个TCP端口上侦听。

You can also fix that issue by configuring the named instance to listen on a static TCP port and add an exception rule on the local server firewall to allow the application server to connect to the SQL Server on that TCP port.

您还可以通过配置命名实例以侦听静态TCP端口并在本地服务器防火墙上添加例外规则,以允许应用程序服务器通过该TCP端口连接到SQL Server来解决该问题。

翻译自: https://www.sqlshack.com/sql-server-senior-database-administrator-interview-questions-and-answers/

SQL Server高级数据库管理员面试问答相关推荐

  1. SQL SERVER 高级数据库脚本编程

    1,xtype use NorthWind go select * from sysobjects where xtype='U' xtype参数的意思 C = CHECK 约束 D = 默认值或 D ...

  2. sql server添加数据库管理员

    ----------------------------------------- --创建新的登录名 use master go exec sp_addlogin @loginame = 'mysa ...

  3. 【SQL Server】数据库开发指南(五)T-SQL 高级查询综合应用与实战

    本系列博文还在更新中,收录在专栏:#MS-SQL Server 专栏中. 本系列文章列表如下: [SQL Server] Linux 运维下对 SQL Server 进行安装.升级.回滚.卸载操作 [ ...

  4. 数据库管理员 - 面试手册

    数据库管理员 - 面试手册 岗位概述 数据库管理员(DBA)主要负责维护.管理和优化企业的数据库系统.他们需要确保数据库系统的稳定.安全和高效运行,以满足公司业务的需求.数据库管理员还需要定期备份数据 ...

  5. 同步SQL Server 2000 数据库

    为什么要同步SQL Server 2000 数据库,它都用在什么场合 数据实时备份同步,数据库服务器出问题时我们也有其正常工作时的备份 数据实时备份同步,一台服务器负载不起时,可以用来做负载均衡 数据 ...

  6. SQL Server 移动数据库

    SQL Server 移动数据库 原文:SQL Server 移动数据库 移动系统数据库在下列情况下可能很有用: 故障恢复.例如,数据库处于可疑模式下或因硬件故障而关闭. 计划的重定位. 为预定的磁盘 ...

  7. Eclipse如何连接SQL Server 2005数据库

    做管理系统当然少不了经常与数据库打交道,在网上搜了很多数据库版本都不小,大的有好几个G的,小的也有几百兆的,我这可怜的内存,最终找了个精简版中的精简版的Sql server2005,只有80几兆,本来 ...

  8. SQL Server HA - 数据库镜像 (Mirroring)

    数据库镜像简介 From: http://mssqlmct.blog.51cto.com/9951484/1641831 11.3  数据库镜像简介 11.3.1 数据库镜像会话 数据库镜像(Data ...

  9. 如何在Windows 10 上安装SQL Server 2000数据库?

    Win10本身是一个兼容性较好的操作系统,目前有很多人在咨询如何在Windows 10 上安装 SQL Server 2000数据库,都没有成功过.主要是卡在了安装过程中的mdac2.6 安装上,一直 ...

最新文章

  1. 他211本硕毕业,一边是年薪15万国企送北京户口,一边是28万大厂offer,究竟该怎么选?...
  2. php yii框架和laravel,yii2跟laravel的区别是什么?
  3. VC问题 IntelliSense:“没有可用的附加信息”,[请參见“C++项目 IntelliSense 疑难解答”,获得进一步的帮助]...
  4. java笔试面试经典问题
  5. 数据结构:链表(c语言)
  6. 中国软件开发project师之痛
  7. 谋求“同股不同权”,旷视赴港上市渐近
  8. android采用videoView播放视频(包装)
  9. 问你觉得iOS7为什么要扁平化,扁平化和之前的比有什么优势
  10. 使用linux批量引物设计,【分享】超实用的引物设计操作,一看就学会
  11. 朋友圈加粗字体数字_如何让你的朋友圈骚到脱颖而出?
  12. java开发常用排名前16的Java工具类
  13. 北京专科计算机学校排名及分数线,北京专科大学排名及分数线
  14. CSAPP实验2:bomblab
  15. 图像检索:INS视觉检索
  16. Excel2003常用快捷键
  17. Android实现用户圆形头像+背景模糊
  18. [Java]用Random类来模拟双色球开奖
  19. 使用moviepy快速剪辑和拼接视频
  20. iOS音视频实现边下载边播放

热门文章

  1. 乘法口诀练习(python-for循环)
  2. Redis学习笔记(四) 发布订阅命令
  3. 字符流Reader和Writer
  4. Android Support Annotations
  5. C++类的成员变量和成员函数的介绍
  6. window.event对象详尽解析
  7. 把discuzX 的用户登录信息添加到纯静态页面
  8. 常用作业定义的T-SQL模板.sql
  9. python是干什么的
  10. 个人所得税的申报方式有两种,分别有什么区别?该怎么选?