0

Hello!

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
Aliases

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

Greetings!

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by sknake
0

You need to specify "-S servername" to tell osql where to connect.

C:\Documents and Settings\scott>osql -Sapex2006sql -Usa -Ppassword
1>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.