Change db format to sql