SQL malfunction after Recovery