GibboK
GibboK

Reputation: 73908

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.

Upvotes: 0

Views: 3080

Answers (2)

Zeph
Zeph

Reputation: 1728

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 i.e.

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.

Upvotes: 1

podiluska
podiluska

Reputation: 51494

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.

Upvotes: 0

Related Questions