But what does "last trick" mean? What will happen when you use this command? Which command should you use to replace it? Finally, if this command is so problematic, why does Sybase provide it?
Sybase Technical Support recommends that you regularly dump your transaction log. You must determine the dump mode based on the amount of activities recorded in the log in your database and the size of your database. Dump transaction on a monthly basis in some places; dump transaction on a daily basis in some places.
Note: If you are running SQL Server10.0, you can use sp_thresholdaction to automatically dump tran before the space is insufficient. In addition, the Backup Server ensures that the task will not be suspended during dump. Please obtain more detailed information in your SQL Server reference manual. The rest of this article will be applicable to SQL Server versions earlier than version 10.
If you have never dumped transaction, transactionlog will eventually be full. SQL Server uses logs for recovery purposes. When the log is full, the server will stop the transaction, because the server will not be able to write these transactions into the log, and the server cannot run most of the dump tran commands, because SQL Server also needs to record these commands in the log.
This is why no_log is executable when other dump tran commands cannot be executed. But think about the environment where dump transaction with no_log is designed and executed. All do not perform concurrency checks.
If you use dump transaction with no_log when modifying the database, you may be at risk of database crash. In most cases, they are reflected as 813 or 605 errors. Dump transaction with trancate_only can be used to delete the inactive part of the transaction log when the database is modified. When this command is written into the transaction log, it does not need to check the concurrency. Both commands have related warnings, which are displayed in the command reference manual. Make sure that you understand the warnings and instructions before using any of the commands. Syase provides dump transaction with no_log to handle some very pressing situations. To ensure Database Consistency as much as possible, you should take it as the "last move ".