• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 692
  • Last Modified:

ODBC connetion to Exchange fails: Verify connection params / credentials?

I am attempting to connect SQL Server 2005 (Express Edition) to a public folder of contacts on Exchange 2003 (both running on the same SBS server).

I have followed the instructions in SQL Server 2005 Online books: (http://msdn2.microsoft.com/en-us/library/ms191461.aspx) creating my link:

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

and then tried the simple query to verify the connection:

SELECT "urn:schemas:contacts:sn","urn:schemas:contacts:givenname"
FROM OpenQuery(Exchange, 'SELECT "urn:schemas:contacts:sn", "urn:schema:contacts:givenname" FROM SCOPE(''.\Common Contacts'')')

Everytime I do, I receive the following error:

Msg 7304, Level 16, State 2, Line 1
Cannot connect using OLE DB provider "Exoledb.DataSource" to linked server "Exchange". Verify the connection parameters or login credentials associated with this linked server.

The account i am using to login to SQL Server is an admin on the SBS Server as well as an owner of the Public Folder "Common Contacts".
What am i missing?!? This is very urgent!
0
mrtgold
Asked:
mrtgold
  • 4
  • 3
1 Solution
 
nmcdermaidCommented:
What is the SQL Server and SQL Serevr agent service running as? Temporaily change these to domain admin, stop and restart, and try it again.
0
 
mrtgoldAuthor Commented:
Good suggestion - it was running as LocalSystem, but changing it to my account (I am a Domain Admin) didn't work  - still received exactly the same error message.
Created a new Domain Admin account and tried it with that - still same error.
0
 
nmcdermaidCommented:
Did you try doing it to both SQL Server and SQL Server Agent accounts?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mrtgoldAuthor Commented:
Is there a SQL Server Agent with 2005? I don't see it in Services or in the SQL Server Configuration Manager and there is no sqlagent.exe process running...
I changed all the services that were there:
SQL Server
SQL Server Browser
SQL Server FullText Search (just in case...)
0
 
nmcdermaidCommented:
I've got something called SQL Server Agent in my services, also I have SQL Server agent in Management studio.

Maybe you have the express version? Anyhow, that probably isn't it.


That document says:

>> the URL corresponding to the root folder of the Web Store

It sounds like there is some kind of web setup required first, are you aware of anything like that?


Also its a long shot but you could try removing the .1 from provider name as below:

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

The .1 is a version specific provider whereas without the .1 it will pick whatever provider version you have... though it is a long shot.

0
 
mrtgoldAuthor Commented:
The lack of the SQL Agent is probably because of it being the Express Version.  I hope that is not the root cause of the problem be cause my client has emphatically stated he's not going to move to the full version.

"Web Store" refers to Exchange server and how you access data in there. I definitely have permissions to the Public Folder i'm attempting to access - or at least i've given both my login as well as the newly created Domain Admin account all privelages i can find - we are owners, administrators, clients, users, etc.

Already tried removing the .1 - no difference.

Given the project deadlines, i have all but abandoned this track and have begun on a different approach - building an intermediary synchronizing app that can access both the Exchange and the SQL datastores - but i really don't like this approach and would much rather use a real data provider so i'm still hoping that someone will come up with a solution...

Thanks,
tim
0
 
nmcdermaidCommented:
I suggest that you download FileMon from sysinternals.com and monitor the particular file that you are trying to open. This tool will tell you:

1. What account is trying to open it
2. Whether its successful.

FileMon is a very lightweight and eay to use tool. Even though your timelines are shrinking, its well worth having a go.

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now