How do I connect to SQL Server on my Dedicated Machine from my desktop?


If you have a dedicated (physical or virtual) machine with i7MEDIA and you have SQL Server installed on the server, you can connect to SQL Server remotely by following these instructions.

Prerequisites

  • SQL Server Management Studio installed on your desktop computer.
  • Your public IP Address whitelisted to allow access to your server (open a support ticket for this).

Method 1 (Using SQL Server Authentication)

This is the simplest method but may not be desired if you need to keep SQL Server Authentication turned off or you do not wish to have multiple accounts for accessing your server (windows account, sql account).

Prerequisites

  • SQL User created on the SQL Server you wish to connect to.

Steps

  1. Open SQL Server Management Studio.
  2. Set the Server type to Database Engine.
  3. Set the Server name to the address of your server (either IP or hostname).
  4. Set the Authentication to SQL Server Authentication.
  5. Set the Login to your SQL User.
  6. Set the Password to your SQL User's password.
  7. Click the Connect button.

Method 2 (Using Windows Authentication)

This method is best if you want to keep SQL Server Authentication disabled or you do not want to have multiple accounts for connecting to your server.

Prerequisites

  • Windows User on your server with access to SQL Server installed on your server.

Steps

  1. Locate the SQL Server Management Studio shortcut on your desktop or in your Start Menu.
  2. Right-click the shortcut and click the Properties option. If you're using Windows 8 and you're using the Start Menu, click the Open File Location option and then right-click the located file and select the Properties option.
  3. Copy the contents of the Target (i.e. "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe").
  4. Close the Properties window.
  5. Open a Command Prompt and enter: runas /netonly /user:NameOfYourServer\YourServerLogin "Path Copied from Step 3" then press the Enter key.
    Example:
    • runas /netonly /user:AcmeWeb01\JohnDoeAdmin "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"
  6. You will be prompted for the password, enter it and press the Enter key.
  7. SQL Server Management Studio will open.
    1. Set the Server type to Database Engine.
    2. Set the Server name to the address of your server (either IP or hostname).
    3. Set the Authentication to Windows Authentication.
    4. The disabled User name and password fields will look incorrect, do not worry about them.
    5. Click the Connect button.

Note: You can create a shortcut to the full runas command so you don't have to remember the syntax of the command. To do this, simply right-click on your desktop, select New > Shortcut and enter the runas command as in the example above for the location. Give your shortcut a meaningful name and you're good to go!

Was this answer helpful?

 Print this Article

Related Articles

What connection string can I use to connect to my MSSQL database?

The following connection string is an example. More connection strings can be found on the...

Backing up and Restoring SQL Server Databases

To backup SQL Server database: Login to the Easy Hosting Control website. Learn How. Click...

Managing SQL Server Databases

i7MEDIA offers a web-based SQL Management application for SQL Server Management. This tool allows...