By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,787 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

error "Could not open a connection to SQL Server"

P: 5

I'd like to run mssql script (file with extension sql). I installed Microsoft SQL Server 2008 and run in Command Prompt:

C:\Documents and Settings\useruser>osql -Usa -Ppassword -i "F:\Data\MyApplication\Scripts\CreateDb.sql"
[SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [2].
[SQL Server Native Client 10.0]Login timeout expired
[SQL Server Native Client 10.0]A network-related or instance-specific error has occured while establishing a connection to SQL Server. Server is not found of not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

I found that I should choose:

area configuration manager -> allow remote connection

Somewhere else I found that it is here:

Configuration Tools->SQL Server Configuration Manager; Configuration Tools->SQL Server Surface Area Configuration; SQL Server Management Studio Express ...

But I don't have anything like this. When I enter "Sql Server Configuration Manager" there are:
SQL Server Configuration Manager (Local)
SQL Server Services
SQL Server Network Configuration
Protocols for SQLEXPRESS
SQL Native Client 10.0 Configuration
Client Protocols

What should I do to get rid of these errors? How to run this script?

Aug 13 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.