Search code examples
sqlsql-serverwindows-server-2012

Access SQL Server 2012 Online


I have a database on my home PC. It is on Microsoft SQL Server 2012. I would like to access this data at work. There are 2 options that I am considering and would like to know how to achieve either.

  1. Connect to the DB (home) via Visual Studio (work) online. How to do this?

  2. Turn my home computer into a server. How to do this?

My PC is new and it is on the house wifi network. It is running Windows Server 2012.

If there are better suggestions I am willing to consider. This is for personal use- one user with roughly 50-100 mb data transfer daily to server.


Solution

  • As far as I know, you can connect to Your database from anywhere you want. But for achieving this You need to perform the following actions:

    1. You need to check that Your SQL Server is configured to use both SQL and Windows authentication (check link http://technet.microsoft.com/en-us/library/ms188670.aspx).
    2. You need to add a SQL login with needed permissions to Your database(s). Script can be achieved from here. But this operation can also be performed in UI on Your home computer.
    3. You need to check that the port which Your SQL server listening on is opened in your firewall (list of ports per protocols and Firewall configuration described here: http://technet.microsoft.com/en-us/library/ms144228.aspx)
    4. You must have a static IP address on Your home computer. Otherwise the connection can be problematic. The "static" IP can be achieved using dynamic DNS. One of the possible solutions is described here
    5. If all of the above were successfully configured, then you simply can connect to your SQL server by IP address with supplying needed credentials (user name created in the (2), password, target database).

    Hope that this was helpful.