Re: SQL server won't connect to Exchange server

From: David Copeland [MSFT] (davidcop_at_online.microsoft.com)
Date: 02/19/04


Date: Thu, 19 Feb 2004 02:30:10 -0600

SHivan,

Try changing 'file:\\.\backofficestorage\localhost\public folders' to
'file:\\.\backofficestorage\primarysmtpdomain.com\public folders' where
primarysmtpdomain.com is the domain name specified in Exchange's Default
Recipient policy Primary SMTP address.

and the query as a test using

SELECT
Convert(nvarchar(30),"urn:schemas:contacts:sn")
        LastName,
 Convert(nvarchar(30),"urn:schemas:contacts:givenName")
         FirstName
 FROM OpenQuery
 (Exchange,'SELECT "urn:schemas:contact:sn",
           "urn:schema:contacts:givenName"
 FROM SCOPE(''shallow traversal of ''.\contacts'''')')

Note the upcase N in givenName and the two single quotes before shallow and
after the double quote after contacts

http://support.microsoft.com/default.aspx?scid=kb;en-us;300385

-- 
Hope that helps,
David Copeland
Microsoft Small Business Server Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Newsgroups:
SBS v4.x : microsoft.public.backoffice.smallbiz
SBS 2000: microsoft.public.backoffice.smallbiz2000
SBS 2003: microsoft.public.windows.server.sbs
"SHivan" <anonymous@discussions.microsoft.com> wrote in message
news:119b301c3f537$3db0cff0$a401280a@phx.gbl...
> Hi, When I make a connection between my SQL and Exchange
> server. Using the following code
>
> EXEC sp_dropServer 'exchange';
>
> EXEC sp_addlinkedserver 'exchange',
> 'Exchange OLE DB provider',
> 'exoledb.DataSource.1',
> 'file:\\.\backofficestorage\localhost\public folders';
>
> SQL gives the "1 row(s) affected" reply which means that
> the connection is made succesfully. If I chech in my SQL
> enterprise Manager And try to open the Linked server I get
> an error. I get the same error when I try to run a query
> on the server.
>
> ERROR ->
> Could not create a new session on OLE DB
> provider 'exoledb.DataSource.1'.
> OLE DB error trace [OLE/DB Provider 'exoledb.DataSource.1'
> IDBCreateSession::CreateSession returned 0x80150804].
>
>
> I have already checked the help files and they say it
> should work this way.
> Does anyone know how to solve this? I need it for my
> internship and would hate it to have to tell my boss that
> I can't fix it.
> My query is posted below.
>
> Thank you
>
>
> ********************** Query's ***************************
>
>
> CREATE VIEW V_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(''.\contacts'')')
>


Relevant Pages

  • Re: Recovering Unrecoverable Deleted Public Folders
    ... MVP - Exchange ... Using Recover Deleted Items to retrieve them, ... back five of the folders ... The news got worse - the server had to ...
    (microsoft.public.exchange.admin)
  • Re: Removing Empty, but Replicated Public Folders
    ... Public Folders attached to the Exchange 2003 server with the Show System ... When I go to the E2K7 Server's Public Folder Database, ...
    (microsoft.public.exchange.admin)
  • RE: Offline Address Book error on send/receive
    ... non-system folders. ... How to reset system folders in Exchange Server 2003 ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Re: Public Folder Migration Tool
    ... Thanks Steve, that was exactly what I did to replicate the folders, I just wanted to be sure of how to use the tool in case I have to do another 5.5 to 2000 migration. ... > because it uses WMI interfaces that were not implemented until Exchange ... > So you could install and Exchange 2003 Server, ...
    (microsoft.public.exchange.setup)
  • Re: WebDAV Query Speed
    ... If you're using the same restriction, the query will run faster since ... Exchange caches the restriction on the server. ... > I can run the same queries at differnet times and get widely varying query ...
    (microsoft.public.exchange.development)