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

MS SQL Connection Error from Client

P: n/a
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

May 29 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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
jv*********@hotmail.com

www.askcts.com
"icegray" <ic*****@gmail.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
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

May 29 '07 #2

P: n/a
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.
"icegray" <ic*****@gmail.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
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

May 29 '07 #3

P: n/a
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]
- mv*@spam.guard.caspershouse.com

"icegray" <ic*****@gmail.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
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

May 29 '07 #4

P: n/a
On May 29, 5:56 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
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]
- m...@spam.guard.caspershouse.com

"icegray" <iceg...@gmail.comwrote in message

news:11**********************@q69g2000hsb.googlegr oups.com...
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.

May 30 '07 #5

P: n/a
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]
- mv*@spam.guard.caspershouse.com

"icegray" <ic*****@gmail.comwrote in message
news:11**********************@m36g2000hse.googlegr oups.com...
On May 29, 5:56 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
> 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]
- m...@spam.guard.caspershouse.com

"icegray" <iceg...@gmail.comwrote in message

news:11**********************@q69g2000hsb.googleg roups.com...
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.

May 30 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.