What version of Tableau Server? Do you have the proper drivers installed on the Tableau Server?
I've run into this before, but do not recall right now what the solution was. If it pops into my head, I will be sure to post.
This error usually occurs when trying to refresh a file based extract like an excel file or csv which is located on another server or a mapped drive due to not using a UNC file path. Error "Invalid database name value" Running Extract Refresh | Tableau Software
Here's another community post where someone resolved their issue by adjusting to the UNC path and provides a good explanation: Server Question: "Invalid database name value"
You said this was a SQL connection? Can you clarify what database type this was originally before publishing the data source?
This is a shot in the dark but try using the FQDN of the server name, e.g. don't use SQLServerABC, use SQLServerABC.yourcompany.com.