Unix Technical Forum

SQL server connection

This is a discussion on SQL server connection within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi All, I was able to connect to MS SQL Server 2005 on my computer but after a while ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 09:27 PM
sara
 
Posts: n/a
Default SQL server connection

Hi All,

I was able to connect to MS SQL Server 2005 on my computer but after a
while I can not. When I want to connect to it using MS SQL Server
Management Studio I got this error:

An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server) (.Net SqlClient Data Provider)

Error Number: 2
Severity: 20
State: 0

Can you help me?
Thanks a lot in advance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 09:27 PM
Erland Sommarskog
 
Posts: n/a
Default Re: SQL server connection

sara (sarasara82@gmail.com) writes:
> I was able to connect to MS SQL Server 2005 on my computer but after a
> while I can not. When I want to connect to it using MS SQL Server
> Management Studio I got this error:
>
> An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the
> fact that under the default settings SQL Server does not allow remote
> connections. (provider: Named Pipes Provider, error: 40 - Could not
> open a connection to SQL Server) (.Net SqlClient Data Provider)
>
> Error Number: 2
> Severity: 20
> State: 0


So you have SQL Server running locally? Have you checked that it is
still running?

It's not that you have SQL Express installed and you forgot to specify
the instance name?


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 09:27 PM
sara
 
Posts: n/a
Default Re: SQL server connection

Hi,

Thanks for your response. I use the SQL Server locally. I can not run
SQL Server. I am not very familiar with SQL Express but I do not think
I changed anything realted to it after installation. Thanks.
Erland Sommarskog wrote:
> sara (sarasara82@gmail.com) writes:
> > I was able to connect to MS SQL Server 2005 on my computer but after a
> > while I can not. When I want to connect to it using MS SQL Server
> > Management Studio I got this error:
> >
> > An error has occurred while establishing a connection to the server.
> > When connecting to SQL Server 2005, this failure may be caused by the
> > fact that under the default settings SQL Server does not allow remote
> > connections. (provider: Named Pipes Provider, error: 40 - Could not
> > open a connection to SQL Server) (.Net SqlClient Data Provider)
> >
> > Error Number: 2
> > Severity: 20
> > State: 0

>
> So you have SQL Server running locally? Have you checked that it is
> still running?
>
> It's not that you have SQL Express installed and you forgot to specify
> the instance name?
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 09:27 PM
Erland Sommarskog
 
Posts: n/a
Default Re: SQL server connection

sara (sarasara82@gmail.com) writes:
> Thanks for your response. I use the SQL Server locally. I can not run
> SQL Server. I am not very familiar with SQL Express but I do not think
> I changed anything realted to it after installation. Thanks.


So did you verify that SQL Server is running? Use the SQL Server
Configuration Manager to examine this. You find it in the SQL Server program
group, under the sub-menu Configuration Tools.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-29-2008, 09:28 PM
sara
 
Posts: n/a
Default Re: SQL server connection

Thanks a lot for your response. I went to SQL Server configuration
manager->sql server 2005 services->sql server is stopped and if I try
to start it fails and says that "the request failed or the service did
not respond in a timely fashion"
Erland Sommarskog wrote:
> sara (sarasara82@gmail.com) writes:
> > Thanks for your response. I use the SQL Server locally. I can not run
> > SQL Server. I am not very familiar with SQL Express but I do not think
> > I changed anything realted to it after installation. Thanks.

>
> So did you verify that SQL Server is running? Use the SQL Server
> Configuration Manager to examine this. You find it in the SQL Server program
> group, under the sub-menu Configuration Tools.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-29-2008, 09:28 PM
Erland Sommarskog
 
Posts: n/a
Default Re: SQL server connection

sara (sarasara82@gmail.com) writes:
> Thanks a lot for your response. I went to SQL Server configuration
> manager->sql server 2005 services->sql server is stopped and if I try
> to start it fails and says that "the request failed or the service did
> not respond in a timely fashion"


That's bad. But at least we know why you cannot connect from SSMS. :-)

Go to
C:\Prorgam Files\Microsoft SQL Server\MSSQL.1\MSSQL\Log and look in the
file ERRORLOG and see if there is an error message. Check that the date
of the file agrees with your last attempt to start the service.

Note: the exact path can vary if you installed SQL Server to another
path, or if you have more than once instance.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-29-2008, 09:28 PM
sara
 
Posts: n/a
Default Re: SQL server connection

Thanks. Yes they are the same.

Erland Sommarskog wrote:
> sara (sarasara82@gmail.com) writes:
> > Thanks a lot for your response. I went to SQL Server configuration
> > manager->sql server 2005 services->sql server is stopped and if I try
> > to start it fails and says that "the request failed or the service did
> > not respond in a timely fashion"

>
> That's bad. But at least we know why you cannot connect from SSMS. :-)
>
> Go to
> C:\Prorgam Files\Microsoft SQL Server\MSSQL.1\MSSQL\Log and look in the
> file ERRORLOG and see if there is an error message. Check that the date
> of the file agrees with your last attempt to start the service.
>
> Note: the exact path can vary if you installed SQL Server to another
> path, or if you have more than once instance.
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-29-2008, 09:28 PM
Erland Sommarskog
 
Posts: n/a
Default Re: SQL server connection

sara (sarasara82@gmail.com) writes:
> Thanks. Yes they are the same.


So did the logs tell you something?


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-29-2008, 09:28 PM
sara
 
Posts: n/a
Default Re: SQL server connection

Sorry.This is the error.log:

2006-09-21 12:48:21.53 Server Microsoft SQL Server 2005 -
9.00.2047.00 (Intel X86)
Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack
2)

2006-09-21 12:48:21.54 Server (c) 2005 Microsoft Corporation.
2006-09-21 12:48:21.54 Server All rights reserved.
2006-09-21 12:48:21.54 Server Server process ID is 4948.
2006-09-21 12:48:21.54 Server Logging SQL Server messages in file
'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2006-09-21 12:48:21.54 Server This instance of SQL Server last
reported using a process ID of 4396 at 9/21/2006 1:05:02 AM (local)
9/21/2006 8:05:02 AM (UTC). This is an informational message only; no
user action is required.
2006-09-21 12:48:21.54 Server Registry startup parameters:
2006-09-21 12:48:21.59 Server -d C:\Program Files\Microsoft
SQL
Server\MSSQL.1\MSSQL\DATA\master.mdf
2006-09-21 12:48:21.59 Server -e C:\Program Files\Microsoft
SQL
Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2006-09-21 12:48:21.59 Server -l C:\Program Files\Microsoft
SQL
Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2006-09-21 12:48:21.64 Server SQL Server is starting at normal
priority base (=7). This is an informational message only. No user
action is required.
2006-09-21 12:48:21.64 Server Detected 2 CPUs. This is an
informational message; no user action is required.
2006-09-21 12:48:22.64 Server Using dynamic lock allocation.
Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per
node. This is an informational message only. No user action is
required.
2006-09-21 12:48:23.65 Server Attempting to initialize Microsoft
Distributed Transaction Coordinator (MS DTC). This is an informational
message only. No user action is required.
2006-09-21 12:48:24.23 Server The Microsoft Distributed
Transaction Coordinator (MS DTC) service could not be contacted. If
you would like distributed transaction functionality, please start this
service.
2006-09-21 12:48:24.48 Server Database mirroring has been enabled
on this instance of SQL Server.
2006-09-21 12:48:24.84 spid5s Starting up database 'master'.
2006-09-21 12:48:25.42 spid5s SQL Trace ID 1 was started by login
"sa".
2006-09-21 12:48:25.46 spid5s Starting up database
'mssqlsystemresource'.
2006-09-21 12:48:25.54 spid5s The resource database build version
is 9.00.2047. This is an informational message only. No user action is
required.
2006-09-21 12:48:25.98 spid5s Server name is 'BLAHBLAH'. This is
an informational message only. No user action is required.
2006-09-21 12:48:25.98 spid9s Starting up database 'model'.
2006-09-21 12:48:26.46 spid9s Clearing tempdb database.
2006-09-21 12:48:30.10 spid9s Starting up database 'tempdb'.
2006-09-21 12:48:30.54 spid12s The Service Broker protocol
transport is disabled or not configured.
2006-09-21 12:48:30.54 spid12s The Database Mirroring protocol
transport is disabled or not configured.
2006-09-21 12:48:31.12 spid12s Service Broker manager has started.
2006-09-21 12:48:31.39 Server A self-generated certificate was
successfully loaded for encryption.
2006-09-21 12:48:31.40 Server Error: 26055, Severity: 16, State:
1.
2006-09-21 12:48:31.40 Server The SQL Server failed to initialize
VIA support library [QLVipl.dll]. This normally indicates the VIA
support library does not exist or is corrupted. Please repair or
disable the VIA network protocol. Error: 0x7e.
2006-09-21 12:48:31.42 Server Error: 17182, Severity: 16, State:
1.
2006-09-21 12:48:31.42 Server TDSSNIClient initialization failed
with error 0x7e, status code 0x60.
2006-09-21 12:48:31.43 Server Error: 17182, Severity: 16, State:
1.
2006-09-21 12:48:31.43 Server TDSSNIClient initialization failed
with error 0x7e, status code 0x1.
2006-09-21 12:48:31.43 Server Error: 17826, Severity: 18, State:
3.
2006-09-21 12:48:31.43 Server Could not start the network library
because of an internal error in the network library. To determine the
cause, review the errors immediately preceding this one in the error
log.
2006-09-21 12:48:31.43 Server Error: 17120, Severity: 16, State:
1.
2006-09-21 12:48:31.43 Server SQL Server could not spawn FRunCM
thread. Check the SQL Server error log and the Windows event logs for
information about possible related problems.

Erland Sommarskog wrote:
> sara (sarasara82@gmail.com) writes:
> > Thanks. Yes they are the same.

>
> So did the logs tell you something?
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pro...ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinf...ons/books.mspx


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-29-2008, 09:28 PM
Erland Sommarskog
 
Posts: n/a
Default Re: SQL server connection

sara (sarasara82@gmail.com) writes:
> 2006-09-21 12:48:31.40 Server Error: 26055, Severity: 16, State:
> 1.
> 2006-09-21 12:48:31.40 Server The SQL Server failed to initialize
> VIA support library [QLVipl.dll]. This normally indicates the VIA
> support library does not exist or is corrupted. Please repair or
> disable the VIA network protocol. Error: 0x7e.


So it appears that you have problems with the VIA protocol. Do you need
to have the VIA protocol enabled? If not, use the configuration manager
to disable it. (I will have to admit that I know nothing about VIA.)

As long as you connect to SQL Server from your local machine, you only
need shared memory.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com