将连接字符串设置为远程sql server [英] Set connection string to a remote sql server

查看:76
本文介绍了将连接字符串设置为远程sql server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,

我是asp.net世界的新手(到目前为止我是在winforms桌面应用程序中开发的)。

i只是一个域和一个窗口2008 R2标准+ PLESK主机。

通过plesk面板,我创建了一个sql server数据库。

在我的本地电脑上,我有一个vb.net winform应用程序和我我正在尝试连接数据库。到目前为止,没有好处。

我的connectionString是这样的:

Hey guys,
i'm new to the asp.net world (so far i developed in winforms desktop applications).
i just baught a domain and a windows 2008 R2 standard+PLESK hosting.
through the plesk panel, i created an sql server database.
in my local pc, i have a vb.net winform application and i'm trying to connect to the database. so far, no good.
my connectionString is like this:

"Data Source= my_ip ;Network Library = DBMSSOCN;initial Catalog=my_db_name;User ID = my_user_name;Password=xxxx"



也许我需要管理端口? (我的港口,我不知道......)

再次,这个主题对我来说是全新的。关于如何开始工作的任何建议都会非常友好。另一件事:面板非常(非常!)慢,并且具有最基本的选项。无论如何通过其他平台管理数据库?

非常感谢,

oron。


maybe i need to mantion the port? (whats my port, i have no idea...)
again, this subject is brand new to me. any advice on how to get thing started will be very kind. and another thing: the panel is very (very!) slow and has the most basic options. is there anyway to manage the database through other platform?
thanks a lot,
oron.

推荐答案

基本上相同的连接字符串应该工作,特别是因为您正在使用SQL Server身份验证。



我建议检查实例不是命名实例,如果是,请在数据源中提供实例的名称。有关完整示例,请查看 https://www.connectionstrings.com/sql-server/ [ ^ ]



如果托管数据库是群集的,那么您很可能需要定义端口。
Basically the same connection string should work especially since you're using SQL server authentication.

Id suggest checking that the instance isn't a named instance and if it is, provide the name for the instance in the data source. For complete examples, have a look at https://www.connectionstrings.com/sql-server/[^]

If the hosted database is clustered then you most likely need to define the port.


这篇关于将连接字符串设置为远程sql server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆