Hướng dẫn kết nối sql server qua vpn năm 2024

Hướng dẫn cài đặt và cấu hình SQL Server để kết nối từ xa qua Internet

H

ệ quản trị cơ sở dữ liệu Microsoft SQL Server của Microsoft được đánh giá là một trongnhững hệ quản trị cơ sở dữ liệu tốt và mạnh nhất hiện nay. Nếu bạn là một nhà phát triển ứngdụng cũng như phát triển website trên môi trường Windows thì không thể không biết đến SQLServer.Khi phát triển các ứng dụng dạng Desktop thì chúng ta thường không quan tâm và thậm chí cóthể không cần biết đến tính năng hỗ trợ kết nối từ xa của SQL Server. Nhưng khi bạn phát triểncác ứng dụng Web, hoặc các ứng dụng desktop đòi hỏi dữ liệu tập trung tức thì để phục vụ choviệc ra báo cáo mà chương trình thì lại cách xa nhau về mặt địa lý, thì bạn sẽ cần đến tính năngkết nối từ xa của SQL Server. Tính năng này có trên tất cả các phiên bản SQL Server.Trong bài viết này, tôi thực hiện hướng dẫn cài đặt và cấu hình trên phiên bản SQL Server 2005, các phiên bản khác việc thực hiện tương tự.

Sau khi hoàn thành bài hướng dẫn này:

Bạn có thể cài đặt SQL Server

Bạn có kết nối vào SQL Server cài trên máy tính của bạn từ bất kỳ máy tính nào có nốimạng Internet từ bất cứ đâu.

Các bước thực hiện

1.Cài đặt SQL Server 2.Cấu hình SQL Server để mở kết nối từ xa.3.Tạo user kết nối4.Cấu hình Firewall trên Server cho phép nhận kết nối đến qua cổng kết nối của SQLServer 5.Cấu hình Router cho phép kết nối đến thông qua cổng của kết nối SQL Server

Bước 1: Cài đặt SQL Server*

Bước 2: Config SQL Server cho phép kết nối từ xa

Mục đích là kích hoạt tính năng cho phép kết nối từ xa của SQL Server và thiết lập cổngnghe [Listenning Port] cho SQL Server. Vào Start -> All Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQLServer Configuration Manager Ở menu bên trái, chọn vào mục SQL Server 2005 Services -> Bên phải tìm mục SQLServer [MSSQLSERVER] [

chú ý đây là dịch vụ cơ bản của SQL Server, tên của nó tùythuộc vào Instant của SQL mà bạn cài vào máy, của tôi là MSSQLSERVER, có thể Instant của bạn sẽ khác].

Click phải vào và chọn Properties [xem hình]

Trong Tab Log On, click chọn vào Built-In Account, chọn vào Network Service như trong hình,Click OK Quay lại màn hình SQL Server Configuration Manager -> ở menu bên trái tiếp tục click vàomục SQL Server 2005 Network Configuration để mở ra menu con Protocols for MSSQLSERRVER[

tên trên máy bạn có thể khác]

, chọn vào mục này -> bên phải tìm mụccó tên là TCP/IP, click phải vào nó và chọn Properties [xem hình]

Trong cửa sổ mở ra, ở Tab Protocols, mục Enabled chọn vào YesTiếp tục click qua Tab IP Address -> Sẽ xuất hiện list các IP [IP1, IP2,…] đây là danh sách cácIP hình thành khi máy bạn có kết nối vào các mạng LAN khác nhau

Hãy nâng cấp lên Microsoft Edge để tận dụng các tính năng mới nhất, bản cập nhật bảo mật và hỗ trợ kỹ thuật.

Publish Data over the Internet Using VPN

  • Bài viết
  • 03/01/2023

Trong bài viết này

Applies to:

Virtual Private Networking [VPN] technology allows users working at home, branch offices, remote clients, and other companies to connect to a corporate network over the Internet, while maintaining secure communications. Users can use Windows Authentication as though they were on a Local Area Network [LAN]. All types of Microsoft SQL Server replication can replicate data over a VPN, but consider using Web synchronization if you are using merge replication, because Web synchronization eliminates the need for a VPN. For more information, see Web Synchronization for Merge Replication.

A VPN includes client software so that computers connect over the Internet [or in special cases, even an intranet] to software in a dedicated computer or a server. Optionally, encryption at both ends, as well as user authentication methods, are used. The VPN connection over the Internet logically operates as a Wide Area Network [WAN] link between the sites.

A VPN connects the components of a network using another network. To connect, the user tunnels through the Internet or another public network using a protocol such as Microsoft Point-to-Point Tunneling Protocol [PPTP] or Layer Two Tunneling Protocol [L2TP]. This process provides the same security and features previously available only in a private network. PPTP is available with the Microsoft Windows NT version 4.0 and Microsoft Windows 2000 [and later] operating systems; L2TP is available with Windows 2000 and later.

For the user, the intermediate routing infrastructure of the Internet is not visible and it appears as though the data is being sent over a dedicated private link. As far as users are concerned, the VPN is a point-to-point connection between the user computer and a corporate server.

After you have your remote client configured to connect using a VPN, and the client has Internet access and is logged in to the corporate LAN, you can configure replication as though the remote client is connected directly on the LAN. For security reasons, it is possible to have different network resources available to users connected over VPN and to those connected directly on the LAN.

Chủ Đề