SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict darkwater23's Avatar
    Join Date
    Nov 2005
    Location
    Omaha, NE
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question sp_addlinkedserver help

    I'm trying to set up a linked server in SQL Server to an Oracle 10 server.

    I've been reading and re-reading the MSDN doc on sp_addlinkedserver, but it's not clicking. I'm not using TNS, so I need to provide the server name in one of the variables there, but I can't tell where.

    Any ideas?

    Thanks!

    http://msdn.microsoft.com/en-us/library/ms190479.aspx

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I can't say I can ever make too much sense of the MSSQL BOL text descriptions. But scroll down to examples and it is pretty clear:

    EXEC sp_addlinkedserver
    @server = 'LONDON Mktg',
    @srvproduct = 'Oracle',
    @provider = 'MSDAORA',
    @datasrc = 'MyServer'
    GO

  3. #3
    SitePoint Addict darkwater23's Avatar
    Join Date
    Nov 2005
    Location
    Omaha, NE
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately, it isn't clear. For instance, @server is not the name of the server to connect to, but it's just an arbitrary name that you see in the management studio. The @srvproduct is just a label.

    The important information that the linked server needs is the host, the engine and maybe the database, but I can't tell where to pass those in at.

    I read and re-read all those examples over and over, but I'm not seeing how to make this work.

  4. #4
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I think you read past the @datasrc--that should be the server you are connecting to.

  5. #5
    SitePoint Addict darkwater23's Avatar
    Join Date
    Nov 2005
    Location
    Omaha, NE
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @datasrc = Is the name of the data source as interpreted by the OLE DB provider.

    That doesn't sound like a server name. That sounds like a database/catalog name. But, the definition is really lacking.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •