Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 9th, 2005, 07:01 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default SQL Server Named Pipe Connection...

I have posted this in the DB/SQL Server area - my apologoes for posting it here. I got no joy there and believe this is a triky problem.

My objective is to connect to a remote SQL 2000 instance running on win 2003. I have connected to a remote instance many times successfully but never on a 2003 machine - Is there any difference?

It took me a large part of yesturday to figure out (command line net stats) it is not listening on port 1433 at all. The next step was to attempt an ODBC connection. Using tcp-ip no luck, using a named pipe connection I had success.

Can I make an OLEDB named pipe connetion? If so an exmple string would be great.

BTW : In the Client Network Utility I have told it to use TCP-IP and use port 1433 - It is still not listening. If I put the web pages on the same box a normal OLEDB connection to its self works fine.

I am going a bit nuts on this one, has anybody connected remotly under these circumstances?



Wind is your friend
Matt
__________________
Wind is your friend
Matt
 
Old March 10th, 2005, 05:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Matt,

I've never connected to a 2003 server, but you can force Named Pipes by adding Network Library=dbnmpntw to you conn string.

See http://support.microsoft.com/?kbid=238949 for all the options.

hth
Phil
 
Old March 11th, 2005, 02:36 AM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

pgTips

Thank you for your suggestion however I couldnt get that method to work. after almost a day the solution is as follows:

1..Installing SQL Server SP3a forces post 1443 to listen
2..Open the Client Network Manager, disable Nammed Pipes, cick on alias, create a tcp-ip connection, click into it,UNTICK dynamicly choose port and specify 1433

Now a normal OLEDB (TCP-IP)connection is accepted.

Wind is your friend
Matt
 
Old March 13th, 2005, 10:26 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

For the purpose of assisting others with this problem/solution I wish to add to the scenario. BTW my solution above is a result of reading MS articles and allot of trial and error.

We have 2 x 2003 servers here. 1 x internal only (has SQL Server) and 1 x external (No data store) To eliminate any potential firewall etc problems (correct, I am not very network savvy), I was testing this remote connection from my dev machine (third machine XP) to the internal only 2003 machine. Both of these machines have SQL Server installed and a duplicate set of web pages. After implementing the solution in my previous post I had remote connectivity between these two machines (my dev machine and the 2003 internal only box) using:

"Provider=sqloledb;Data Source=xx;Initial Catalog=xx;User Id=xx;Password=xx;"

When I tried to connect from the external 2003 machine to the internal only 2003 machine I was getting the old 'sql server does not exist or access denied' error (original problem and error)

After determining there was no firewall or other in between problems, trial and error resulted in the following connection string working:

Provider=sqloledb;Data Source=machineName,1433;Initial Catalog=xx;User ID=xx;Password=xx;

Yes, problem solved. Why do I have to specify the port when the machine holding the DB has been told to accept connections there?

Another question came up through this process. The .1 part of some connection strings EG:
Provider=SQLOLEDB.1
What is this in reference to and how do I find out what version a particular instance in running - therefore what dot/integer to include in a connection.

My third question directly relates to the input/suggestion by pgtips's. Are Network Librarys EG "Network Library=dbmssocn;" optional in connection strings? or is the one I have listed above the default (being TCP-IP) therefore can be left out of the string. NOTE: the connection I attempted to make including the named pipe library failed to work ("Network Library=dbnmpntw").

As you can see I still have some gray areas going on this topic. I would appreciate any opinions/answers very much.

TYIA


Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
broken pipe error in implementing client -server octavius BOOK Beginning Linux Programming, 3rd Edition 1 December 17th, 2011 01:42 PM
SQL Server Connection MonkeyMan666 C# 2 November 14th, 2008 10:44 AM
pipe delimited file to SQL using DTS juvesaurabh SQL Server DTS 1 February 16th, 2006 12:56 AM
Named Pipe class gm C# 0 August 7th, 2003 08:18 AM
How many named instances can we have in SQL Server dotnetwhizkid SQL Server 2000 1 July 28th, 2003 04:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.