tags:

views:

37

answers:

1

i have a beginners question, and i apologize if it is stupid.

i am a beginner at sql server. i can do sql pretty well, but i dont know much about connecting.

i have:

Microsoft SQL Server Management Studio and SQL EXPRESS

what is the process of allowing remote connections to it?

i would like to leave my laptop online at home with the management studio running and would like to access my home sql server through a remote connection.

i would like to know

  1. how do i allow one of my databases to accept remote connections?
  2. what would the connection string be? just my laptop's IP address or what?
  3. is it dangerous to accept remote connections?

i have done the following BTW:

http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx

and when i do this it works:

SQLCMD -e -s localhost\sqlexpress,2301

however when i try to do this it does NOT work

sqlcmd -e -s my.ip.add.ress\sqlexpress,2301

anyway, after i do get this to work how would i connect to a specific db??

+1  A: 

By default, SQL Server Express 2005 and 2008 not allow connections from anywhere but the local computer... but it is not difficult to change it.

In short, you want to run the SQL Server Surface Area Configuration program and enable the appropriate remote connection options you need.

You will also need to enable the SQL Browser service, and don't forget to poke the appropriate holes in your Windows Firewall if you have it enabled (which I hope you do). All three of these steps are described here. Good luck!

ewall
@ewall understood, but please tell me how can i connect to it
i am a girl
As you showed, it is working locally but not from remote. The most likely cause of the problem, then, is an interfering firewall--either your local Windows Firewall is still blocking (try allowing port 2301 through), or there's another NAT firewall between your remote connection and the server (e.g. your server is at home behind a Linksys/NetGear/whatever router, so it has an unroutable IP address like "192.168.1.2" which you cannot get to from the Internet).
ewall