Why do we need transaction logs to delete or not add log files? The answer is no, if there is no transaction log, your database will not work at all!
The transaction log supports the following operations:
Transaction rollback
If the user or program uses the ROLLBACK statement or the database detects a failed operation. These log files will be used for rollback.
Redo Unfinished transactions
If you restart the database server (service) When a database error occurs, you may find that the database is in recovery mode (in Recovery), which indicates that the database is rolling back a transaction that was not completed before the server (service) was restarted. or continue to perform transactions that have been written to the log file and have not been written to the data file. If you use with RECOVERY in the Restore database, you can also see that the database is in recovery mode.
Recovering a database, file, filegroup, or data page before the error point
If SQL Server has an error and you need to revert to the data before the error occurs, you can implement it as long as you select the full recovery mode. You just have to get a previous full backup, then check the current differences and the subsequent transaction logs to where the error occurred. A detailed introduction will be made later.
High-availability Solutions
This will be detailed in the back.
Why SQL Server requires transaction logs