How do I create an MS Exchange Contacts table in SQL Server? 
Author Message
 How do I create an MS Exchange Contacts table in SQL Server?

I need to create a table/view in my SQL Server database of the public contacts
from the Exchange server. Is this possible without having Exchange installed on
my machine.

When I try using the following stored procedure in query analyzer:

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

I get registry entry errors for 'exoledb.DataSource.1' when I try to open the
tables in Enterprise Manager.

Is there any ways around this?

Tia,
James.



Tue, 20 Jul 2004 21:34:25 GMT
 How do I create an MS Exchange Contacts table in SQL Server?

James,

Quote:
> I need to create a table/view in my SQL Server database of the public
contacts
> from the Exchange server. Is this possible without having Exchange
installed on
> my machine.

I assume you already refernced the foll.page.But in case you missed the
req....
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acda...
_qd_12_0t5x.asp
because it mentions

"The Exchange Web Store should be located in the same computer as SQL
Server. Web Stores located in other computers cannot be accessed using the
OLE DB Provider for Exchange"

I have seen the foll. workarnd mentioned by Trevor Dwyer - SQL Server
MVP..Pls check whther that helps...This dealt with the situation  of
exchange 5.5 &  sql server 7. with Exchange and Sql server on different
servers.

1. Create the linked server

sp_addlinkedserver 'ADSI','Active Directory Services
2.5','ADSDSOObject','adsdatasource'

2. Create a view if you really want to show it works

Create view vw_Exchange as
select * from
OpenQuery(ADSI,'<LDAP://10.0.0.10>;(&(objectClass=organizationalPerson));Ads
Path,givenName,sn,Department,Assoc-NT-Account;Subtree')

3. Create the destination table

if exists (select * from sysobjects where id =
object_id(N'[dbo].[Exch_Users]') and OBJECTPROPERTY(id, N'IsUserTable') =
1)
drop table [dbo].[Exch_Users]
GO

CREATE TABLE [dbo].[Exch_Users] (
 [AdsPath] [char] (500) NOT NULL ,
 [givenName] [char] (50) NULL ,
 [sn] [char] (50) NULL ,
 [Department] [char] (50) NULL ,
 [Assoc-NT-Account] [char] (255) NULL
) ON [PRIMARY]
GO

4. Build the DTS package ---somewhere along the line bin the existing data
if this package has imported stuff before
Source: some db
destination: Exch_Users db
query:
select * from
OpenQuery(ADSI,'<LDAP://10.0.0.10>;(&(objectClass=organizationalPerson));Ads
Path,givenName,sn,Department,Assoc-NT-Account;Subtree')

LDAP Query Syntax is as follows

<(provider)(server)>;(filter);(fields returned);(scope)

where

(provider)::= LDAP://
(server):= 10.0.0.10
(filter)::= (&(objectClass=organizationalPerson))  ---This can be more
complicated ; this one just pulls all people  out
(fields returned)::= AdsPath,givenName,sn,Department,Assoc-NT-Account
(scope)::=Subtree

Dinesh.


Quote:
> I need to create a table/view in my SQL Server database of the public
contacts
> from the Exchange server. Is this possible without having Exchange
installed on
> my machine.

> When I try using the following stored procedure in query analyzer:

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

> I get registry entry errors for 'exoledb.DataSource.1' when I try to open
the
> tables in Enterprise Manager.

> Is there any ways around this?

> Tia,
> James.



Tue, 20 Jul 2004 23:14:13 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. MS SQL Server 6.5 and MS Exchange 5.5 on same server

2. Using Exchange Contacts in SQL Table

3. SQLServer Contact Data into Exchange Contacts

4. CA-Long Beach-111316--MS EXCHANGE-MS Exchange Consultant

5. CA-Long Beach-111316--MS EXCHANGE-MS Exchange Consultant

6. Create link betweeb Exchange server and SQL Server

7. SQL Mail for MS SQL Server **How to set it up without Exchange**

8. Sending email to contacts based on SQL Query (Exchange Integration)

9. Question Linking SQL To A Shared Exchange Contact Folder

10. MS Access tables -> MS SQL server tables

11. SQL Server and MS exchange directory

12. MS SQL + MS Exchange


 
Powered by phpBB® Forum Software