Connect to SQL Server on remote server

4

I need to connect to a SQL Server service on a remote server via SQLConnection, C #. Initially, it was giving the server could not be found, but I solved this by modifying the system32 hosts file, enabling exception on the server firewall and enabling the SQL Server Browser. However, he now gives me an exception saying "Timeout has been reached" when trying to open connection to the bank. What should I do?

Here's the connection string example I'm using: "Data Source = xxx.xxx.xxx.xxx / MSSQLSERVER, 1433; Database = myBank; User Id = sa; Password = ************;"

    
asked by anonymous 02.02.2016 / 14:57

1 answer

1

One thing that happens on some servers that I've already moved is that you do not need to specify the instance in case of a remote connection.

Try using only:

Data Source=xxx.xxx.xxx.xxx,1433;Database=meuBanco;User Id=sa;Password=************;
    
02.02.2016 / 18:45