zoukankan      html  css  js  c++  java
  • SQL SERVER 2012数据库:开启防火墙导致外部无法连接数据库解决办法

    SQL SERVER 2012数据库:开启防火墙导致外部无法连接数据库解决办法

    将以下代码存为OpenSqlServerPort.bat文件:

    netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80
    
    @echo =========  SQL Server Ports  ===================
    @echo Enabling SQLServer default instance port 1433
    netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433
    @echo Enabling Dedicated Admin Connection port 1434
    netsh advfirewall firewall add rule name="SQL Admin Connection" dir=in action=allow protocol=TCP localport=1434
    @echo Enabling Conventional SQL Server Service Broker port 4022
    netsh advfirewall firewall add rule name="SQL Service Broker" dir=in action=allow protocol=TCP localport=4022
    @echo Enabling Transact SQL/RPC port 135
    netsh advfirewall firewall add rule name="SQL Debugger/RPC" dir=in action=allow protocol=TCP localport=135
    @echo =========  Analysis Services Ports  ==============
    @echo Enabling SSAS Default Instance port 2383
    netsh advfirewall firewall add rule name="Analysis Services" dir=in action=allow protocol=TCP localport=2383
    @echo Enabling SQL Server Browser Service port 2382
    netsh advfirewall firewall add rule name="SQL Browser" dir=in action=allow protocol=TCP localport=2382
    
    @echo =========  Misc Applications  ==============
    @echo Enabling HTTP port 80
    netsh advfirewall firewall add rule name="HTTP" dir=in action=allow protocol=TCP localport=80
    @echo Enabling SSL port 443
    netsh advfirewall firewall add rule name="SSL" dir=in action=allow protocol=TCP localport=443
    @echo Enabling port for SQL Server Browser Service's 'Browse' Button
    netsh advfirewall firewall add rule name="SQL Browser" dir=in action=allow protocol=UDP localport=1434
    @echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)
    netsh firewall set multicastbroadcastresponse ENABLE


    然后在CMD命令提示符下运行该文件。

    世界再大也有尽头!
  • 相关阅读:
    2.2.7将任意对象作为对象监视器
    2.2.6验证同步代码块时锁定当前对象的
    2.2.5synchronized代码间的同步性
    2.2.4一半异步,一半同步
    2.2.3用同步代码块解决同步方法的弊端
    FL2440 ubifs文件系统烧录遇到的问题——内核分区的重要性
    FL2440 rt3070模块ap模式移植
    FL2440 rt3070模块station模式动态获取IP地址
    FL2440 rt3070模块station模式移植
    fl2440 platform总线button字符设备驱动
  • 原文地址:https://www.cnblogs.com/shijiehaiyang/p/14870264.html
Copyright © 2011-2022 走看看