Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 ODBC Connection from SQL Server Management Studio

Author  Topic 

durgapras
Starting Member

15 Posts

Posted - 2008-03-05 : 12:44:00
Hi,
I have created a DSN from the ODBC(Windows Control Panel) in Administrative tools.
Is there a way I can connect to that DB from my Microsoft SQL Server Management Studio?
PS:The Provider for this DB does not exist in LinkedServer

Thanks

durgapras
Starting Member

15 Posts

Posted - 2008-03-05 : 14:22:17
After little bit of 'googling',I could successfully connect to my ODBC

1.)Exec sp_addlinkedserver

EXEC sp_addlinkedserver

@server = 'MY_ODBC_SERVER',

@srvproduct = '',

@provider = 'MSDASQL',

@datasrc = 'QFTest' //System DSN

GO

2.)To check whether SP worked,

EXEC sp_tables_ex @table_server = 'MY_ODBC_SERVER'

3.)I could successfully retrieve all the data from the table 'BTL'

SELECT * FROM OPENQUERY(MY_ODBC_SERVER, 'SELECT * FROM BTL')
Go to Top of Page
   

- Advertisement -