Home Database Mysql Tutorial SQLServer DBA 三十问

SQLServer DBA 三十问

Jun 07, 2016 pm 03:25 PM
dba sqlserver thirty develop

很多开发人员都想成为一名DBA,也有很多人一开始就把自己定位成为一名DBA,DBA究竟需要掌握些什么知识和技能呢?以下是我 做DBA工作和面试DBA时,整理的一些DBA方面的三十个问题,三十个大问题中还有许多小的问题,涵括了SQLServer DBA比较多的技 术知识点,

    很多开发人员都想成为一名DBA,也有很多人一开始就把自己定位成为一名DBA,DBA究竟需要掌握些什么知识和技能呢?以下是我

做DBA工作和面试DBA时,整理的一些DBA方面的三十个问题,三十个大问题中还有许多小的问题,涵括了SQLServer DBA比较多的技

术知识点,与大家分享下,希望给有志做DBA的朋友们一些帮助:

 

1. char、varchar、nvarchar之间的区别(包括用途和空间占用);xml类型查找某个节点的数据有哪些方法,哪个效率高;使用存储

   过程和使用T-SQL查询数据有啥不一样;

2. 系统DB有哪些,都有什么作用,需不需要做备份,为什么;损坏了如何做还原(主要是master库);

3. 有哪些操作会使用到TempDB;如果TempDB异常变大,可能的原因是什么,该如何处理;

4. Index有哪些类型,它们的区别和实现原理是什么,索引有啥优点和缺点;如何为SQL语句创建合适的索引,索引创建时有哪些需要

    注意的项,如何查看你创建的索引是否被使用;如何维护索引;索引损坏如何检查,怎么修复;T-SQL有更好的索引存在,但是运行

    时并没有使用该索引,原因可能是什么;

5. 视图上我们能建索引吗,如果能建的话,会啥好处和坏处;视图上建索引和表上建索引有啥区别;

6. Job信息我们可以通过哪些表获取;系统正在运行的语句可以通过哪些视图获取;如何获取某个T-SQL语句的IO、Time等信息;

7. 在线系统,一个表有五千万记录,现在要你将其中的两千万条记录导入到另一台服务器的某个表中,导完后,需要将这两千万数据删

   除,你预备如何处理,优缺点是什么;

8. 数据库服务器报磁盘空间不足,你将如何应对,要求尽快恢复;

9. 临时表、表变量、CTE(公用表表达式)有啥区别和联系,保存位置有啥不一样,使用时如何决定选哪种;

10. SQLServer有哪些隔离级别,默认级别是哪个;数据库有哪些主要的锁类型;行版本控制是如何实现的;

11. 死锁如何跟踪;阻塞如何跟踪和查找;发现有问题的语句后,如何进行处理;用Profile做跟踪时,一般我们需要跟踪哪些事件;

12. Windows日志主要有哪几种,SQLServer日志一般保留几个,什么情况下会产生新的SQL日志;数据库日志恢复模式有哪几种,

     区别是什么;数据库日志突然变得很大,而且你无法收缩,可能的原因是什么,怎么查找原因,分别将如何处理;

13. 分区表和分区视图是什么概念,一般是在什么情况下使用,有啥好处;

14. 如何比较两个同结构的表数据的差异;如果表损坏了,如何修复;如何在备份文件有问题的情况下尽量还原数据;如何将一个表

     的Identity属性归零;

15. CheckPoint、LazyWriter和Eager Write的区别和作用;DDL Trigger 和 DML Trigger的区别和作用;

16. Mirroring 和Logshipping 的区别和使用场景;SQLServer的Mirroring与Oracle的哪像技术比较接近,它们的区别是啥;

17. Mirroring的搭建步骤,Mirroring三种模式的区别,Mirroring 中同步和异步的原理和要求,搭建了Mirroring后,需要对数据库日志做

     什么处理;

18. Replication配置和使用场景;Replication有哪几种模式;PUSH和PULL有啥区别;搭建Replication后会产生一个什么库;报错时

     用什么来查看报错的具体语句,清理掉某个库的Replication使用什么语句,查看同步链信息主要通过哪些表;

19. Replication发布端的表能truncate吗,为什么;Replication Identity列如何处理、缺失字段错误如何处理、主键冲突错误如何处

     理、如何跳过指定的错误、订阅端表被删除了如何处理、大规模改动数据如何处理;某条同步链因为其中的某个表一次性改动数据很

     大造成同步链的严重延时,要求尽快恢复同步链,如何处理。

20. SSB(Service Broker)使用场景,如何创建,都会创建些什么对象,有啥优缺点,主要通过什么方式实现不同服务器之间的消息

     传递;可以通过哪些方式排错;

21. 跟踪数据库数据的变更有哪些方法,它们(CDC(Change Data Capture)、CT(Change Tracking)、Trigger等)使用上的

     优缺点;

22. SQL调优步骤,如何来判断SQL语句存在问题,怎么定位问题,如何解决这些问题;Nested Join、Merge Join和Hash Join的区别;

23. 数据库故障排查步骤,如何处理紧急数据库问题;

24. 如何考虑和制定数据库备份计划;公司要求对一个非常大的数据库或者表做备份,而且要求数据量尽可能少丢失,你可能会采用什么

     方法;

25. 如果要你做数据库监控,你会关注那些指标(包括SQLServer和Windows),如何制定性能基线,你使用过哪些监控软件;

26. 数据库迁移步骤;重建一套比较大的测试系统(最少10个数据库实例),如果原来DB数据量都不大,但DB比较多,新搭建的系统数据

     都不需要,如何快速实现;

27. 创建Cluster 简要步骤,最少需要几个IP,需要安装些什么服务,需要哪些固定的磁盘,Raid如何设置,磁盘如何划分;SQLServer 

    Cluster与Mysql Cluster 和 Oracle RAC的区别等;

28. 如果遇到一个性能不理想、代码复杂的存储过程,很难通过数据库方面的调优来解决问题,你如何说服开发人员修改它(可能开发人

     员并不愿意修改);

29. 你有没有遇到过因为你的误操作造成系统故障发生的情况,你当时是如何处理的;如果没有,假定你误删了一个重要的表,你该如何

      处理;

30. 你准备成为一名什么样的DBA,为此你将如何准备(或者你有怎样的职业规划,准备怎样度过你的DBA生涯);如果你进入公司,你

     最想获得的是什么。

 

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to import mdf file into sqlserver How to import mdf file into sqlserver Apr 08, 2024 am 11:41 AM

The import steps are as follows: Copy the MDF file to SQL Server's data directory (usually C:\Program Files\Microsoft SQL Server\MSSQL\DATA). In SQL Server Management Studio (SSMS), open the database and select Attach. Click the Add button and select the MDF file. Confirm the database name and click the OK button.

How to solve the problem that the object named already exists in the sqlserver database How to solve the problem that the object named already exists in the sqlserver database Apr 05, 2024 pm 09:42 PM

For objects with the same name that already exist in the SQL Server database, the following steps need to be taken: Confirm the object type (table, view, stored procedure). IF NOT EXISTS can be used to skip creation if the object is empty. If the object has data, use a different name or modify the structure. Use DROP to delete existing objects (use caution, backup recommended). Check for schema changes to make sure there are no references to deleted or renamed objects.

How to check sqlserver port number How to check sqlserver port number Apr 05, 2024 pm 09:57 PM

To view the SQL Server port number: Open SSMS and connect to the server. Find the server name in Object Explorer, right-click it and select Properties. In the Connection tab, view the TCP Port field.

How to recover accidentally deleted database in sqlserver How to recover accidentally deleted database in sqlserver Apr 05, 2024 pm 10:39 PM

If you accidentally delete a SQL Server database, you can take the following steps to recover: stop database activity; back up log files; check database logs; recovery options: restore from backup; restore from transaction log; use DBCC CHECKDB; use third-party tools. Please back up your database regularly and enable transaction logging to prevent data loss.

What to do if the sqlserver service cannot be started What to do if the sqlserver service cannot be started Apr 05, 2024 pm 10:00 PM

When the SQL Server service fails to start, here are some steps to resolve: Check the error log to determine the root cause. Make sure the service account has permission to start the service. Check whether dependency services are running. Disable antivirus software. Repair SQL Server installation. If the repair does not work, reinstall SQL Server.

Where is the sqlserver database? Where is the sqlserver database? Apr 05, 2024 pm 08:21 PM

SQL Server database files are usually stored in the following default location: Windows: C:\Program Files\Microsoft SQL Server\MSSQL\DATALinux: /var/opt/mssql/data The database file location can be customized by modifying the database file path setting.

Four recommended AI-assisted programming tools Four recommended AI-assisted programming tools Apr 22, 2024 pm 05:34 PM

This AI-assisted programming tool has unearthed a large number of useful AI-assisted programming tools in this stage of rapid AI development. AI-assisted programming tools can improve development efficiency, improve code quality, and reduce bug rates. They are important assistants in the modern software development process. Today Dayao will share with you 4 AI-assisted programming tools (and all support C# language). I hope it will be helpful to everyone. https://github.com/YSGStudyHards/DotNetGuide1.GitHubCopilotGitHubCopilot is an AI coding assistant that helps you write code faster and with less effort, so you can focus more on problem solving and collaboration. Git

How to delete sqlserver if the installation fails? How to delete sqlserver if the installation fails? Apr 05, 2024 pm 11:27 PM

If the SQL Server installation fails, you can clean it up by following these steps: Uninstall SQL Server Delete registry keys Delete files and folders Restart the computer

See all articles