Published on

April 15, 2007

SQL Server: Publishing Data in Exchange with xp_sql2exchange

Have you ever wanted to publish your organization’s SQL Server data in Exchange so that everyone with Outlook could access it? In this article, we will explore a suite of extended stored procedures called xp_sql2exchange that allows you to create Outlook Contacts, Appointments, Tasks, and Journal Entries in Exchange Public Folders or Outlook PSTs.

Extended stored procedures are compiled programs that can be invoked from SQL Server using the same calling conventions as a conventional SQL stored procedure. They are used to add software capabilities that may not be part of the standard collection of SQL function libraries. For example, SQL Server has no intrinsic ability to send email, but using the extended stored procedure xp_sendmail, one can send SMTP mail messages.

xp_sql2exchange is a collection of extended stored procedures that let you create and update Outlook Contacts, Appointments, Tasks, and Journal Entries in Exchange Public Folders. These procedures can be added to the trigger of a SQL database table, allowing updates made to the table to be immediately displayed in an Exchange Public Folder.

Installing xp_sql2exchange requires configuring the SQL Server Service to act as a mail client to a Microsoft Exchange Server. Once installed, you can use SQL Query Analyzer to run the xp_sql2exchange stored procedures and create or update Outlook items in Exchange Public Folders.

For example, to create a Contact in an Exchange Public Folder, you can execute the following SQL query:

Exec master.dbo.xp_contact @FolderPath='SQL_Contacts',
    @matchFileAs='Jim Morrison',
    @FirstName='Jim', @LastName='Morrison',
    @Phone='(310)652-4202',
    @Street='8901 West Sunset Boulevard',
    @City='Los Angeles', @State='CA', @Zip='90069'

By modifying the @FolderPath variable, you can specify the Public Folder where the Contact should be created. If the query is successful, a Contact will appear in the specified Public Folder in Outlook.

xp_sql2exchange provides a simple and efficient way to publish SQL Server data in Exchange without the need for specialized programming. It uses pure TRANSACT-SQL calls and serves as a good example of what’s possible using extended stored procedures.

For more information on xp_sql2exchange and how to use it, you can refer to the documentation included in the download package. The package also includes sample scripts for implementing table triggers and loading and unloading the extended stored procedures.

Overall, xp_sql2exchange is a valuable tool for SQL DBAs looking to make their organization’s data accessible to Outlook clients. It eliminates the need for complex programming and allows for seamless integration between SQL Server and Exchange.

Download xp_sql2exchange and start publishing your SQL Server data in Exchange today!

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.