You say it is giving you an error. What is the error? Is it a connection error or a data-extraction error?
In other words, can you connect to your data source at all?
Also, where are you publishing the app? Did you develop the app in Qlik Sense (server) and publish it on the same server, or did you develop the app on the desktop version and then publish it on the server?
And finally, what is the data source? You say "sql" but do you mean "SQL server"? What is the connection string? Do you have the correct driver installed on the Qlik Sense server?