May 3, 2006 at 6:08 am
Dear all,
I have been attempting to set up a linked server in SQL Server 2000 to point to an Oracle database (a very old Oracle database, v7!).
The linked server set up works fine. Then I created a database on the same SQL Server. Within that database I created a view which reads information from a view in the Oracle database (linked server). When I attempted to create this view in Enterprise Manager, I get the following error:
"The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction."
And so I created the view in Query Analyzer. This worked perfectly, no errors, and I can now go into Enterprise Manager and call up the view, which happily goes off to the view in the Oracle linked server and pulls back the info. BUT, when I attempt to do the same thing through an application on a different machine (using OLE Db, and a UDL to connect) the same error as above appears.
Does anyone know what this error means, and where I went wrong? Any help greatly appreciated. My view onto the linked server looks like this:
"CREATE VIEW dbo.NLPG_VIEW
AS
SELECT * from openquery(sadaslink, 'select * from NLPG_VIEW')"
Many thanks in advance for your wisdom!
May 4, 2006 at 12:09 am
Make sure that the account you are connecting with OLE DB has a permission route for the sadaslink Linked Server, in BOL lookup sp_addlinkedsrvlogin and/or Establishing Security for Linked Servers.
Andy
May 4, 2006 at 3:23 am
I've ran sp_addlinkedsrvlogin to add the windows username of the person trying to connect from the app, and specified remote login to the Oracle database using the oracle username nad password. The windows user has an OLE DB connection on his machine to the database on SQL Server that connects to the view on the linked server. I just can't see what I'm missing. It works when he connects via Enterpirse manager so it must be to do with remote login.
Thanks anyway.
May 8, 2006 at 11:03 am
You may want to try a different OLE DB driver for Oracle. There may be a problem if the Oracle database is an old version and the driver is a newer version. You may also want to create a second linked server using an ODBC and try it instead. You will need to create an ODBC on the server, then create the link using the Microsft OLE DB for ODBC drivers. You can also try using a standard 4-part distributed query instead of the open query. I've had to use different combinations on different servers (operating systems, drivers, database versions), so you may just need to find what works best for your environment. Good luck.
Linda
May 9, 2006 at 3:06 am
How do I do a 4-part distributed query?
May 9, 2006 at 6:33 am
Here's a sample. Make sure to use CAPS on the 4-part section.
select TOP 5 * from LINKEDSERVERNAME..SCHEMA.TABLE
May 9, 2006 at 6:41 am
Ah, I see. I already tried that (just didn't realise it was called a 4 part distributed query). I'm thinking now that I should have RPC and RPC out selected. That's my theory but I can't test it until next week when the tester arrives back in work.
But in the meantime, does this sound like a realistic solution, what with the query working fine on SQL Server, but failing from a remote app?
Thanks
May 9, 2006 at 7:17 am
Could be, but I'm not sure. Most of our links to Oracle do not have them checked (not even the one used in replication) but the links are used mostly for scheduled SQL jobs. There is one that has them checked and that link is used in a web application, so you may be right. Should be a quick, easy test anyway 🙂
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply