No., around 10.30. the user cannot log on. The initial situation is that the login module has timed out and the error screen has not been found for a friendly interface.
Restart IIS. Finally, the user fails to access the database only after the log is displayed. Open the query analyzer and find that the database cannot be opened. Only the database name can be seen.
Then, I tried to let the students look at it and finally I couldn't help but delete it and add it again. Because the log file is too large, I tried to create new data and load a single MDF file but failed,
In the end, I used the database management tool to append the database. Even though it took 10 minutes to append the database, there were too many databases on the database server and the database volume was very swollen.
Next we will compress the log, and let us know first. There are other databases that have similar situations. I don't know why, and the database files cannot be accessed in the Manager, DBMS basically does not access existing database files
Then, the user database was directly deleted,Do not delete database files, but delete the database and manually attach the user database to it.After a while, it's a strange thing .....
Dizzy. Later, I checked it as if it was executed.ExecSp_change_users_login'Auto _ fix'
Then it will be fine. I don't know how it works.
However, compressed logs are useful.
Compressing database logs
-- 1. Clear logs
Exec ('dump transaction ['+ @ dbname +'] With no_log ')
-- 2. truncate transaction logs:
Exec ('backup log ['+ @ dbname +'] With no_log ')
Execute these two steps to direct my log from 12 GB to more than 1 GB.