how to connect to another sql server database(server pc) in local area network

走远了吗. 提交于 2019-12-13 19:30:26

问题


i m creating an application, inwhich client has to acces a database stored in a remote location connnected through a live ip. how can i connect simply with a database server placed in LAN. both using sql server 2005 express edition. please refer me or help me on this


回答1:


Set in your connection string IP address of remote server. E.g.

"Data source=192.168.0.13; Database=MyDb;User ID=my_user;password=12345"

where 192.168.0.13 is your remote server IP and MyDb is your database name.




回答2:


Also, make sure to configure your SQL Server Express to allow remote connections! Those are disabled by default after installation.

Check out the SQL Server Surface Configuration tool (if I'm not mistaken) to configure these settings.

Marc




回答3:


This not about programming. You have forward the port which Sql Server uses on modem.



来源:https://stackoverflow.com/questions/1567460/how-to-connect-to-another-sql-server-databaseserver-pc-in-local-area-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!