Hi @Avyayah ,
>What can I do to reduce the size of the logspace of those databases
Shrinking log files will reduce the size of log files. In order to shrink transaction log, please follow the steps below:
- Perform transaction log backup. We need have a full back up for this database, before doing log backup.
sometimes, we have to perform multi transaction log backup before the transaction log could be shrank. - Shrink transaction log ( DBCC shrink file or using SSMS UI)
If the transaction log cannot be shrank, please execute the following statement to check why the transaction log cannot be shrink: SELECT log_reuse_wait_desc FROM sys.databases WHERE name='<database name>'
If the result is other than NOTHING, please perform corresponding operation. Then please try step 1 and 2 again.
Refer to MS document Shrink a File and sys.databases (Transact-SQL).
Suggest you read the blog Eight Reasons why your Transaction Log Files keep growing. . Find the reason for log keep growing, in case this problem happens again.
If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.