SQL Server does not exist or access denied on a local machine

sqlssms

I have the following exception when trying to open a connection to the server since last week.

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
  • I'm using MSSQL Server 2008 Express
  • Allow remote connections is checked
  • My application,SSMS and the server are in the same computer
  • I can connect to the database from SSMS
  • I used to be able to connect to the server one week ago. The only change is the modification of settings : recovery option of first failure , seconde failure and subsequent failure to "Restart the Service" on the properties windows of Sql Server services.
  • I am not admin of my computer and can't have it except when a support take the hand on my computer
  • connection string :

    Provider=SQLOLEDB;Data Source=ComputerName\SQLEXPRESS;Initial   Catalog=DatabaseName;Integrated Security=SSPI
    
  • Shared Memory, Named pipes tcp/ip are enabled both for protocol for SQLEXPRESS and "Client Protocols".
  • the only differences I can find between the "before" error log and the "after" is :

    Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
    2013-04-15 19:13:27.98 Serveur     The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x490, state: 16. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
    2013-04-15 19:13:28.53 spid10s     Erreur : 1802, Gravité : 16, État : 4.`
    

Thanks for your time.

Best Answer

What is your application written with? Visual Studio?

Where does your connection string come from? Doesn't look like what Visual Studio is generating.

Change your connection string to Data Source=ComputerName\SQLEXPRESS;Initial Catalog=DatabaseName;Integrated Security=True

Edit :

OK, so you're using Visual Studio. Go in the Server Explorer tab and add a connection to your SQL server, add a DBML file to your project (don't have Visual Studio here, but it's called Linq to SQL classes I think), then pull whatever table from your server in the DBML and save. This wlll make Visual Studio create a connection string automatically. Then go in the project properties, settings tab, and check what the connection string looks like.