.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Eorror when trying to connect to SQL Express R2

Posted By:      Posted Date: August 28, 2010    Points: 0   Category :Sql Server
hi i installed SQL Express R2 on windows 7 64 bit , but i have problem connecting to the instance SQLEXPRESS its the only instance i installed i tried with windows and SQL authentication both failed i get the below error, also below is a link to a file that have all setting i made to the server you can see that the SQL Browser and SQL Agent are stopped and cant run them all buttons are dimmed http://cid-c1b8dc7412218e41.office.live.com/view.aspx/.Public/SQLIssue.docx     TITLE: Connect to Server ------------------------------ Cannot connect to sqlexpress. ------------------------------ ADDITIONAL INFORMATION: A network-related or instance-specific error occurred while establishing a connection 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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53) ------------------------------  

View Complete Post

More Related Resource Links

How to connect to local instance of SQL Server 2008 Management Studio Express ?


I just installed SQL Server 2008 Management studio Express on my Vista machine.

i tried connecting to local machine using :

.\sqlexpress, (local)\sqlexpress, or .\SQLExpress, MyPCNAME\SQLExpress

nothing is working, getting this error:

Cannot connect to PC-NAME\SQLEXPRESS. A network-related or instance-specific error occurred while establishing a connection 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. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Can not connect to user instance of SQL Server 2008 Express with Advance Services in Visual Studio 2

I used SQL Server 2008 Express with Advanced Services (not SQL Server 2008 Express) in Visual Studio 2010 because it is the fast and easy way to developed and managed data-driven applications with powerful built-in reporting and full-text search functionality. I received Sql Server 2008 Service Pack 1 with Windows Update. It's ok if I connect to instance of SQL Server 2008 Express with Advance Services (with SP1) through SQL Server Management, but if I try to attach a database in Server Explorer (Visual Studio 2010), I get the following error: "Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed." I'm stuck at this point. Is there a fix or a workaround? I've already tried deleting the 'C:\Users\Administrtor\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS' directory as mentioned in other posts, with no luck. The error.log at 'C:\Users\Administrator\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log' has the following relevant entries: 2010-09-01 14:44:10.47 Server      Error: 17156, Severity: 16, State: 1. 2010-09-01 14:44:10.47 Server      initeventlog: Could not initiate the EventLog Service for the key '3677F6D3-17C7-4F', last error code is 2. 2010-09-01 14:44:10.47 Server &

can't connect via SQL authentication - sql express 2008

Hello, I just installed SQL Express 2008, and for some reason I've 2 instances. one SQLEXPRESS and one MSSQLERVER. when i try to connect to via SQL authentication, it works. when i try to connect to\SQLEXPRESS via SQL authentication, it doesn't work, but it works for windows authentication. how can i fix it? i want to connect to\SQLEXPRESS. Thanks, Gidi.

Connect to SQL Server 2008 Express

Hi Guys, I have just started a personal project for our Corporate Desktop environment to actively track our Hardware and Software Inventory.  My plan is this for starters:   1 Computer using VBScript and WMI to gather the data, store the data into SQL Server 2008 Express, and present the data using ASP.NET or Javascript. The VBScript will get a list of computers from AD under specified OUs and will run on a scheduled task.   This deployment will initially be on 1 desktop computer for now.  How do I connect to SQL Server 2008 locally using OLEDB from my vbscript?  Will this require a username/password even though it is a local connection?  If it does require a password, do you know a way to prevent the password from being stored as clear text.  Does Windows Integrated configuration on the SQL Server 2008 Express allow a passthrough of credentials from the Scheduled Task so that the password is not required from the script?  I would like it to be as secure as possible since we have financial services users and we would be under the scope of an audit if ever it was needed or requested.  Thanks guys.  :-)

Can't connect my VWD express "sqldatasource" control to a SQL Server Express Database

Good day Sirs,   As the title is saying, I cant seem to connect to my SQL Server Express Database using "sqldatasource" control in Visual Web Developer 2010 Express Steps Taken: clicked "configure data Source" option in the Sqldatasource then "New Connection..." Changed my Data source: to " Microsoft SQL Server Database File (SqlClient) Here comes the problem: 1. I am choosing a Database file name but a problem keeps on popping:     "ServerName This file is in use: Enter a new name or close the file that's open in another program" 2. Then I tried to choose a detached database file (mdf) and it was attached now another problem pops:    "ServerPath cannot be opened becuase it is version 661. This server supports 655 and earlier.   I am using windows Home Edition: does it contribute to my problem? My server and VWDE is in the same equipment(laptop)   Does anyone have an idea why is it like this? Thanks

How to connect visual web developer 2008 express edition to SQL server 2008 ??

i know its a basic question guys! please help me . i have created a login.aspx file in visual web developer .now i want to connect the username and password details to SQL database ... How do i do it .....I can see some grt genius out there, i am sure some one is kind enough to help me with this question !!! thank you .....................................

SQLServer Express 2008 R2 - Cannot connect Error: 18456, Severity: 14, State: 11.

I have just installed  running MSSQL Server 2008 R2 (Express), along with Visual Web Developer 2010 Express In SQL Server Configuration Manager I can see the SQL Server Service running (SQLEXPRESS) and the SQL Server Browser service running. On running SQL Server Management Studio when trying to log on I get the message Login failed for user Phil-PC`Phil (Microsoft SQL Server, Error: 18456) In the SQL Server Error log I see this error 2010-09-16 10:24:16.07 Logon       Error: 18456, Severity: 14, State: 11. 2010-09-16 10:24:16.07 Logon       Login failed for user 'Phil-PC\Phil'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>] I have been unable to find anything useful on Google on how to resolve this problem. I have tried running the command line utility sqlcmd -L and this lists the following Servers:     Phil-PC     Phil-PC\SQLEXPRESS   In my list of Installed programs in Control Panel I see both MS SQL Server 2008 & MS SQL Server 2008 R2, is that correct?

Tell Me it aint so - VS 2010 Express cannot connect to my Host Sql Server

I just bought a new computer, so I decide to install the 2010 Express version of everything.  But I cant make C# connect to my Sql database located at on my on website.  I just connected to it via Mananagement console, so I know its there and working.  I read one posting comment that Im going to have to purchase VS.  If thats true, Im going back to my old version of Visual Studo.

Cannot connect to SQL 2008 Express from VB 2008 Express


I installed VB 2008 Express with SP1 and SQL 2008 Express. However, I cannot link to SQL 2008 Express from  VB 2008 Express. Please Help.


Since I'm new to this environment, I may not even be asking the right question. A brief background: I did some minimal work with VB 2008 Express - creating an sdf database and some forms that interacted with the database. I also did some minimal work with SQL 2008 Express, running some queries against the AdventureWorks Database. When I tried to create a form in VB 2008 Express that accessed the AdventureWorks Database in SQL 2008 Express, I have been unable to figure out how to create the needed connection.

Cannot Connect to Remote MS SQL Express (error: 26)

Hey guys,
I have tried 
but non of them are working.

I have tried all the settings, without any success.

I am using 
windows 7 ultimate, 
 Visual Studio 2008, 
 linksys wireless router.

I currently disabled my firewall, and have enable traffic on 1037,1434,1433,52369 ports for my router.

So, does anyone have any solution(s) for me to connect to my database remotely?

My codes is as follow:

// attempt 1 : using external IP
String databaseName = "testDB";

string dataSource = @"xx.xx.xx.34\SQLEXPRESS";

Access 2007 upsizing wizard can't connect to SQL Server 2005 Express


When trying to use the Access 2007 upsizing wizard to move a database to SQL Server 2005 Express, I get the following error message:

Connection failed:
SQLState: '01000'
SQL Server Error: 2
[Microsoft][ODBC SQ Server Driver][Share
Connection failed:
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server
does not exist or access denied.

I get the same message regardless of whether I configure SQL Server to run as a local system or service.

I am the only user on my Vista 32 PC and am therefore the administrator. As far as I can tell I have sufficient authority since I can start and stop SQL Server.

As a newbie to all this, I can't find any step by step instructions as to how a local copy of SQL Server should be configured to work with the upsizing wizard. In fact I can't even find any Access 2007 help walk-throughs on this upsizing wizard, let alone troubleshooting its error messages.

Any help would be appreciated, as well as links to step by step instructions (which I can't find in the MSDN Library materials).

PS Does MS understand how inadequate and inefficient its built-in documentation really is? Maybe that's what keeps MS Press in business!

Cant connect to SQL Server 2008 Express with C# 2008 Express

I cant conect to sql server from C#. When  I try to add a new connection I get this error
"A network-related or instance-specific  error occored while establishing a connection to sql server. The server was not found or was not accessible. Verify that the instance name is correct and that sql server is configures to allow remote conections.(provider:SQL Network Interfaces, error:26-Error locating Server/Instance Specified)"

When I try to add a new connection using SQL Server Authentication i get this error:
"Faild to generate a user instance of SQL Server. Only an intergrated connection can generate a user instance. The connection will be closed.

Some times i get this error:

"You don't have permission to open this file.

Contact the file owner or an administrator to obtain permission."

I am the owner of the file and the file is on my computer and I am log on as the administrator and the sql server and c# are located on this admin account.

Cannot connect to SQL Server 2008 RS Express, only connection to SQL Server 2008 Express succeeds?


Hi all,

my experience with SQL Server tends to zero. I've recently installed the new SQL Server 2008 RS Express with Advanced Services on my VISTA-machine because this version is prerequisite for installing some sample databases. There already existed a simple version of SQL Server 2008 express installed together with an older Visual Studio Express version. I thought that one would be upgraded but in fact the setup program installed the new 2008 RS version side-by-side to the older version.

The SQL Server ConfigManager shows actually both servers as running. SQL Server 2008 express named as "SQLEXPRESS" (Vers. 10.0.2531.0; path: '...\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn\') and the newer SQL Server 2008 RS express as "MSSQLSERVER" (Ver. 10.50.1600.1; path: '...\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\'). But MS SQL Server Management Studio only lets me connect to the older SQLEXPRESS-Server, the new "MSSQLSERVER" doesn't even show in the "Connect-to-Server"-dialog.

What went wrong? I'd appreciate any help,


How do I connect to SQL Server 2008 express from c# 2008 express?

Hi Everyone,

Can you correct this code so it can connect to my default installation of SQL Server 2008 express?


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

// Emad
using System.Data;
using System.Data.SqlClient;

namespace AdoSqlServerDemo
    class SimpleAdoNet
        static void Main(string[] args)
            // Define a connection to the database.
            SqlConnection myConnection = new SqlConnection("Data Source=SQLExpress;");

            // Open the connection.

            Console.WriteLine("The connection string is: " + myConnection.ConnectionString);
            Console.WriteLine("The database is: " + myConnection.Database);
            Console.WriteLine("The data source is: " + myConnection.DataSource);


            // Finish by closing the connection.

        } // End method - Main
    } // End class - SimpleAdoNet
} // End namespace - AdoSqlServerDemo

Can't connect to local SQL Server 2008 Express edition


Hi. I'm on Win7 64 bit and have installed SQL 2008 Express 64 bit. The named instance is "sqlexpress" but when using the SQL Server Management Studio 2005, it won't let me connect. It doesn't see it. When I type in the name and try to connect via windows auth (having added myself as an admin account), it gives this error:



Cannot connect to sqlexpress.


A network-related or instance-specific error occurred while establishing a connection 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. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476

Error Number: 53
Severity: 20
State: 0

Program Location:

 at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
 at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
 at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, S

Can't connect to SQL Express 2008 from Visual Studio, but can connect from SQL Server Management St



I've been struggling with the following issue for 3 days:  I can access and use my SQL Express 2008R2 database flawlessly from SQL Server Management Studio.  But I can only intermittently access it from Visual Studio (ultimate edition with TF Server).  Sometimes it works, sometimes it doesn't.  I mostly see the error when I try to "Update Model from Database" within my Entity framework model, or when I try to access the database from within Server Explorer.


Here is the error I see when I try to update my Entities form the Database: An error occurred while connecting to the database.  The database might be unavailable.  An exception of type 'System.Data.SqlClient.SqlException' occurred.  The error message is: 'Cannot open user default database. Login failed.  Login failed for user 'Tim-PC\Tim'.'


I think the connection string is fine as I am able to connect

SQL Express 2005 Configuration Manager - Cannot connect to WMI provider

Hi, when I go to the SQL Server Configuration Manager utility, the following error pops up :

Cannot connect to WMI provider.You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 servers with SQL Server Configuration Manager.
Access is denied. [0x80070005]

This is on a Windows 2003 SP1 server, and the database is an upgraded MSDE 2000 database. The database itself appears to be working OK. My application can connect to it, I can connect to it via sqlcmd, etc. (all locally). I'm logged on as an Administrator, so permissions shouldn't be a problem.

I ran FileMon to see which file it's complaining about, and it seems the culprit is sqlmgmprovider.dll. It's trying to access this .dll as Network Service. Just to check, I added Network Service to the .dll permissions and got a slightly different message :

Cannot connect to WMI provider.You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 servers with SQL Server Configuration Manager.
The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. [0x800736b1]

I now also get two errors in the event log :
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend