SQLSERVER ERROR in C # application

3

I have a problem with the SQLSERVER database.

I try to connect from a point to the server and the error appears:

  

Network-specific or instance-specific error when connecting to   SQL Server. The server was not found or was not accessible.   Verify that the instance name is correct and that SQL Server is   configured to allow remote connections

Note 1: The database is "running" normally in place (server).

Note 2: After the test battery, the TCP / IP configuration is OK. (PORT 1433 OK)

Note 3: I can usually access also via IIS.

Note 4: I changed the database to another server and it worked normally.

Note 5: It was working until yesterday ....

Note 6: At 2 physical points the problem occurred.

Note 7: I pinged normally from physical points to the server (ok)

base:

Data Source=192.168.1.1;
Initial Catalog=banco;
User ID=sa;
pwd=senha;
MultipleActiveResultSets=True;
Connection Reset=True;
Connection Lifetime=600
    
asked by anonymous 01.07.2015 / 16:11

3 answers

4

Check two things through SQL Server Management Studio:

Because it is SQL Server Express, you may need to specify the instance name:

Data Source=192.168.1.1\SQLEXPRESS;
Initial Catalog=banco;
User ID=sa;
pwd=senha;
MultipleActiveResultSets=True;
Connection Reset=True;
Connection Lifetime=600
    
01.07.2015 / 17:15
0

Solved. It was the firewall. although the sql input rules are correct, after the server shutdown this has occurred. We deactivated the firewall and it worked.

    
01.07.2015 / 19:28
-1

Try this:

data source=Máquina\Instancia;
initial catalog=Nome_Banco;
persist security info=True;
user id=usuario;
password=senha;
MultipleActiveResultSets=True;
App=EntityFramework" 
providerName="System.Data.SqlClient"

This way with me, I never stayed in the hand. Copy this string and change it to your need and try.

    
01.07.2015 / 16:51