
How to resolve deadlock in MS SQL Server?
Each session has an exclusive lock on one row. But after that, both sessions want to update the row that the other session has locked, resulting in a deadlock. SQL Server can clear this deadlock by killing one of the transactions, which we can call the deadlock victim.
How to make .bak file in SQL Server?
Backup SQL Server into a Bak File Using SSMS (SQL Server Management Studio)
- Launch SSMS and connect it to your server instance.
- Choose the database instance you want to backup in Object Explorer.
- Right-click and select Tasks> Backup.
- Select backup type and destination.
How to remove duplicates in MS SQL?
SQL Remove Duplicates: Comprehensive Methods and Best Practices
- Methods for Removing Duplicates in the Data You Retrieve.
- Using DISTINCT keyword.
- Using GROUP BY with aggregate functions.
- Using ROW_NUMBER() with Common Table Expressions (CTE)
- Removing duplicates using self-JOIN.
How to trace SQL queries with MSSQL profiler?
How to trace SQL queries with MSSQL Profiler
- Open MSSQL Management Studio → Tools → SQL Server Profiler.
- Open File, then select "New Trace…".
- Go to the Events Selection Tab, enable "Show all columns" then check the following checkboxes found under the DatabaseName, Error, and SessionsLoginName columns:
In this quickstart, you create a new database, take a full backup of it, and then restore it. For a more detailed how-to, see Create a full database backup.
Сначала настроим создание копий на локальный диск. Для этого идем в раздел General → Databases и выбираем базы, которые будем копировать. Тип копии при этом …
Бэкап MS SQL, в любой универсальной системе резервного копирования, предусматривает установку и аутентификацию специального агента (модуля) на сервере базы …