Sql Server 2000 on Win 2k:
I'm recieving the following message when trying to reattach a database file: "Error 823: I/O error 38(Reached the end of the file.) detected during last read at offset 0000000000000000 of file 'D:\MSSQL\Data\DbName_log.ldf'." The database came offline after a disk problem and it looks like the log file became corrupted. Any ideas on a way to restore this database from only the mdf files? Can you reattach a DB and recreate the log file?
My other idea was possible inserting into sysdatabases, putting the Db in 32768=emergency mode, and running DBCC CHECKDB? If that is even possible???
The log file is corrupted. You need to create new log file for the database. The thing is that you will lose all the uncommitted transaction. use dbcc rebuild_log to create a new log file and reattach the db.