简体   繁体   中英

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.

My question: - Can I connect to the DB using MS MS Management Studio through ODBC?

I usually use SQL Server Authentication or Windows Authentication.

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. You would open the server objects -> Linked servers -> Add

From the provider list choose Microsoft OLE DB Provider for ODBC Drivers

I think the details will vary depending on if this is a System DSN or File DSN but here's the msdn. http://msdn.microsoft.com/en-us/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

SELECT * FROM ServerName.DatabaseName.SchemaName.TableName

Another option would be using VS 2012 to add a Data Connection to the ODBC data source. 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.

But there may be a firewall on your host preventing such connections.

Try it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM