Can you please clarify when you say 'publish online' so you mean publishing to Tableau Online, or to your own hosted instance of Tableau Server (if so which version are you running)?
We use Tableau Server v10.1.1 having recently upgraded from v9.0.3 and have many workbooks that use extracted Excel data sources and Tableau server datasources which are in turn connect live to SQL Server. These are on a schedule to refresh to pull through changes to the Excel data (as not every user has access to the file where the data is stored), but the Tableau Server data sources aren't extracted (either on server or in the workbook) and pull through the latests data fine. I appreciate this is slightly different from your set up where you're connecting directly to the SQL data source. I'd have to test this scenario out myself when back at work.
If you're using Tableau Online, then I'm afraid I'm not familiar with how the data connections all need to be set up, although at one point I didn't think it was possible to have live connections to SQL Server, though I think that may have changed now (providing your SQL Server is also a cloud based instance)...
This is Tableau Online
Ok thanks for clarifying Mehul. Apologies, but this isn't an application I use, so am not wholly familiar with how things need to be set up with live connections.
Here's a few of the online help articles that may help you if you haven't seen them already
If these don't help you get to the bottom, then you may need to raise a support ticket to investigate your set up.