Linked tables in SQL Sever-ODBC connection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johngray0
    New Member
    • Jan 2010
    • 4

    Linked tables in SQL Sever-ODBC connection

    Newbie to SQL Sever here.

    In access it is very easy to set up linked tables using ODBC, the behavior of which is needed to replicate in sql server.

    In SQL Server (2008 in this case), I found it easy to import using OBDC using the import wizard. What is not straightforward is either: 1. automating the actions if the import wizard or 2. creating linked tables similar to access. We need auto-refresh of the data rather than a manual update.

    I have found articles dealing with how to link databases--which might also work-- but they all use a query analyzer feature that I haven't used before nor does 2008 seem to have this feature anyhow.

    It seems there are a number of ways to solve this issue and that it should be simple as it is very much so in MS access. What am I missing?

    Thank you,
    John
  • LastDefense
    New Member
    • Jan 2010
    • 3

    #2
    If you are on SQL 2008 these should work for you. Be sure to enable ad-hoc distributed queries. This brings in the entire DB, and you just query the tables you want. If this is not what your after, can you provide more info?

    These are found at http://msdn.microsoft.com/en-us/library/ms190479.aspx

    -LD

    Native Client --

    EXEC sp_addlinkedser ver
    @server='S1_ins tance1',
    @srvproduct='',
    @provider='SQLN CLI',
    @datasrc='S1\in stance1'

    OLE to Access--

    EXEC sp_addlinkedser ver
    @server = 'SEATTLE Mktg',
    @provider = 'Microsoft.Jet. OLEDB.4.0',
    @srvproduct = 'OLE DB Provider for Jet',
    @datasrc = 'C:\MSOffice\Ac cess\Samples\No rthwind.mdb'
    GO

    ACE--

    EXEC sp_addlinkedser ver
    @server = 'SEATTLE Mktg',
    @provider = Microsoft.ACE.O LEDB.12.0',
    @srvproduct = 'OLE DB Provider for ACE',
    @datasrc = 'C:\MSOffice\Ac cess\Samples\No rthwind.accdb'
    GO

    Comment

    Working...