recovering original sql