how to access localDB from Windows Service

后端 未结 3 1353
走了就别回头了
走了就别回头了 2020-12-19 11:21

I need to use data base locally. I have created database in (LocalDB)\\v11.0 Server with Visual Studio 2012. Everything is ok when connecting from e.g. console application.

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-19 12:15

    I think that you need to allow remote connection to your SqlServer.

    In the Sql Server configuration manager, under SQL Network Configuration, chose your server and check that TCP/IP is enabled.

    In my case, doublic click on TCP/IP, go to the bottom "IPAll" and set dynamic ports empty and TCP Port to 1433.

    Let me know if it's enough.

提交回复
热议问题