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

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

unable to connect to a database engine

Posted By:      Posted Date: August 31, 2010    Points: 0   Category :Sql Server
Hi. i have recently installed SQll Server 2005 but i am facing issue while connecting to a databse engine..how should i do it..?its showing an error which looks like this TITLE: Connect to Database Engine ------------------------------ Cannot connect to sanchit. ------------------------------ 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) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476 please assist me in this....

View Complete Post

More Related Resource Links

unable to connect to database



I am using visual studio 2005 and sql server 2005.

I am developing a small quiz application and i have stored the connection string in app.config file which is given below.:

<?xml version="1.0" encoding="utf-8" ?>
        <add name="quizdb"
            connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Quiz Application.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
            providerName="System.Data.SqlClient" />
i have retrieved connection string property through configurationmanager class 

and when i m connecting to database  it gives me a runtime error:


Sql Exception was unhandled

System.Data.SqlClient.SqlException was unhandled
  Message="An attempt to attach an auto-named database for file F:\\Quiz\\Quiz\\bin\\Debug\\Quiz Application.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located

Reporting Services Add-In for MOSS2007 : Unable to connect to the database Error at "Set Server Defa

Dear Expert, I've succesfully install the Add-In + configure the reporting services (integrated mode) + activate the features on my MOSS2007. As we know by activating this at my Central Admin, i'm able to see "Reporting Services" under my Application Management as below:   1) Manage Integration Setting   ---> My report url : http://servername:808/ReportServer (Trusted Account) 2) Grand Database Access --->  My setting : <servername> with default instance  3) Set Server Defaults ---> Area that i receive an error "Unable to connect to database" Anybody here have a same experience? please assist me, Thanks in Advanced My Note: OS : Windows Server 2008 Enterprise x64bit (SP2) SQL : SQL 2005 with latest Service Pack (SP3)  My Error Log: <Header>   <Product>Microsoft SQL Server Reporting Services Version 9.00.4035.00</Product>   <Locale>en-US</Locale>   <TimeZone>Malay Peninsula Standard Time</TimeZone>   <Path>c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__08_04_2010_10_51_59.log</Path>   <SystemName>SEINE</SystemName>   <OSName>Microsoft Windows NT 6.0.6002 Service Pack 2</OSName>   <OSVersion>6.0.6002.131072</OS

SQL 2008R2 on Windows7 - Can't connect to Database engine

Hello, After a successful installation of SQL server 2008 R2 on My Windows7 machine, it seems that I can't connect to database engine using the management studio. When trying to connect to database using SSMS to localhost or localhost\MSSQLSERVER or . or .\MSSQLSERVER I receive the following error: Cannot connect to localhost. Additional information: Method not found: 'Microsoft.SqlServer.Management.Common.DatabaseEngineType Microsoft.SqlServer.Management.Common.ConnectionManager.get_DatabaseEngineType()'. (Microsoft.SqlServer.Management.SqlStudio.Explorer)   I'm using a default instance (MSSQLSERVER), I also confirmed that the service is running. I didn't see any error during installtion, and also opened Port 1433 TCP on my firewall. (After installation) Currently nothing helps.   Any help is much appreciated. Thanks, Asher

Unable To Connect Database Error:Sharepoint 2007 Internet Site.

Hi Techies,  we are running 4farm Sharepoint internet site. now a days we are getting the below error very regularly. Event Viewer :The description for Event ID ( 27745 ) in Source ( Windows SharePoint Services 3 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: #50071: Unable to connect to the database SharePoint_Config on SPPREPROD02VMDK\SPPREDPROD.  Check the database connection information and make sure that the database server is running.. Sharepoint Logs:#50071 :#50071: Unable to connect to the database SharePoint_Config on pfc-penndb-tst. Check the database connection information and make sure that the database server is running.. Please Advice . Regards, raju.  Nag: http://nagaraju-sharepoint.blogspot.com. Posting is provided with no warranties.

PowerPivot Report is unable to connect database after uploading onto SharePoint 2010


Hi All,

I have developed one PowerPivot Report in excel 2010 and uploaded into SharePoint 2010. The report has slicers and filters which are working pretty well in excel 2010.

I'm able to open the report through sharepoint browser and  if click on any slicer getting the following error.

An error occurred during an attempt to establish a connection to the external data source. The following connections failed to refresh:

Also i'm unable to see the filter on the report.

I have got some info on google regarding 'Claims to windows token service' should up and run. But, i'm still getting the same after enabling 'Claims to windows token service' as well.

Please help me in this regard.

Thanks & Regards,


Unable to connect to the SQL content database from sharepoint web front server.



SharePoint farm is as below. 1 SQL, 1 WFE, 1 Application server. SQL 2005 and SharePoint 2007 with SP1.

SharePoint portal is working fine from 1 year, suddenly from today morning in the WFE eventvwr we are getting 27745, 3355 and 5586 event id errors. Site also giving error saying "unable to connect the content database". This is repeating for 10 to 15 min.

when ever these errors occur in eventvwr sharepoint will not work.

Please suggest on this issue.

waiting for MS replies..






Cannot connect to Sql server 2005 database engine

Hello everybody!

I am having problems to connect to Sql Server Database Engine. I have recently(yesterday) installed Sql Server 2005 Developer Edition. The installation was totally successfull. Yesterday I was able to connect to Sql Server Database engine via SSMS but today it gives me an error:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

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

It is strange because only one day before It worked fine.

Thanks a lot

Unable to connect to Database | ASP.NET Membership and Entity Framework


Ok, so this is my first Solution using the Entity Framework (EF). Here are my steps so far:

1) Created Database named: BSA with an owner of username/password (AspNetServicesUser/password)
2) Created Entity Data Model (EDM) in a separate project (contained within the same solution)
3) Created an ASP.NET Web Application with basic functionality (new project within the same solution)
4) Added Reference to the EDM in Web App and added Connection String to the EF
5) Decided I wanted ASP.NET Membership added to the Web App
6) Configured SQL Server for Application Services using aspnet_regsql.exe on BSA database

Now, I need to know: 
a) How do I create the connectionString for the Web.config file in the WebApp?

Errors I receive:

I get this error using the ASP.NET Configuration Tool under the "Security" Tab:

Login failed for user 'AspNetServicesUser'.

I get this error using the ASP.NET Configuration Tool under the "Provider" Tab --> Select a single provider for all site management data --> Test

Could not establish a connection to the database. 

If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database

Unable to connect to database. Check database connection information and make sure the database ser



I am using MOSS2007. My MOSS site was working fine for last 1 month and today suddenly it started to show me below message

"Unable to connect to database.  Check database connection information and make sure the database server is running."


On my server, SahrePoint admin site is working. Other port site is also working. Only my MOSS site is showing me above message.  Can anyone helkp me to resolve this issue.

Unable to connect to SQL Server Database


Hi All,

I actually tried all of posted, at least over here, regarding installing Service Level Dashboard V2 on a WSS 3.0 stand-alone server, which I would use with SCOM 2007 R2, and all didn't work; I tried stopping the "Server 2005 Embedded Edition (MICROSOFT##SSEE)" and set it manual, didn't work.

Like others, I installed all pre-reqs before WSS 3.0, fine, no issues until running the ServiceLevelDashboard_x86.msi. I checked permission pertaining to the account used to run and connect to the Operations Manager Data Warehouse Server, local admin. The weird thing is I used the same steps that had been used to set these up on a testingserver, which was running fine. Now that we need to set these up on a production server. But those steps wouldn't work any more?!

Any helps, hints, lessons are really appreciated

Large log file and unable to connect to database

I'm running SBS2008 and my SharePoint Config log is taking up 11.27Gb. I've
run into this issue before and was able to resolve it, but I cannot connect
to this database from the SQL Server Management Studio Express console.
When I open the console, I have to connect to the database by entering
\\.\pipe\mssql$microsoft##ssee\sql\query for the Server name. From there,
if I try to go to the properties of the SharePoint_Config database, I get
the following error:

TITLE: Microsoft SQL Server Management Studio Express
Cannot show requested dialog.
Cannot show requested dialog. (Microsoft.SqlServer.Express.SqlMgmt)
Property Owner is not available for Database
'[SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6]'. This property
may not exist for this object, or may not be retrievable due to insufficient
access rights. (Microsoft.SqlServer.Express.Smo)

Thanks for any help you can provide.

Robert Ramin

Here I go again. Unable to connect to SQL Server database.


I just recently decided to uninstall SQL Server 2008 Express Edition in favor of installing SQL Server 2008 R2 Express Edition. Now I can't access the "security.aspx" page via the ASP.NET Configuration icon. Clicking it yields the following error. "Unable to connect to SQL Server database."  My guess is that the account that Visual Web Developer Express 2008 edition is launching to "attempt" to create the default ASPNETDB.MDF file in the App_Data folder does not have sufficient permissions to execute the command through the local SQL Server instance.


This is one of the most frustrating issues I have ever had to deal with.  I have no idea what is going on behind the scenes when I click on that "ASP.NET Configuration" icon because of the incredibly abstract error messages that Microsoft likes to dole out. It would be nice of Microsoft to tell me the exact name of the account that SQL Server is refusing. That would be kind of them. Maybe in a future version? Anyone who can explain the relationships to me between

1)Visual Web Developer Express Edition 2008

2)IIS Manager 7.0 and

3)SQL Server Express Edition

My questions:

What is the name of the user account that Visual Web Developer uses to try and create the ASPNETDB.MDF file in the App_Data folder of

WSS 3.0 "Unable to connect to database." from other computers only


Hi everybody,

I have a strange problem with recently installed WSS 3.0…

I can navigate to the site from front end server, but when I am on any other machine I receive “Unable to connect to database.  Check database connection information and make sure the database server is running.”  error. In event log I see “Cannot connect to SQL Server. MYSQLSERVERNAME not found. Additional error information from SQL Server is included below.  [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

This message is logged only when user tries to reach the site from another machine. When I try this from front end server it works OK and there is no error in event log.

Due to our specific situation WSS was configured to use sql authentication for connecting to database.

What could be wrong?

Thanks in advance!


Unable to connect to SQL Server 2008 R2 Database without being admin of the machine


I am receiving the following error when I try to connect to my new SQL Server 2008 R2 machine:


Msg 18452, Level 14, State 1, Server <server name>, Line 1 Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

I'm running the following command to test the connection:

sqlcmd -S<Server Name> -E -Q"Select @@servername"

On the server I'm getting the following from the SQL Server logs


03/31/2011 20:31:58,Logon,Unknown,Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [CLIENT:]

03/31/2011 20:31:58,Logon,Unknown,Error: 18452<c/> Severity: 14<c/> State: 1.

03/31/2011 20:31:58,Logon,Unknown,SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT:]

03/31/2011 20:31:58,Logon,Unknown,Error: 17806<c/> Severity: 20<c/> State: 2.

What is odd is if I put the domain user in as Admin of the machine then it connects just fine.  I have tried just about everything I can find and I just cannot get it to work. Anyone have any clues???


Report Designer Unable to Connect to SQL 2005 Database...Sort of.


SO here is the problem I have a whole project SSRS 2005 project that is unable to connect to the SQL 2005 Standard database. When I try to access the data under the "Data" tab I get the following Error.  Interestingly when I go in the data source connection settings and click the "Test Connection" all is good. But still the report is not able to pull any data without the error comming up. I have removed and reinstalled VS 2005 Pro, removed and reinstalled SQL tools on the workstation all with the same error. I have the same project on an older laptop and all is well. Help!!!!



TITLE: Microsoft Report Designer

A connection cannot be made to the database.
Set and test the connection string.


Format of the initialization string does not conform to specification starting at index 75. (System.Data)

More on the Error:



A connection cannot be made to the database.
Set and test the connection string.
 (Microsoft Report Designer)

Program Location:

   at Microsoft.ReportDesigner.Design.Query.CreateConnection()

could somebody give me example how I can connect to database only once if I use many models in contr


I use in my ASP.NET MVC application repository pattern and I use in controller for example 3 models:

   namespace MvcApplication1.Controllers  
        public class HomepageController : Controller  
            private IWebsitesRepository _repository_websites = new WebsitesRepository();  
            private IFirmRepository _repository_firm = new FirmRepository();  
            private IPhotosRepository _repository_photos = new PhotosRepository();  

In WebsiteRepozitory, FirmRepository and PhotosRepository classes I have:

Database1Entities _entities = new Database1Entities();

So I have 3 connections to database ? Is it wrong ? How can I solve it ?

Unable to make connection to database?


Hy guys. I try to connect my database for so long so i wrote two type of codes. Let's discuse first on.

I have database called PhoneDirectory.

It have only one table named Residents.

I have button wiht ID="Button1".

I want when i click this button to see all of my residents. 

I want to see the result in DetailsView and to be able to edin, delete and add new resident.

First try with SqlDataSource so i wrote this:

<asp:SqlDataSource ID="Resident Details" runat="server" ProviderName="System.Data.SqlClient" ConnectionStrings="<%$ ConnectionStrings:ThisIsTheConnection%>" 
              SelectCommand = "SELECT * FROM Resident "
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