Alex Gordon
Alex Gordon

Reputation: 60701

connecting to sql server express remotely

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??

Upvotes: 1

Views: 2126

Answers (1)

ewall
ewall

Reputation: 28100

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!

Upvotes: 1

Related Questions