Hi anonymous user,
Is it default behavior or do I need to change some parameters?
You need to firstly backup the log and then run DBCC SHRINKFILE, steps as next:
1.backup file
BACKUP LOG DatabaseName TO DISK=’ ’
2.DBCC SHRINKFILE:
DBCC SHRINKFILE (DatabaseName_Log, EMPTYFILE)
Quote from this doc.:
...
The shrink operation can't reduce the file size any further if there's insufficient free space available.
Typically it's the log file that appears not to shrink. This non-shrinking is usually the result of a log file that hasn't been truncated. To truncate the log, you can set the database recovery model to SIMPLE, or back up the log and then run the DBCC SHRINKFILE operation again.
...
More information: shrinking-sql-log-files-in-an-availability-group-cluster-or-database-mirror
BR,
Mia
If the answer is helpful, please click "Accept Answer" and upvote it.