Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need help in SQL Server Remote Access

how to connect two laptops to share a database using windows form application? i mean i've installed mssql server 2008 in my laptop, i need to make windows form application so my friend can modify the database from his laptop, it's not in LAN , we have to use Internet as medium to connect, it'd be helpful if anyone can show me some directions like how connection strings should be. thanks :)

like image 701
geek007 Avatar asked Mar 16 '14 16:03

geek007


1 Answers

You should consider looking into this. If you search for Error 40 or Error 26 SQL Server. You will get lot of links for connecting SQL Server remotely both on LAN and WAN.

Take a look at this link as well. Screenshots are added here

There are multiple steps involved

  1. Enable default login (sa) - not a good practice

  2. Enable remote connection on sql server

  3. Enable SqlBrowser service - either through Sql Server configuration manager or type services.msc on Run(Ctrl + R)

  4. Add SqlBrowser.exe to firewall exception

  5. Open TCP port 1433 and add it to firewall

  6. Enable TCP, NamedPipe in Sql Server Configuration manager.

  7. Check your public IP using any site like Seemyip.com

  8. Give this IP to your friend along with sql server instance name

  9. On remote machine - enter IP\ServerName with credentials for sa.

like image 52
Shantanu Gupta Avatar answered Oct 29 '22 16:10

Shantanu Gupta