SQL Server2012 remote Access Second real column

Source: Internet
Author: User
Tags management studio sql server management sql server management studio server port

Now there is a computer and a B computer, A is the company's server, installed two database instances (SQL Server 2012 and SQL Server2008 R2), b computer at home, installed SQL Server database Two computers are not a local area network ( We are considering two database connections from different networks, such as a computer at the company, b Computer at home, and now I'm going to use B computer in my home to connect to the database in the company's a computer. The following is an example of SQL Server R2 Setup, which is similar to SQL Server 2012 settings (different listening ports).

First, we will set a computer's SQL Server port, using the router's port forwarding function, which can be accessed externally to the

Second, the B computer uses the peanut shell to bind the domain name for remote access, the specific steps are as follows:

SQL Server R2 does not allow remote connections by default, if you want to connect to SQL Server 2008 locally on a remote server with SSMS, connect to the database remotely. You need to do two-part configuration:

1. SQL Server Management Studio Express (SSMS)

2. SQL Server Configuration Manager/sql Server Config Manager (abbreviated SSCM)

3. Set firewall to allow database port to open

4. Router Configuration port forwarding function

First step: Open the remote connection function of the database

1, here we take SQL Server R2 as an example, open SQL Server R2 login.

2. After logging in, right-click on "Properties". Select Security on the left, select SQL Server and Windows authentication mode on the right to enable hybrid login mode, and skip this step if you have already done so.

Open SQL Serve

3. Select "Connect", tick "Allow remote connection to this server", then click "OK"

4. Expand "Security", "Login name", "sa", right-select "Properties"

5. Select "General" on the left, "SQL Server Authentication" on the right, and set the password, if already set, skip this step

6, right click on the database selection "aspect"

7. Select "Server Configuration" in the right side drop-down box, set the "Remoteaccessenabled" property to "True", and click "OK"

Step two: SQL Server Configuration Manager configuration

1. Open SQL Server Configuration Manager

2. Start configuring SSCM below, select "SQL Server service" on the left, and make sure "SQL Server" and "SQL Server Browser" are running on the right.

3, in the left select the SQL Server Network Configuration node under the SQLExpress protocol, in the right side of TCP/IP, right-enable or double-click to open the Settings panel to modify it to "yes", if the "yes" is not modified.

4, select the "IP Address" tab, set the TCP port to 1433 (the default), because we have two instances, the port is different.

5, the "client protocol" of "TCP/IP" is also modified to enable

Step three: Firewall settings SQL Server ports allow external access

1. Open the firewall and select "Advanced Settings"

2. Click "New rule" in "inbound rules"

3. We select "Port"

4, we select the rule applies to "TCP", in "specific local port" Enter the default port number of SQL Server 1433, click Next

5. Select Allow Connection

6. Give the rule any name

7. Add rules to set port 1433 for SQL Server 2012

Fourth Step: Router Configuration port forwarding function

Enter a computer's gateway port, port forwarding configuration, take tl-wvr308 router as an example, in the "forwarding rules" in the "virtual server" added to the port, where the external port can be changed to other ports, or the internal port number is consistent, and the internal ports must be 1433 (SQL Server's default port), the internal server IP address is the intranet IP address of the a computer.

At this point, a computer's SQL Server allows access to the configuration of all completed, followed by, B computer connected to a computer database. Finally, we use the SQL Server of the B computer to connect a computer's SQL Server.

How SQL Server 2012 instances are accessed:

This allows you to use the B computer to remotely access all of the SQL Server instances of a computer ~ ~

SQL Server2012 remote Access Second real column

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.