17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2: Tools of the Trade<br />

26<br />

Keep in mind that, in order for your client to gain a connection to the server, the server has to be listening<br />

for the protocol with which the client is trying to communicate and, in the case of TCP/IP, on the<br />

same port.<br />

At this point, you might be tempted to say, “Hey, why don’t I just enable every NetLib? Then I won’t<br />

have to worry about it.” This situation is like anything you add onto your server — more overhead. In<br />

this case, it would both slow down your server (not terribly, but every little bit counts) and expose you<br />

to unnecessary openings in your security. (Why leave an extra door open if nobody is supposed to be<br />

using that door?)<br />

OK, now let’s take a look at what we can support and why we would want to choose a particular protocol.<br />

Named Pipes<br />

Named Pipes can be very useful when TCP/IP is not available, or there is no Domain Name Service<br />

(DNS) server to allow the naming of servers under TCP/IP.<br />

TCP/IP<br />

For security reasons, only Shared Memory is enabled at installation time.<br />

You’ll want to leave Shared Memory enabled for when you’re accessing the machine<br />

locally. (It works only when the client is on the same physical server as the <strong>SQL</strong><br />

<strong>Server</strong> installation.) But you need to enable at least one other NetLib if you want to<br />

be able to contact your <strong>SQL</strong> <strong>Server</strong> remotely (say, from a Web server or from different<br />

clients on your network).<br />

<strong>Tech</strong>nically speaking, you can connect to a <strong>SQL</strong> <strong>Server</strong> running TCP/IP by using its<br />

IP address in the place of the name. This works all the time, even if there is no DNS<br />

service, as long as you have a route from the client to the server. (If it has the IP address,<br />

then it doesn’t need the name.) Keep in mind, however, that if your IP address changes<br />

for some reason, you’ll need to change what IP address you’re accessing (a real pain<br />

if you have a bunch of config files you need to go change!).<br />

TCP/IP has become something of the de facto standard networking protocol and is also the only option if<br />

you want to connect directly to your <strong>SQL</strong> <strong>Server</strong> via the Internet, which, of course, uses only IP.<br />

Don’t confuse the need to have your database server available to a Web server with the need to have<br />

your database server directly accessible to the Internet. You can have a Web server that is exposed to the<br />

Internet, but also has access to a database server that is not directly exposed to the Internet. (The only<br />

way for an Internet connection to see the data server is through the Web server.)<br />

Connecting your data server directly to the Internet is a security hazard in a big way. If you insist on<br />

doing it (and there can be valid reasons for doing so, rare though they may be), then pay particular<br />

attention to security precautions.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!