How to disable logging on SQL Server
This week I had some problems with the database transaction log, which when running a query presented the following error:
In other words, the database transaction log was full, but the bank was a mere 50 Mb in size, that is, I wanted to disable this log since I do not use it.
ALTER DATABASE x SET RECOVERY SIMPLE;
or to return to using the full transaction log, follow the command:
ALTER DATABASE x SET RECOVERY FULL;
"X" being your database containing the tables.
The transaction log for database 'x' is full. To find out why space in the log cannot be reused, [...]
In other words, the database transaction log was full, but the bank was a mere 50 Mb in size, that is, I wanted to disable this log since I do not use it.
The log is used to show which codes were executed in the bank, and there are two types of logs (and it is not possible to disable):
Simple (Simple) and Complete (Full).
Full stores all the bank's actions in a log, and the simple discards all changes in the bank as soon as a checkpoint is performed, or better, every script interaction in the database.
To change between the two, use the command:
or to return to using the full transaction log, follow the command:
ALTER DATABASE x SET RECOVERY FULL;
"X" being your database containing the tables.
No comments