SQLServer 2005 Problem

Hi!

I want learn about ADO.NET, I'm trying to start a SQLServer 2005 Express with a example database for practicle with it, but i can't connect to configure the db.

I'm tried dowloading a set of examples from Microsoft.com, but whe i execute some example aganist the db always get the same error:

C:\DB\>sqlcmd -E -i OrderingServiceScript s\SetupOrderingServiceProgram.sql

HResult 0x2, Level 16, State 1

Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : 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..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

I look for some solution for this problem in Google, but nothing works :(

I enable remote connections, TCP/IP and Shared Memory in SQLExpress, start the SQLExpress and SQL Server Browser services, and check that TCP/IP is enabled in the clients protocols.

Some idea

Regards.




Answer this question

SQLServer 2005 Problem

  • George2

    Bleh!... the problem was that the Microsoft SQL databases examples has harcoded absolute paths in the .sql scripts, then when search for "C:\Program Files\" subdirectories the script crahs because in spanish edition this directory is called "C:\Archivos de Programa\". I replace all absolute paths and now runs ok. I don't know whay the error isn't more explicit :P

    This was a stupid thing, but i'm a SQLServer newbie and then i don't know how locate the problem xD. I open the .sql script with MS SQL Server Managament Studio Express and quickly see the problem.

    Thanks in any way ;)

    Regards.



  • billqu

    Try using the MS SQL 2005 Surface Area Configuration manager. For the remote settings make sure TCP and Named pipes option has been selected.
  • SQLServer 2005 Problem