MS SQL Connection Error from Client

  • Thread starter Thread starter icegray
  • Start date Start date
I

icegray

Hi,
I am new about C# and MS SQL. I have done a new program which use MS
SQL Database and I've install it to a new computer. But program
doesn't run on new computer. I give SQL Server Connection Error
(provider:SQL Network Interfaces, error: 26 - Error Locating Server/
Instance Specified ).

My Connection strings (I tried both and both are ok on my machine but
don't run on another machines)
"Data Source = Serdar\FARE;Initial Catalog = DigitestStock;Integrated
Security = sspi"
"Server=Serdar\fare;Database=DigitestStock;Trusted_Connection=True;"

How can I fix this problem?

thanks
 
Here's a tip that might help you sort out your connection strings:

Create a new text file on your desktop. Change the extension to .udl.
Double click this file. Set up your connection string, then hit ok. Now
open the udl with notepad. Say hello to your new connection string.

You will want to make sure that your SqlServer has remote connections
enabled (specifically named pipes). This might explain why you can access
the machine locally, but not from another machine.

Also, are these machines on a domain?

--
Jimmy V
..NET Development Team - CTS, Inc
(e-mail address removed)

www.askcts.com
 
Hi,

Are you sure you can connect to that server?
According to the error the target server cannot be located.

Do a telnet to that server on port 1433 and see if you get a black screen.
 
If you are running SQL Server 2005 on the other computer, then by
default, it does not have the named pipes protocol enabled.

In order to enable this, you have to go to the SQL Server Configuration
Manager on the machine that has SQL Server installed, and then go to "SQL
Server 2005 Network Configuration". Under that will be a branch "Protocols
for MSSQLSERVER". Select this.

On the right, you will see a listview which has "Protocol Name" and
"Status". Right click on "Named Pipes" and select Enable.
 
If you are running SQL Server 2005 on the other computer, then by
default, it does not have the named pipes protocol enabled.

In order to enable this, you have to go to the SQL Server Configuration
Manager on the machine that has SQL Server installed, and then go to "SQL
Server 2005 Network Configuration". Under that will be a branch "Protocols
for MSSQLSERVER". Select this.

On the right, you will see a listview which has "Protocol Name" and
"Status". Right click on "Named Pipes" and select Enable.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




Hi,
I am new about C# and MS SQL. I have done a new program which use MS
SQL Database and I've install it to a new computer. But program
doesn't run on new computer. I give SQL Server Connection Error
(provider:SQL Network Interfaces, error: 26 - Error Locating Server/
Instance Specified ).
My Connection strings (I tried both and both are ok on my machine but
don't run on another machines)
"Data Source = Serdar\FARE;Initial Catalog = DigitestStock;Integrated
Security = sspi"
"Server=Serdar\fare;Database=DigitestStock;Trusted_Connection=True;"
How can I fix this problem?
thanks- Hide quoted text -

- Show quoted text -

I solved connection problem but I can't solve login problem yet.
I think some thing is wrong about SQL Server security and permissions.
 
Well, how do you have everything set up for SQL Server? You should be
able to go to the security folder for the server and setup the logins (which
you should map to user groups). Once you do that, then you can setup the
logins for the particular databases.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

icegray said:
If you are running SQL Server 2005 on the other computer, then by
default, it does not have the named pipes protocol enabled.

In order to enable this, you have to go to the SQL Server
Configuration
Manager on the machine that has SQL Server installed, and then go to "SQL
Server 2005 Network Configuration". Under that will be a branch
"Protocols
for MSSQLSERVER". Select this.

On the right, you will see a listview which has "Protocol Name" and
"Status". Right click on "Named Pipes" and select Enable.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




Hi,
I am new about C# and MS SQL. I have done a new program which use MS
SQL Database and I've install it to a new computer. But program
doesn't run on new computer. I give SQL Server Connection Error
(provider:SQL Network Interfaces, error: 26 - Error Locating Server/
Instance Specified ).
My Connection strings (I tried both and both are ok on my machine but
don't run on another machines)
"Data Source = Serdar\FARE;Initial Catalog = DigitestStock;Integrated
Security = sspi"
"Server=Serdar\fare;Database=DigitestStock;Trusted_Connection=True;"
How can I fix this problem?
thanks- Hide quoted text -

- Show quoted text -

I solved connection problem but I can't solve login problem yet.
I think some thing is wrong about SQL Server security and permissions.
 
Back
Top