Thanks Jan. I tried out the WP-DBManager but I didn’t see any option to repair the DB.
I looked at the DB in phpmyadmin and it looked like the ‘wp_posts’ table got totally corrupted. I don’t know what happened.
Fortunately I do have backups. I just created a whole new database and copied all the wp tables into it. Everything seems fine now.