If you are using a remote database with shinyapps.io, you may need to use RODBC to connect to it in your R code. Fortunately, RODBC is installed on the shinyapps.io servers, so you'll just need to ensure that you've written your code to use the correct drivers. To do that, you'll need to ensure that you're using the FreeTDS drivers:
FreeTDS;TDS_Version=7.0; Server=<server>;Port=<port>; Database=<db>;Uid=<uid>;Pwd=< pw>;Encrypt=yes; TrustServerCertificate=no; Connection Timeout=30;')
TDS_Version=9.0have been successful for users in the past.