How to fix An explicit value for the identity column error? | Insert statement failed with Error 8101

This Article guide , How to fix An explicit value for the identity column error? | or Insert statement failed with Error 8101 What is identity column? An identity column, also referred to as an auto-increment column or a sequence, is an integral component of a database table that automatically generates a unique numeric value … Read more

How to resolve, the server principal owns one or more availability group(s) and cannot be dropped?

This article about, How to resolve, the server principal owns one or more availability group(s) and cannot be dropped? What is availability group? Availability Groups are a feature in Microsoft SQL Server that provide high-availability and disaster recovery for user databases. They were introduced in SQL Server 2012 as a database-level solution, allowing multiple databases … Read more

How to write simple SQL queries? | Learn simple SQL queries

This is video tutorial on How to write simple SQL queries? or Learn simple SQL queries SQL queries are versatile, and they can be utilized for numerous operations, including creating and modifying tables, inserting, updating, or deleting data from tables, selecting data from one or multiple tables based on specified conditions, joining tables to combine … Read more

How to get deadlocks history in SQL Server using system_health extended events?

This article helps to find Deadlock history or How to get deadlocks history in SQL Server using system_health extended events? Deadlock : refers to a situation where two or more transactions are waiting for each other to release resources, resulting in a state of permanent blocking. This impasse prevents any of the transactions involved from … Read more

How to troubleshoot service principal name issue? | The SQL Server Network Interface library could not register the Service Principal Name (SPN) in SQL Server

This article help to resolve, How to troubleshoot service principal name issue? | The SQL Server Network Interface library could not register the Service Principal Name (SPN) in SQL Server What is SPN? In SQL Server, the Service Principal Name (SPN) is a unique identifier used to associate a service instance with a specific domain … Read more

How to restore database in SQL server 2022?

This Video have step by step process of How to restore database in SQL server 2022? How to Restore database on SQL Server from Backup? There are 2 ways to restore database. Option 1 : Restore database using SSMS Option 2 : We can restore database using T-SQL Point in time Restore : Sometime we … Read more

How to take database Backup on SQL Server?

This is video blog guide about

How to take database Backup on SQL Server?

Video Description : How to take database Backup on SQL Server?

How to perform Backup and restore activity on SQL Server?
As a SQL DBA you should know how backup and restore process work

SQL Server support 3 type of backups
FULL Backup
Differential Backup
Transaction log Backup
– This used to perform point in time restore

We can take backup using SSMS or T-SQL backup using SSMS.
If database recovery model is FULL then only we can take Transaction Log backup. Recovery Model of WideWorldImporters is Simple so T log backup is not allowed.

How to take database Backup on SQL Server using T -SQL:

Backup database [WideWorldImporters] to disk = ‘C:\Omkar\backups\backup\WideWorldImporters.bak’ with compression,stats =10

Will try same process with DBATools database which have FULL Recovery MODEL.After taking full and Differential backup it allowed to take transaction log backup because
Recovery model is FULL and extension for transaction log backup is .trn

We can schedule backup of databases using SQL Server agent job periodically. This will help to recover data in case of disaster. There are many options available to take backup
Create maintenance plan is one of the way which take backup base on schedule.
So we have create FULL backup plan which will run daily at 10 AM.
Same as above we can create backup job for differential backup and T log backup

If your database size is huge 500+ GB then best schedule will be
FULL Backup – Weekly
Differential -Daily except full backup schedule
T-Log backup every 15 min(Depend on how much data you want to recover)

This plan will help to recover as much as data in case of disaster.
Backup plan executed successfully and taken backup for each database present in plan.

How do I backup my SQL Server database to Azure blob storage?

Get filename from path string in SQL 2022 | Extract file name in SQL query

This article guide , Get filename from path string in SQL 2022 | Extract file name in SQL query Sometime to performing task we need to get or extract filename from full file path For. e.g. If we need to restore database from another SQL server backup file. In that case we need to replace … Read more

How to resolve Cannot export bacpac in SQL Server Error SQL71564? | The element has been orphaned from its login and cannot be deployed

This article guides to resolved, How to resolve Cannot export bacpac in SQL Server Error SQL71564? | The element has been orphaned from its login and cannot be deployed What is bacpac? Bacpac is backup file imported from AZURE SQL database or SQL Server. Bacpac is used to to migrate databases from SQL Server to … Read more

The transaction log for database ‘msdb’ is full due to ‘ACTIVE_TRANSACTION’ | Sql server – log is full due to ACTIVE_TRANSACTION

This article helps to resolve, The transaction log for database ‘msdb’ is full due to ‘ACTIVE_TRANSACTION.’ or Sql server – log is full due to ACTIVE_TRANSACTION As a DBA we face issue like the transaction log for database ‘msdb’ is full due to ‘ACTIVE_TRANSACTION. Because of that disk is getting full and we are not … Read more