1. Clear logs
Dump transaction dbname with no_log
2. truncate transaction logs:
Backup log dbname with no_log
3. Shrink database files
Enterprise Manager-> right-click the database you want to compress-> all tasks-> shrink database-> shrink File
-- Select Log File> select shrink to xxm In the shrink mode. Here, a minimum number of MB allowed to be shrunk is displayed. Enter this number directly and click OK.
-- Select data file-select to shrink to xxm in the contraction mode. Here, a minimum number of MB allowed to be shrunk is displayed. Enter this number directly and click OK.
4. In order to automatically contract in the future, make the following settings:
Enterprise Manager-> server-> right-click Database-> properties-> options-> select "auto contract"
5. If you want to prevent the log from increasing too much in the future
Enterprise Manager-> server-> right-click Database-> properties-> transaction log
-> Limit file growth to xm (X is the maximum data file size you allow)