I tried to use the registration page for my site after not changing anything, and suddenly this error message appeared:
The log for database "x" is not available. Check the event log for related error messages. Resolve any errors and restart the database.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
I tried to reopen the program & database, tried to refresh the database, but nothing worked. What can be the problem?
To enable temporary SQL logging:Go to > General Configuration > Logging and Profiling. Choose Enable SQL Logging.
SELECT 'x' from table returns the constant value x for all rows. It's often used in EXISTS because the EXISTS predicate doesn't care about values, it's only concerned about whether or not there's a row. SELECT x from table returns the column named x from the table, or an error if there is no column named x.
If no recent transaction log history is indicated for the database with a full transaction log, the solution to the problem is straightforward: resume regular transaction log backups of the database.
It is possible that the database was set to AutoClose, or was set OFFLINE, or while the SQL Server service wasn't running, an .ldf file was deleted or corrupted/compressed by other people or tools.
Make a copy of the MDF file and you can try to attach it using:
CREATE DATABASE mydb_copy ON (filename = 'C:\path to.mdf') FOR ATTACH_REBUILD_LOG;
Otherwise, start looking for a backup...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With