[英]How to connect to a MS SQL database using MS Server Management Studio and ODBC
I need to connect to a MS SQL Server, using MS Management Studio, the hosting company only provided me the ODBC connection for this database, but I can see it only connecting using VPN on the Server. 我需要使用MS Management Studio连接到MS SQL Server,托管公司只为我提供了该数据库的ODBC连接,但是我只能在服务器上使用VPN看到它。
My question: - Can I connect to the DB using MS MS Management Studio through ODBC? 我的问题:-是否可以通过ODBC使用MS MS Management Studio连接到数据库?
I usually use SQL Server Authentication or Windows Authentication. 我通常使用SQL Server身份验证或Windows身份验证。
Thanks for your time. 谢谢你的时间。
I don't believe that you can connect directly to the odbc connection in SSMS, although you can connect to a SQL server, and add a linked server to the odbc connection. 我不相信您可以直接连接到SSMS中的odbc连接,尽管您可以连接到SQL Server,并将链接的服务器添加到odbc连接。 You would open the server objects -> Linked servers -> Add
您将打开服务器对象->链接服务器->添加
From the provider list choose Microsoft OLE DB Provider for ODBC Drivers 从提供程序列表中选择用于ODBC驱动程序的Microsoft OLE DB提供程序
I think the details will vary depending on if this is a System DSN or File DSN but here's the msdn. 我认为细节会有所不同,具体取决于这是系统DSN还是文件DSN,但这是msdn。 http://msdn.microsoft.com/en-us/library/windows/desktop/ms675326(v=vs.85).aspx
http://msdn.microsoft.com/zh-CN/library/windows/desktop/ms675326(v=vs.85).aspx
Then you can query against the data source by opening a new query against your sql server and using the full four part name ie 然后,您可以通过对您的sql server打开一个新查询并使用完整的四部分名称来查询数据源,即
SELECT * FROM ServerName.DatabaseName.SchemaName.TableName 选择* FROM ServerName.DatabaseName.SchemaName.TableName
Another option would be using VS 2012 to add a Data Connection to the ODBC data source. 另一个选择是使用VS 2012将数据连接添加到ODBC数据源。 This would be the cleanest although it doesn't directly address the question.
尽管它不能直接解决问题,但这将是最干净的方法。
Possibly. 可能吧。 The ODBC connection will contain all the information you neeed - the server address or IP address, a user name and a password.
ODBC连接将包含您需要的所有信息-服务器地址或IP地址,用户名和密码。
But there may be a firewall on your host preventing such connections. 但是主机上可能有防火墙阻止此类连接。
Try it. 试试吧。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.