1. Trang chủ
  2. » Công Nghệ Thông Tin

The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P24 pptx

5 140 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 235,79 KB

Nội dung

ConfiguringSQLServer2008•Chapter3 97 Named Pipes TCP/IP and Named Pipes are comparable protocols in the architectures that they can be used in. Named Pipes was developed for Local Area Networks (LANs) but can be inefficient across slower networks such as Wide Area Networks (WANs). To use Named Pipes, you first need to enable it in SQL Server Configuration Manager (if you’ll be connecting remotely) and then create a SQL Server Alias, which connects to the server using Named Pipes as the protocol. Named Pipes uses TCP port 445, so make sure the port is open on any firewalls between the two computers, including Windows Firewall. VIA Virtual Interface Adapter (VIA) is a protocol that enables high-performance communications between two systems. It requires specialized hardware at both ends and a dedicated connection. Like Named Pipes, to use the VIA protocol you first need to enable it in SQL Server Configuration Manager and then create a SQL Server Alias, which connects to the server using VIA as the protocol. TCP/IP The most common access protocol for SQL Server allows you to connect to SQL Server by specifying an IP address and port number. Typically, this happens automatically when you specify an instance to connect to. Your internal name resolution system resolves the hostname part of the instance name to an IP address, and you will connect to the default TCP port number 1433 for default instances, or the SQL Browser Service will find the right port for a named instance using UDP port 1434. You can also connect directly to the instance by specifying the <IP Address>: <Instance Port> in the connection string. For example, 10.0.0.1:50000 will connect you to server 10.0.0.1 and the instance listening on port 50000. Changing the TCP Port To change the TCP port on which an instance listens, open SQL Server Configuration Manager and expand SQL Server Network Configuration. Now select Protocols for <instance name> for the instance you want to change, and right-click on TCP/IP to get the Properties window. You can change the port for each IP address that SQL Server is listening on individually, or you can scroll down and specify a fixed port for all IP addresses. In Figure 3.8 you can see Figure 3.8 Changing the TCP Port for an Instance 98 Chapter3•ConfiguringSQLServer2008 that port 50000 has been specified for all IP addresses on the SQL1 instance. Note that the TCP Dynamic Ports value has been deleted. Fixed ports are most often specified for named instances or port 1433 changed for the default instance to provide additional security measures. If you use fixed ports and specify them in the connection string, then you don’t need to run the SQL Browser Service, which will reduce the visible network presence of your SQL Servers. Configuring SQL Server 2008 • Chapter 3 99 Aliases A SQL Server Alias is effectively a shortcut to a SQL Server instance for which you can specify alternative connection information. Once created, you can use the Alias to connect to a SQL Server rather than the specifying the full instance name. For example, I could create an Alias called SQL1 that connects to PLUTO\SQL1, and then I would only have to specify SQL1 as the computer name in any connection string on that server. Now imagine that you’ve changed the TCP port on the SQL Server to 50000 and stopped the SQL Browser Service. To connect to SQL1 you now have to specify the port number in the connection information, or you add port 50000 to the alias definition. Aliases are managed under SQL Server Native Client 10.0 Configuration in the SQL Server Configuration Manager tool. In Figure 3.9 you can see that an alias has been created called SQL1 that will connect to instance PLUTO\SQL1 using TCP/IP and port 50000. The protocol property in the window has a drop down list where you could select Named Pipes or VIA as an alternative protocol. Configuring & Implementing… SQL Server and Windows Firewall on Windows Server 2008 The most common connectivity issue arising when installing SQL Server 2008 on Windows Server 2008 is that the default configuration of Windows enables Windows Firewall, which blocks SQL Server from being accessed across the network and suppresses error messages to say that SQL Server has been blocked. You need to manually add the SQL Server Services to the firewall exception list before you can connect to SQL Server across the network. Figure 3.9 Creating a SQL Server Alias 100 Chapter3•ConfiguringSQLServer2008 Exercise 3.2 steps you through changing the service account, TCP port number, disabling dynamic port detection and creating an alias using Configuration Manager. EXERCISE 3.2 uS I n g SQL SE R v E R Co n f I g u R a t I o n Ma n a g E R 1. First, you’re going to change the SQL Server Service account. Create a local Windows user account with the following attributes: Name: SQLService  Local Groups: Users  2. Launch SQL Server Configuration Manager from the All Programs | Microsoft SQL Server 2008 | Configuration Tools menu. Right-click on the SQL Server (SQL1) Service and select Properties. Under Log on as: select the This account radio button. Type SQLService as the account name and the account password in the password and confirm password boxes and click OK. ConfiguringSQLServer2008•Chapter3 101 Click Yes to continue and restart the service. You have successfully changed the SQL Service account, and this is reflected in the SQL Services view where you’ll now see .\SQLService under the Log On As column for SQL Server (SQL1). 3. Now let’s change the default TCP port for SQL1. Stay in SQL Server Configuration Manager and expand SQL Server Network Configuration. Select Protocols for SQL1, right-click on TCP/IP, and select Properties. Select the IP Addresses tab and scroll down to the IPAll section. As this is a named instance it will have been dynamically assigned a high-range port. Delete the value for TCP Dynamic Ports and enter 50000 for the TCP Port value. Click OK to close the dialog box but don’t restart SQL Server yet. Right-click Shared Memory and select disable. Click OK to clear the dialog box. Select SQL Server Services in the left menu. Right-click on SQL Server (SQL1) and select restart. You have just changed the TCP port for SQL1 and disabled the Shared Memory protocol to force local connections to use TCP/IP. Launch SQL Server Management Studio. You should still be able to connect to your instance without specifying the TCP port name. 4. You’re now going to stop the SQL Browser Service and create a SQL Server Alias. Go back to SQL Server Configuration Manager and select SQL Server Services. Right-click on SQL Server Browser and select Properties. Under the Service tab change the start mode from automatic to manual and click OK. Right-click SQL Server Browser and stop the service. Launch SQL Server Management Studio and try to connect to <computername>\SQL1. The connection should fail with A network-related or instance-specific error message. The connection fails because you have disabled dynamic port detection on the server. Go back to SQL Server Configuration Manager, expand SQL Native Client 10.0 Configuration, and select Aliases. Right-click in the right pane and select New Alias. Create an alias with the following attributes: Alias Name: ‘<computername>\SQL1’ (insert your computer name) Port No: 50000 Protocol: TCP/IP Server: ‘<computername>\SQL1’ . SQLService  Local Groups: Users  2. Launch SQL Server Configuration Manager from the All Programs | Microsoft SQL Server 2008 | Configuration Tools menu. Right-click on the SQL Server (SQL1 ). which will reduce the visible network presence of your SQL Servers. Configuring SQL Server 2008 • Chapter 3 99 Aliases A SQL Server Alias is effectively a shortcut to a SQL Server instance for. you can use the Alias to connect to a SQL Server rather than the specifying the full instance name. For example, I could create an Alias called SQL1 that connects to PLUTO SQL1 , and then I would

Ngày đăng: 06/07/2014, 23:21