Linked to Exchange Server

  • Need to create a link between SQL Server 2000 SP4 and our company Microsoft Exchange server. Any advice of how to achieve this is greatly appreciate. 

  • Are you trying to create SQL MAIL MAPI Profile or ?

  • You can create a linked server to exchange 2003 using the active directory provider, add the linked server security. Then you can query the exchange server.

     

     

     

     

    Steven

  • Old Hand :

    Our SQL server version is 2000 SP4. Can we create the link from 2000 to Exchange 2003? Can you point to any articles with samples of how to accomplish this? 

  • Sorry it was a few years ago since I linked to exchange, but I did keep a few bits of code (below) which may help.

    -- adding a linked server

       EXEC sp_addlinkedserver

          @server = 'exchangeservername',

          @srvproduct = 'Active Directory Services 2.5',

          @provider =  'ADSDSOObject',

          @datasrc = 'adsdatasource'

    -- setup link server permissions

      EXEC sp_addlinkedsrvlogin 'exchangeservername', 'false', NULL, 'exchange_account', 'password'

    -- query against exchange

    select * from openquery

    (exchangeservername, 'select sn, givenname from

    ''LDAP://exchangeservername'' where objectClass=''Person'' and sn=''bloggs''') adsiexchange

    order by givenname

    Steven

  • I also need to read an Exchange 2003 mailbox content into a SQL Server 2000 table. Using the method Steven suggest, all I get back when I query Exchange is the following:

    OLE DB provider 'ADSDSOObject' reported an error. The provider indicates that the user did not have the permission to perform the operation.

    OLE DB error trace [OLE/DB Provider 'ADSDSOObject' ICommandPrepare:repare returned 0x80040e09: The provider indicates that the user did not have the permission to perform the operation.].

    The login created is the AD administrator and SQL Server is running under that same user. Search the internet on this one all lead to no solution.

Viewing 6 posts - 1 through 5 (of 5 total)

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