I am new to SQL Server and I'm wondering how to connect to a remote database. I am not trying to do this through a web app, I am just trying to connect to and view a database (which exists on a remote server) on my machine. Is there a way to do this?
3 Answers
For just connecting to the SQL Server database engine, I would recommend installing SQL Server Management Studio Express, which is the free version of the SQL Server "desktop client". You can perform general query/manipulation/admin functions with it, but you won't have some of the more advanced features that come with the full version which I doubt you would need.
![](../../users/profiles/1054.webp)
- 37,618
- 10
- 90
- 145
-
1...or if you have the full version of SQL Server, get the dvd & install just the client tools on your desktop – Nick Kavadias Oct 22 '09 at 01:17
You need to get SQL Server Management Studio or the express version and press 'new query'. Normally you can connect to the default instance on the sql server by using the server name. If it is a named instance, you'll need to know that name. Your admin can help you there.
You can also connect using SQLCMD at the command line. For 2005 you can get that here: http://www.microsoft.com/downloads/details.aspx?familyid=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en
You will also need the sql native client.
![](../../users/profiles/2608.webp)
- 1,990
- 1
- 14
- 21
I'm assuming you mean that your machine and the SQL server are on different networks that are separated by a firewall. If so, then you would need to create a firewall rule on the SQL server side that allowed SQL connections (port 1433 for the default SQL instance) from the outside to get to the SQL server. IMHO, this is not recommended and would probably be difficult to get the firewall admin on board with (unless you are the firewall admin).
![](../../users/profiles/19152.webp)
- 108,377
- 6
- 80
- 171