473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Fix of problem connecting VS2005 to remote Sql 2000 server

After much hair-pulling, I've finally found the answer to a problem
that many are fighting with, difficulty connecting from Sql 2005 Server
Management or VS2005 to a remote Sql Server running Sql 2000. In my
case the server I couldn't reach was across a vpn connection, behind
ISA server 2000, (which had port 1433 open).

The answer was in this post:
http://groups.google.com/group/micro...ql+2000&rnum=8

(See the 10th post in the thread, by Pablo Castro).

Adding the simple prefix "np:" in front of the server name fixed the
problem immediately. Why didn't Microsoft hire blimps and sky-writers
to publicize this hugely frustrating change?

Hope this helps someone.

Bob Graham

Mar 6 '06 #1
9 2678


"RvGrah" <rv****************@sbcglobal.net> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
| After much hair-pulling, I've finally found the answer to a problem
| that many are fighting with, difficulty connecting from Sql 2005 Server
| Management or VS2005 to a remote Sql Server running Sql 2000. In my
| case the server I couldn't reach was across a vpn connection, behind
| ISA server 2000, (which had port 1433 open).
|
| The answer was in this post:
|
http://groups.google.com/group/micro...ql+2000&rnum=8
|
| (See the 10th post in the thread, by Pablo Castro).
|
| Adding the simple prefix "np:" in front of the server name fixed the
| problem immediately. Why didn't Microsoft hire blimps and sky-writers
| to publicize this hugely frustrating change?
|

Well, they did.... look at:
http://msdn2.microsoft.com/en-us/lib...ionstring.aspx

or your local VS2005 MSDN docs.

Willy.
Mar 6 '06 #2

"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
news:eG**************@tk2msftngp13.phx.gbl...
|
|
| "RvGrah" <rv****************@sbcglobal.net> wrote in message
| news:11**********************@i39g2000cwa.googlegr oups.com...
|| After much hair-pulling, I've finally found the answer to a problem
|| that many are fighting with, difficulty connecting from Sql 2005 Server
|| Management or VS2005 to a remote Sql Server running Sql 2000. In my
|| case the server I couldn't reach was across a vpn connection, behind
|| ISA server 2000, (which had port 1433 open).
||
|| The answer was in this post:
||
|
http://groups.google.com/group/micro...ql+2000&rnum=8
||
|| (See the 10th post in the thread, by Pablo Castro).
||
|| Adding the simple prefix "np:" in front of the server name fixed the
|| problem immediately. Why didn't Microsoft hire blimps and sky-writers
|| to publicize this hugely frustrating change?
||
|
| Well, they did.... look at:
|
http://msdn2.microsoft.com/en-us/lib...ionstring.aspx
|
| or your local VS2005 MSDN docs.
|
| Willy.
|
|

Just forgot to add that when using named pipes as protocol, something you
shouldn't do on a corporate network, you are using port 445 at the server,
so you need to open this port at the firewal or NAT as well. Anyway your
issue is not related to the ISA sever, it's just that you have set-up your
SQL server to use named pipes as protocol, something that you need to
indicate in your ConnectionString, or by specifying the protocol in your
Server variable (data source=np:...) or your Net variable (...;
net=dbnmpntw).

Willy.

Willy.
Mar 6 '06 #3
How should you connect to a remote Sql server across a vpn connection
if you shouldn't use the "np:" named pipes prefixing? (I am in a
working across corporate networks, although we're talking about quite
diminutive corporations.)

Or when I'm in Sql Management Studio and wish to push some database
tables to our branch office (not really a branch, more of a clone
company in another state that shares the same software development and
database design). In Sql Server 2000 Enterprise Manager, if I just made
a vpn connection to the remote office, I could copy tables or stored
procedures etc from server to server without any special effort. Is
using np:<servername> not the right way to do it using 2005 tools? I
want to use the newer interface to get accustomed to it, and because it
offers superior tools for copying tables, as a for instance.

Any further guidance appreciated.

Bob

Mar 6 '06 #4


"RvGrah" <rv****************@sbcglobal.net> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
| How should you connect to a remote Sql server across a vpn connection
| if you shouldn't use the "np:" named pipes prefixing? (I am in a
| working across corporate networks, although we're talking about quite
| diminutive corporations.)
|
| Or when I'm in Sql Management Studio and wish to push some database
| tables to our branch office (not really a branch, more of a clone
| company in another state that shares the same software development and
| database design). In Sql Server 2000 Enterprise Manager, if I just made
| a vpn connection to the remote office, I could copy tables or stored
| procedures etc from server to server without any special effort. Is
| using np:<servername> not the right way to do it using 2005 tools? I
| want to use the newer interface to get accustomed to it, and because it
| offers superior tools for copying tables, as a for instance.
|
| Any further guidance appreciated.
|
| Bob
|

Use the TCP protocol over port the default SQL server port 1433. Named pipes
use the SMB protocol (over port 445), which is good for 'direct' connections
or where client and server are on the same box, for anything else you should
set-up SQL server to use TCP (SQL server uses port 1433 by default). Note
that named pipes is not a new protocol (the first SQL version had it
already), I'm also not clear on what you mean by ....superior tools...,
named pipes are no tools, they are protocol end-points like sockets are for
TCP

Willy.
Mar 6 '06 #5
Willy,

I'm not referring to the named pipes vs tcp when I refer to "tools", I
mean VS2005 and Sql server 2005 tools versus VS2003 and Sql 2000. The
method that worked in the older version to connect to a server in
another Lan doesn't work in the 2005 versions without setting the "np:"
prefix to force named pipes, as Pablo on the Ado.Net team recommended.

I'm also a little confused, because the ISA server at the remote server
has port 1433 open, and always allowed Vs2003 and Sql 2000 Enterprise
Manager to funtion fine. I don't see port 445 open anywhere, either in
IP Packet Filters or in Protocol Definitions, so I'm a little mystified
as to why adding the np: prefix worked for me instantly both in VS and
Sql Management Studio, where all attempts to go by just the server name
(I assumed using tcp) failed.

This is all so deep, and quite hard to master for somone who's handling
everything from hardware issues to Sql admin and database front-end
development in addition to many other things... I know the number of
hats I'm wearing does not constitute emergency on your part, I'm just
trying to get up to speed with the 2005 tools at least to the extent
that I was functioning well in 2000/2003 tools.

Regards, Bob

Mar 6 '06 #6

"RvGrah" <rv****************@sbcglobal.net> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
| Willy,
|
| I'm not referring to the named pipes vs tcp when I refer to "tools", I
| mean VS2005 and Sql server 2005 tools versus VS2003 and Sql 2000. The
| method that worked in the older version to connect to a server in
| another Lan doesn't work in the 2005 versions without setting the "np:"
| prefix to force named pipes, as Pablo on the Ado.Net team recommended.
|
| I'm also a little confused, because the ISA server at the remote server
| has port 1433 open, and always allowed Vs2003 and Sql 2000 Enterprise
| Manager to funtion fine. I don't see port 445 open anywhere, either in
| IP Packet Filters or in Protocol Definitions, so I'm a little mystified
| as to why adding the np: prefix worked for me instantly both in VS and
| Sql Management Studio, where all attempts to go by just the server name
| (I assumed using tcp) failed.
|
| This is all so deep, and quite hard to master for somone who's handling
| everything from hardware issues to Sql admin and database front-end
| development in addition to many other things... I know the number of
| hats I'm wearing does not constitute emergency on your part, I'm just
| trying to get up to speed with the 2005 tools at least to the extent
| that I was functioning well in 2000/2003 tools.
|
| Regards, Bob
|

"np:servername" is a shortcut for "Net=dbnmpntw", herewith you 'force' the
client to use the named pipe protocol to connect to the SQL server. If you
don't specify np or dbnmpntw, the client will use what is configured as
default client protocol(s) (see SQL2005 - SQL Server Configuration Manager)
to connect with SQL server, I assume the default enabled protocol is shared
memory, the other possible protocols are TCP/IP, Named pipes and VIA.
Now, suppose you have shared mem. and TCP enabled in that order. When a
client tries to connect it will use shared memory is the server name is
local, but it will use TCP/IP when the server is remote (using port 1433),
but this isn't working in your case so my guess is that, or, TCP/IP is not
enabled at the SQL server side, or, that you don't have the TCP/IP enabled
at the client, so what you have done is forced the client to use named pipes
network library, but you could also have enabled TCP/IP or Named pipes at
the client using the "SQL Native client configuration" in SQL Server Config.
manager.
For you port 445 issue, rest assured that named pipes use port 445, you can
check this by issuing a netstat -a command at the server, when a client is
connected you will see that the connection is established. Note that this
same port is used by the File server as well, so make sure no clients are
connected to a share on the server.

Willy.
Mar 7 '06 #7
Still wrestling....
The remote machine is an sbs 2000 machine (win2k server, isa 2k, sql
2k). Port 1433 *Inbound* open and defined by isa itself. From what
Pablo said in the other thread, it seems that all this time working
with Sql 2000 Enterprise manager and Visual Studio 2003 they have
implicitly been jumping to named pipes because tcp didn't work, without
"telling" me...
Now with Sql 2005 Management Studio and VS 2005, I'm being forced to
deal with this more granularly, in other words, know what protocol I'm
using and figure out why it's not working, in the case of tcp at least.

If I'm following what you're saying, tcp is higher performing and more
secure. In case there was an issue with two way communcation, I've
opened port 1433 *outbound* on the remote machine, but that made no
difference. I've also checked that the remote machine's sql server 2k
has tcp enabled in network configuration. There doesn't seem to be a
way to change the priority of enabled protocols, should I try disabling
Named Pipes? How else can I troubleshoot tcp to through this vpn
connection? Using the ip address of the remote server doesn't work, nor
does using the vpn's 10.1.1.1 ip address. I'm able to open a my
computer window to the remote machine and browse it's folders (with a
windows xp vpn connect open). I can open a connection from VS 2003 and
Sql 2000 just fine, as mentioned earlier. It's only in VS 2005 and Sql
Manager 2005 that I can only connect if I "force" named pipes.

Just to confuse the issue a bit more, I'm doing all this from behind an
sbs server at my local site that's configured pretty much the same way.
When I connect from home, using the np: prefix doesn't work, only using
the sa id and password in the connection string works. The vpn logon
I'm using is the win2k administrator logon, with full priveleges. I
don't need this functionality for my users, I only need it for
development purposes. The finished versions that I deploy to my users
at both locations only need to function within their local respective
lan's. There is a possibility that I will be asked to provide the owner
with versions that function remotely, however.

I appreciate your help and you definitely have my attention.

Bob

Mar 7 '06 #8
PS: the windows xp sp2 firewall is disabled on the development machines.

Mar 7 '06 #9
Don't know about VS2003, but as far as I know SQL2000 EM should work over
tcpip (could be wrong though), anyway we aren't talking about VS2003 or EM
here, this is about VS2005 and SQL2005 Management Studio right?
Make sure your SQL server is listening on port 1433, that is, on service
port 'ms-sql-s' (1433), you can verify this by issuing a "netstat -a -b"
command on the server. If you have a listener on port 1433, before you try
to connect using SQL client stuff, you can try to connect using telnet (from
the command line);
"telnet servername 1433", when SQL accepts the connection the command window
should have been cleared, else you'll get an error message. Once this works
you can move on, else you are dealing with network issues, so you have to
solve them first.

On the client, you need to make sure you connect to the SQL server using the
IP hostname, not the instance name, or a configured alias. You can verify
and configure this by running the "SQL Server Configuration Manager" (SQL
2005 tools must be installed at the client).
In the "SQL Native Client Configuration", select Client Protocol and make
sure TCP/IP is enabled, the order defines the priority in which the protocol
is selected in an attempt to connect, that means the first protocol (order
1, the default) is tried first. Make sure the port is set to 1433 (or to the
listener port of the SQL server if different from the default port number).
You can also define an alias (or a number of aliases) and configure the
server name, port and protocol corresponding to this alias. The alias can be
used by all client tools (sqlcmd.exe , VS2005, SQL Management Studio) and by
your application, by specifying the alias as "Server" or "Data Source" in
the ConnectionString instead of the host name.

Willy.

Note that this really belongs to the SQL NG, so I would suggest you post
further question over there.

"RvGrah" <rv****************@sbcglobal.net> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
| Still wrestling....
| The remote machine is an sbs 2000 machine (win2k server, isa 2k, sql
| 2k). Port 1433 *Inbound* open and defined by isa itself. From what
| Pablo said in the other thread, it seems that all this time working
| with Sql 2000 Enterprise manager and Visual Studio 2003 they have
| implicitly been jumping to named pipes because tcp didn't work, without
| "telling" me...
| Now with Sql 2005 Management Studio and VS 2005, I'm being forced to
| deal with this more granularly, in other words, know what protocol I'm
| using and figure out why it's not working, in the case of tcp at least.
|
| If I'm following what you're saying, tcp is higher performing and more
| secure. In case there was an issue with two way communcation, I've
| opened port 1433 *outbound* on the remote machine, but that made no
| difference. I've also checked that the remote machine's sql server 2k
| has tcp enabled in network configuration. There doesn't seem to be a
| way to change the priority of enabled protocols, should I try disabling
| Named Pipes? How else can I troubleshoot tcp to through this vpn
| connection? Using the ip address of the remote server doesn't work, nor
| does using the vpn's 10.1.1.1 ip address. I'm able to open a my
| computer window to the remote machine and browse it's folders (with a
| windows xp vpn connect open). I can open a connection from VS 2003 and
| Sql 2000 just fine, as mentioned earlier. It's only in VS 2005 and Sql
| Manager 2005 that I can only connect if I "force" named pipes.
|
| Just to confuse the issue a bit more, I'm doing all this from behind an
| sbs server at my local site that's configured pretty much the same way.
| When I connect from home, using the np: prefix doesn't work, only using
| the sa id and password in the connection string works. The vpn logon
| I'm using is the win2k administrator logon, with full priveleges. I
| don't need this functionality for my users, I only need it for
| development purposes. The finished versions that I deploy to my users
| at both locations only need to function within their local respective
| lan's. There is a possibility that I will be asked to provide the owner
| with versions that function remotely, however.
|
| I appreciate your help and you definitely have my attention.
|
| Bob
|
Mar 8 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jaydeep | last post by:
Hello, I am facing a strange problem. Problem accessing remote database from ASP using COM+ server application having VB components (ActiveX DLL) installed. Tier 1 : ASP front End (IIS 5.0) Tire...
1
by: davidman73 | last post by:
Hello, I have VS 2005 with SQL Server Express in the same machine, but need to connect to a remote SQL Server 2000. I'm getting this error: An error has occurred while establishing a...
10
by: musosdev | last post by:
Hi guys I'm trying to migrate to VS2005... I've managed to do that, but realised I'd opened my web projects as file projects, and I'm getting the error about network BIOS command limit. ...
4
by: musosdev | last post by:
Hi peeps I've just moved my dev system to Win2k3 / VS2005 (from Win2k/VS2k3) and I'm having a problem. I've setup a new website in IIS, enabled .net, fpse, etc. From VS2005, if I choose...
0
by: acwomble | last post by:
I am working with a database on another system via a ssh tunnel using plink. We have setup an alias the local system for the remote database. I am able to connect and work from within Visual...
5
by: Jeff Richardson | last post by:
I am creating a web service that returns data from an Access 2000 database using VS2005. The Access database is located on a different server than where the web service is running. The Access...
1
by: Vikram S | last post by:
Hi All, I have an ASP.NET 2.0 web application on a web server and a separate machine for SQL Server 2000 Database. I am using a Connectionstring based on Sql Authentication to connect to the...
8
by: John | last post by:
Hi We had an sbs 2003 with isa 2000 server. We wre able to access a remote sql server (hosted at our web host) just fine. We replaced the server with a new sbs 2003 r2 with isa 2004 server and...
2
by: orandov | last post by:
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.