Current location - Health Preservation Learning Network - Slimming men and women - Mysql database contraction problem
Mysql database contraction problem
Database files are not easy to shrink.

Mainly to shrink the log of the database.

This shrinkage is very large, and the 5G log file may eventually shrink to 5 12K.

I'll tell you a simple shrinkage method.

1. Clear the log

Dump the transaction library name with NO_LOG

2. Truncate the transaction log:

Backup log database name with NO_LOG.

3. Shrink the database file (if it is not compressed, the database file will not shrink.

Enterprise Manager-Right-click the database to be compressed-All tasks-Shrink database-Shrink files.

-Select log file-Select shrink to XXM in shrink mode, and the minimum number of m allowed to shrink will be given here. Enter the number directly and confirm.

-Select data file-Select shrink to XXM in shrink mode, and the minimum number of m allowed to shrink will be given here. Enter the number directly and confirm.

* * * * * This method is very immediate, and I wish you good luck * * * * * * * *