Thread: MS SQL Server General Questions/MS Exchange -> MS SQL Server 2005

MS Exchange -> MS SQL Server 2005
table mails
{
messageid bigint,
userid bigint,
message_body nvarchar(max);
}



archive-manager from Quest



Ввиду нереляционной природы Exchangeвского хранилища придется воспользоваться не ODBC-драйвером, а провайдером OLE DB, который is available as part of Microsoft Exchange 2000.
To create a linked server against an Exchange Web Store
Use 'exoledb.datasource.1' as the provider_name argument, and the URL corresponding to the root folder of the Web Store as the data_source argument of the sp_addlinkedserver system stored procedure.
EXEC sp_addlinkedserver 'exchange',
'Exchange OLE DB provider',
'exoledb.DataSource.1',
'file:\.\backofficestorage\localhost\public folders'.
...
To access data in the Exchange Web Store from SQL Server, through a linked server established as above ...
CREATE VIEW Contacts
AS
SELECT convert(nvarchar(30),"urn:schemas:contacts:sn") LastName,
Convert(nvarchar(30),"urn:schemas:contacts:givenname")
FirstName,
Convert(nvarchar(30), "urn:schemas:contacts:o") Company,
Convert(nvarchar(50), "urn:schemas:contacts:email1") Email,
"urn:schemas:contacts:bday" BirthDay
FROM OpenQuery(Exchange,
'SELECT "urn:schemas:contact:sn",
"urn:schema:contacts:givenname",
"urn:schemas:contacts:o",
"urn:schemas:contacts:email1"
"urn:schemas:contacts:bday"
FROM SCOPE(''.©ontacts'')'



Если на разных, то

EXEC sp_addlinkedserver 'exchange',
'Exchange OLE DB provider',
'exoledb.DataSource.1',
'file:\.\backofficestorage\{ExchangeServer}\public folders'.

Только на сервер с SQL надо поставить OLEDB драйвер к Exchange.



How to register a transport event sink for the SMTP Service in Exchange 2000 Server



Exchange OLE DB Provider