2

.ldf file is corrupted so I need to completely rebuild master database on a SQL Express 2008 installation. Is there anything short of destroying the instance completely and starting over?

Kara Marfia
  • 7,882

4 Answers4

1

I'm not understanding why you can't restore the master database from a recent backup. I've done it before with SQL Server 2005. (I must be missing something here.)

How to Restore the master Database

0

The dead silence after the responses that have already been provided tells me that you might not have a backup. If you don't, your only option is rebuild. Have a look here for a post by CSS on rebuilding system databases in SQL 2008.

Aaron Alton
  • 1,168
0

Evidently when the question got transferred, it is not assigned to the author any more. I don't have a back of master, but I do have backups of the customer data.

I ended up uninstalling SQL Express and re-installing. It left only the customer data in the data folder when I uninstalled, then I used SQLCMD to connect and reattach the database.

-1

You can reattach databases to a new instance of SQL 2008. Thus preventing you from having to start from scratch.

You could also try installing a new SQL Express instance somewhere else and then copying the master.ldf file from that to your existing instance (while sql is stopped) and then, if needed, reattach the old databases.