config to sql