Configuring the network environment 9/16/2018 1:28 PM Configuring the network environment Module 14 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Module Agenda Understanding network configuration 9/16/2018 1:28 PM Module Agenda Understanding network configuration Connecting to SQL Server The SQL Server Migration Assistant (SSMA), Microsoft Assessment and Planning Toolkit (MAP) tool, and SQL Server Integration Services (SSIS) combined with Oracle client drivers (and others) can be used in support of the following aspects of an Oracle or SAP migration: Migration process & tooling Data deployment Cloud migration © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Understanding network configuration 40074 2: Database and instances Lesson 1 Understanding network configuration
Oracle and SQL Server connectivity similarities Oracle connections The connectivity layers are very similar SQL Server Native Client along with ODBC, JDBC and OLEDB provide connectivity for applications Tabular Data Stream (TDS) endpoints operate like the Listener SQL Server connections Introduction For clients of a SQL Server database to request information or to submit changes, they must be able to communicate with the system through the application directly or through an application or web server. The client communicates with SQL Server through the SQL Server Native Client (SNAC). This is a technology that was introduced in SQL Server 2005. It combines the functions of OLE DB and Open Database Connectivity (ODBC). The application accesses the SNAC through an API. Because of the low-level integration of the connectivity model used in older providers, additional features and enhanced performance is available to the clients. Note: It is still possible for OLE DB, ODBC, and DB-Library providers to communicate with SQL Server 2005 through SQL Server 2014. However, these are made available for backwards compatibility for applications using these providers. Many features introduced in SQL Server 2005 through SQL Server 2014 are not available to these providers and the applications which consume them. When the application is ready to communicate with the server, it first uses the SNAC to convert the message into a special communications format called a tabular data stream (TDS). The component of the SNAC that provides this capability is the SQL Server Network Interface (SNI) protocol layer. The SNAC also provides a list of standard protocols that may be placed in order or attempts to the server to transmit the package created by the SNI. The order of the protocols is configurable through the SQL Server Native Client Configuration utility installed automatically through the client package. SQL Server listens for network communications and requests through a set of TDS endpoints. These endpoints are installed automatically when the database engine is installed.
SQL Server TDS endpoint types Shared memory TCP/IP Named pipes Dedicated Admin connection Shared Memory is the simplest protocol to use and has no configurable settings. TCP/IP is an industry-standard protocol which permits network access to SQL Server by specifying the computer name and instance name or the IP address and instance name. Named Pipes is a protocol developed for local area networks. Dedicated Administrator Connection (DAC) can only be used by members of the sysadmin fixed server role. Shared Memory Shared Memory is the simplest protocol to use and has no configurable settings. Because clients using the shared memory protocol can only connect to a SQL Server instance running on the same computer, it is not useful for most database activity. Use the shared memory protocol for troubleshooting when you suspect the other protocols are configured incorrectly. The system recognizes this as a Local Control Protocol. TCP/IP TCP/IP is an industry-standard protocol which permits network access to SQL Server by specifying the computer name and instance name or the IP address and instance name. TCP/IP allows for static or dynamic port allocation. Static is preferred when you must pass through a firewall and the firewall is configured for a specific port to allow access to SQL Server. Otherwise, having a dynamic address assigned to instances reduces the risk of a security breach since the specific port could be accessed. Named Pipes Named Pipes is a protocol developed for local area networks. A part of memory is used by one process to pass information to another process, so that the output of one is the input of the other. The second process can be local (on the same computer as the first) or remote (on a networked computer). Dedicated Administrator Connection Dedicated Administrator Connection (DAC) can only be used by members of the sysadmin fixed server role.
Role of SQL Browser service Provides list of services Aids in connecting to instances on server Listens to port 1434 and routes request to correct server instance Typically disabled by default and used by setup to enumerate services Default instance
Demo Controlling SQL Server services
Demo: Controlling SQL Server services Controlling services with SQL Server Configuration Manager Controlling services with PowerShell Start and stop SQL Server Browser service
Demo Controlling services with SQL Server Configuration Manager
Demo: Controlling services with SQL Server Configuration Manager Specialized version of Windows services for SQL Server Stop and start services Change service accounts Manage client and server network protocols Set startup parameters Resource: https://msdn.microsoft.com/en-us/library/ms174212.aspx SQL Server Configuration Manager
Demo Controlling services with PowerShell
Demo: Controlling services with PowerShell # Get a reference to the ManagedComputer class. CD SQLSERVER:\SQL\computername $Wmi = (get-item .).ManagedComputer $DfltInstance = $Wmi.Services['MSSQLSERVER'] # Display the state of the service. $DfltInstance # Start the service. $DfltInstance.Start(); # Wait until the service has time to start. # Refresh the cache. $DfltInstance.Refresh(); # Stop the service. $DfltInstance.Stop(); # Wait until the service has time to stop. Get-Service to display services on computer Start-Service to start services Stop-Service to stop services . Use –Force option to stop dependent services
Demo Start and stop SQL Server Browser service
Demo: Start and stop SQL Server Browser service Enable Start Mode Change State to Start Use low privileged user for service account Reference: https://msdn.microsoft.com/en-us/library/hh510203.aspx SQL Server Browser Service (Database Engine and SSAS)
Demo Setting up connectivity
Demo: Setting up connectivity Using Windows\System32\drivers\etc\hosts file Setting up an alias Using netstat command to determine posts in use Changing dynamic posts to static ports Configure Windows Firewall
Demo Controlling SQL Server services
Demo: Using Windows\System32\drivers\etc\hosts file Provides outgoing aliases to other servers at the OS level
Demo Setting up an alias
Demo: Setting up an alias Select 32/64 bit client alias Create a new alias Specify the routing Can be used to forward connection requests to other servers as part of upgrade
Using netstat command to determine posts in use DOS command to view open and used ports For PowerShell version, see http://blogs.microsoft.co.il/scriptfanatic/2011/02/10/how-to-find-running- processes-and-their-port-number/
Demo Change TCP/IP dynamic port to static port
Demo: Change TPC/IP dynamic port to static port Dynamic ports change at server startup Delete 0 value for TCP Dynamic Ports value and enter in the static port number for TPC Port
Demo Configure Windows Firewall
Demo: Configure Windows Firewall Open TCP/IP port for specific SQL Server instance
Resources Using PowerShell to stop and start services Create or Delete a Server Alias for Use by a Client Netstat TCP/IP Properties Configure the Windows Firewall to Allow SQL Server Access
Lesson 2 Connecting to SQL Server
AlwaysOn Availability Group Listener AlwaysOn Availability Groups – similar to Active Data Guard – uses it’s own listener that is a Windows Cluster resource for routing traffic on failovers and load balancing read-only queries to secondary replicas Unified HA Solution Hong Kong (Secondary) AG AG_Listener New Jersey (Secondary) AG AG Source: https://msdn.microsoft.com/en-us/library/bb510411(v=sql.130).aspx#highavailability Load-balancing of read-intent connection requests is now supported across a set of read-only replicas. The previous behavior always directed connections to the first available read-only replica in the routing list. For more information, see Configure load-balancing across read-only replicas. The number of replicas that support automatic failover has been increased from two to three. Group Managed Service Accounts are now supported for AlwaysOn Failover Clusters. For more information, see Group Managed Service Accounts. For Windows Server 2012 R2, an update is required to avoid temporary downtime after a password change. To obtain the update, see gMSA-based services can't log on after a password change in a Windows Server 2012 R2 domain. AlwaysOn Availability Groups supports distributed transactions and the DTC on Windows Server 2016. For more information, see SQL Server 2016 Support for DTC and AlwaysOn Availablity Groups. You can now configure AlwaysOn Availability Groups to failover when a database goes offline. This change requires the setting the DB_FAILOVER option to ON in the CREATE AVAILABILITY GROUP (Transact-SQL) or ALTER AVAILABILITY GROUP (Transact-SQL) statements. Asynchronous data Movement Synchronous data Movement New York (Primary)
Demo Connecting to SQL Server 9/16/2018 1:28 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Demo: Connecting to SQL Server Connecting to a database from client computer Using a dedicated admin connection SSMS allows you to connect using the supported network protocols
Demo Dedicated Admin Connection
Demo: Dedicated Admin Connection Used when troubleshooting problems on unresponsive server Prefix ADMIN: to server name or –A option with SQLCMD Only works from client on same server Reference: https://msdn.microsoft.com/en-us/library/ms189595.aspx Diagnostic Connection for Database Administrators
Resources Availability Group Listeners, Client Connectivity, and Application Failover SQL Server Connection Properties Diagnostic Connection for Database Administrators
Module Summary Understanding network configuration 9/16/2018 1:28 PM Module Summary Understanding network configuration Introduction to AlwaysOn Availability Group Listener The SQL Server Migration Assistant (SSMA), Microsoft Assessment and Planning Toolkit (MAP) tool, and SQL Server Integration Services (SSIS) combined with Oracle client drivers (and others) can be used in support of the following aspects of an Oracle or SAP migration: Migration process & tooling Data deployment Cloud migration © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/16/2018 1:28 PM © 2016 Microsoft Corporation. All rights reserved. Microsoft, SQL Server, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.