Adding a linked server error

  • Ok, I thought that this should be straight forward. W I am trying to create a linked server and have the proper syntax, except when I want to add the
      @srvproduct it throws the error message.

    sp_addlinkedserver
      @server= 'NBIMC-816'
      , @srvproduct= 'SQL Server'
      , @provider=  'SQLNCLI'
      , @datasrc= 'NBIMC-816' 

    Msg 15428, Level 16, State 1, Procedure sp_addlinkedserver, Line 40
    You cannot specify a provider or any properties for product 'SQL Server'.

    ------------------------
    But when I leave the @srvprodust blank '' , it works, but I do not have a proper SRV_Product name

    sp_addlinkedserver
      @server= 'NBIMC-816'
        , @srvproduct= ''
      , @provider=  'SQLNCLI'
      , @datasrc= 'NBIMC-816' 

    So where can I add the name, or is there something wrong with my code?

  • If the server type is SQL Server, you would just execute something like this:
    EXEC sp_addlinkedserver 
     @server='NBIMC-816',
     @srvproduct='SQL Server'

    Sue

  • Thanks, I'll give it a shot

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply