To access your SQL Server 2005 / 2008 instance across a LAN or the Internet you must first ensure that TCP/IP is enabled on the SQL Server instance you are trying to access and you are connecting on the correct port (by default, TCP 1433).
So as quoted on MSDN, this is how you enable TCP/IP support for your instance from within SQL Server Configuration Manager (which can be found in your start menu):
All network protocols are installed by SQL Server Setup, but may or may not be enabled.
Use SQL Server Configuration Manager to enable or disable network protocols.
The Database Engine must be stopped and restarted for the change to take effect. To enable a server network protocol:
- In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration.
- In the console pane, click Protocols for <instance name>.
- In the details pane, right-click the protocol you want to change, and then click Enable or Disable.
- In the console pane, click SQL Server Services.
- In the details pane, right-click SQL Server (<instance name>), and then click Restart, to stop and restart the SQL Server service.
Once this is done you may test your login (using SQL Server Management Studio or via your application if applicable etc.) by connecting to ‘MACHINE_NAME_OR_IP‘ or ‘MACHINE_NAME_OR_IP\SQLEXPRESS‘ if it is a SQL Server Express instance.
You might want to also check your Windows Firewall to ensure you can accept incoming connections on the hosting SQL server machine.
3 Comments
And you believe that allowing internet access to any database server is a good idea?
Bad developer, bad.
I don’t recall saying that. I shouldn’t need explain security risks by opening up SQL Server across the Internet. If you don’t know what precautions to take or how to only allow access for services that require it, then that’s at your own demise.
LoL no one said anything about putting your SQL Server in the DMZ trolling failure.
Post a Comment