将SQL Server 2008连接到Outlook日历吗?

将SQL Server 2008连接到Outlook日历吗?

问题描述:

我被要求将存储在SQL数据库中的假期日历与Outlook日历进行集成,以便所有假期都显示在Outlook等中.我无需购买第三方软件就可以做到这一点.

I’ve been asked to integrate our holiday Calendar which is stored in an SQL Database with an outlook calendar, so that all holidays show in outlook etc. I’ve googled this a lot and haven’t really found a way that I can do this without purchasing 3rd party software.

有人在这方面有任何经验吗?如果可以的话,您能帮我指出正确的方向吗?

Has anyone any experience in this and if so could you help point me in the right direction?

如果使用Exchange作为Outlook的邮件服务器,则可以将其链接到SQL Server实例.

If you use Exchange, as the mail server for Outlook, then you can link this to a SQL Server instance.

下面是一个使用SQL语句的示例,您也可以通过SSMS中的UI进行此操作.

Below is an example using a SQL statement, you can also do this via the UI in SSMS.

示例

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

一旦链接 OPENROWSET 即可用于从Exchange读取.

Once linked OPENROWSET can be used to read from Exchange.

示例

SELECT 
    convert(nvarchar(30),"urn:schemas:contacts:sn") AS LastName,
    Convert(nvarchar(30),"urn:schemas:contacts:givenname")  AS FirstName,
    Convert(nvarchar(30), "urn:schemas:contacts:o") AS Company,
    Convert(nvarchar(50), "urn:schemas:contacts:email1") AS Email,
    "urn:schemas:contacts:bday" AS 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 
                ''.\contacts'''
        )
;

示例摘自Technet上的完整说明,.

Examples taken from full Instructions, on Technet.

有关Exchange的更多信息,请参见 MSDN .

For more on Exchange see MSDN.