Query To Oracle Via Linked Server Hangs

Apr 13, 2007

Basic description:

We have developed a solution that sends data from SQL Server to an Oracle server as the result of a stored procedure called by a job that runs every minute. While this development worked fine in our test environment, after moving it to production it ran successfully the first minute, but the second minute the stored procedure hung, and the process could not be killed. In order to stop the process I had to stop both the SQL Agent and the MSDTC services.



Our SQL Server box:
SQL Server 2000 Standard Edition SP4
Windows 2003 Server R2 SP1

Our Oracle box:
Test: Oracle 9.2.0.6
Production: Oracle 9.2.0.4



To setup the SQL box, I did the following:
1) Install Oracle Client Tools version 10.2.0.1
2) Restart Server
3) Modify the registry as follows:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSDTCMTxOCI] "OracleXaLib"="oraclient10.dll" "OracleSqlLib"="orasql10.dll" "OracleOciLib"="oci.dll"
4) Modified the PATH variable so that all references to SQL Server appear in front of Oracle path references
5) Added the linked server via sp_addlinkedserver '<tns name>','Oracle','MSDAORA','<tns name>'
6) Added linked server logins via sp_addlinkedsrvlogin '<tns name>','False','<SQL user>','<Oracle User name>','<password on oracle>'
7) Changed the registry for MSDTC to match this:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSDTC]
"AllowOnlySecureRpcCalls"=dword:00000000
"FallbackToUnsecureRPCIfNecessary"=dword:00000001
"TurnOffRpcSecurity"=dword:00000001

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSDTCSecurity]
"NetworkDtcAccess"=dword:00000001
"NetworkDtcAccessAdmin"=dword:00000001
"NetworkDtcAccessClients"=dword:00000001
"NetworkDtcAccessTransactions"=dword:00000001
"NetworkDtcAccessTip"=dword:00000001
"XaTransactions"=dword:00000001
"DomainControllerState"=dword:00000000
"AccountName"="NT Authority\NetworkService"
"NetworkDtcAccessOutbound"=dword:00000001
"NetworkDtcAccessInbound"=dword:00000001

8) Stopped and restarted services in the following order:
1) MSDTC Stop
2) SQL Server Stop
3) MSDTC Start
4) SQL Server Start



The stored procedure:
In a single transaction, the stored procedure compares a production table against a logging table. If a record exists in the production table that is not in the logging table, a record is inserted into logging table, and a record sent to Oracle via an INSERT INTO OPENQUERY('INSTANCE','SELECT Column1, column2, column3,... FROM SCHEMA.TABLE')
SELECT column1,column2,column FROM SQLTable

This stored procedure has worked just fine for us in test, to either the test or production Oracle boxes, but it now fails, and hangs, in production to either the test or production Oracle boxes.



Additionally, I can run the following query via Query Analyzer from our test box to both the test Oracle and production Oracle and it runs successfully (this is NOT used in our stored procedure code, but is presented here as an indication that I think there is something wrong with the settings on our production SQL box):

SELECT * FROM OPENQUERY('INSTANCE','SELECT * FROM SCHEMA.TABLE')



When I run this same query via Query Analyzer on our Production SQL box, to either the test Oracle or production Oracle, it hangs, and I have to kill the process, and restart the MSDTC service.
Other queries that hang are:
SELECT * FROM SERVER..SCHEMA.TABLE



Additionally, I noticed that when I used this method to kill the process I would see errors like the following in the Application Event Log on the SQL box:

The XA Transaction Manager attempted to perform recovery with the XA resource manager. The XA resource manager reported that recovery was unsuccessful. DSN = MTxOCI.Dll.

Since I figured this was an aborted transaction still residing in the MSDTC log file, I would stop the MSDTC service, delete the MSDTC log file, reset the MSDTC log, and then restart the MSDTC service in order to prevent this error from occurring.



Not ALL queries from the production SQL box to production and test Oracle boxes fail. I can get results returned for this query:

SELECT COLUMN1, COLUMN2 FROM SERVER..SCHEMA.TABLE

I've been scouring the internet for about a week now, and I've run out of ideas on what to check on the production SQL box. Any suggestions would be greatly appreciated.

Tim



View 6 Replies


ADVERTISEMENT

Linked Server To DB2 Query Hangs

Jul 26, 2001

We want to read data from a DB2 view so we set up a linked server in SQL7 (ODBC via Neon's Shadow Direct) but when we issue the following type of query from Query analyzer:
select * from openrowset(my_db2link,'select * from test.myview where mycol = ''value''')
it just hangs, and we can't kill the process (the Enterprise manager 'KIll Process' button has no effect!)
- the only way we can get rid of these queries seems to be to stop/restart SQL Server
When we look at current activity in Enterprise manager the process seems to be waiting for a resource (either MISCELLANEOUS or PAGEIOLATCH)
The query works OK if I run it on the server using Shadow direct, so the error must be between SQL Server and Shadow direct
Has anyone seen this error before?
Thanks in advance, John

View 1 Replies View Related

Query Oracle Linked Server

Jul 8, 2013

I run a query using an Oracle Linked Server.

This seems to run forever.
SELECT * FROM LinkedServer..Schema.View WHERE TN= '2034561295'

...and any other field in the where clause work fine.

SELECT * FROM LinkedServer..Schema.View WHERE SPID= '8088'

View 3 Replies View Related

SQL Server + Oracle Data Linked In One Query

Jun 9, 2006

I need to link some data from SQL Server 2005 with Oracle 10 data.One way is to link Oracle server to SQL Server and use ROWSOURCE forretrieving data.What other ways for joing data from both databases exist ?Can I do it from SQLCRL VB - Stored Procedure ? If yes, what objectsshall I use for opening database and running an sql ?
When I tried to import system.data.oracleclient, it was not available. Do I need to install anything for being able to use it ?
Thanks a lot.

View 4 Replies View Related

SQL Server + Oracle Data Linked In One Query

Jun 8, 2006

I need to link some data from SQL Server 2005 with Oracle 10 data.One way is to link Oracle server to SQL Server and use ROWSOURCE forretrieving data.What other ways for joing data from both databases exist ?Can I do it from SQLCRL VB - Stored Procedure ? If yes, what objectsshall I use for opening database and running an sql ?Thanks a lot.

View 3 Replies View Related

Query To Linked Server:Oracle; Problems With ANSI_NULLS;ANSI_WARNINGS

Jul 20, 2005

When I perform a query on a linked Oracle server in the Query analyser Ihave noprboblem' to perform this query.However, when I create this query in a stored procedure I get a compilationerrorwhen saving this procedure. (Not when compiling; it has no errors)Server: Msg 7405, Level 16, State 1, Line 1Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS optionsto be set for the connection. This ensures consistent query semantics.Enable these options and then reissue your query.When I create a dynamic SQL statement then I can save this stored procedurewhen I run the stored procedure this same error happens.What do I have to do.Arno de Jong, The Netherlands

View 1 Replies View Related

Linked Server Query To Oracle ORA-00936: Missing Expression

Jan 14, 2008



I finally have my server linked, figured out my date issed with the decode statement and now I get a missing Expression error from Oracle.

Here is the statement:


SELECT *
FROM OPENQUERY(PROD_ORACLE,'
SELECT LEFT(CUST_ORDER_STUS_NME, 25) as CUST_ORDER_STUS_NME,
LEFT(SRVC_ORDER_STUS_NME, 25) as SRVC_ORDER_STUS_NME,
LEFT(Ser_ORD, 20) AS Ser_ORD,
LEFT(CUST_ORDER_NME, 25) as CUST_ORDER_NME,
LEFT(SRVC_ORDER_NME, 25) as SRVC_ORDER_NME,
LEFT(CLS_ALLOWED_NBR, 2) as CLS_ALLOWED_NBR,
LEFT(NOC_TO_NOC_NME, 3) as NOC_TO_NOC_NME,
LEFT(CHARS_ID, 20) as CHARS_ID,
LEFT(PRI_DNS_QTY, 5) as PRI_DNS_QTY,
LEFT(SCNDY_DNS_QTY, 5) as SCNDY_DNS_QTY,
LEFT(ORDER_TYPE_CD, 10) as ORDER_TYPE_CD,
LEFT(ACTY_NME, 25) as ACTY_NME,
replace(LEFT(CUST_A_NME, 50), ''|'', ''-'') as CUST_A_NME,
LEFT(RLAT_CKT_ID, 8) as RLAT_CKT_ID,
DECODE (BILL_CLR_DT, GREATEST(BILL_CLR_DT, TO_DATE(''01/01/1753'',''MM/DD/YYYY'')), BILL_CLR_DT, NULL),
DECODE (CMPLT_DT, GREATEST(CMPLT_DT, TO_DATE(''01/01/1753'',''MM/DD/YYYY'')), CMPLT_DT, NULL),
REPLACE(replace(LEFT(CMNT_TXT, 1000), char(10), '' ''), ''|'', ''-'') as CMNT_TXT,
LEFT(CUST_H1_ID, 9) as CUST_H1_ID,
LEFT(CUST_CMS_ID, 8) as CUST_CMS_ID,
LEFT(Circuit_ID, 30) as Circuit_ID,
DECODE (SO_CMPLT_DT, GREATEST(SO_CMPLT_DT, TO_DATE(''01/01/1753'',''MM/DD/YYYY'')), SO_CMPLT_DT, NULL),
LEFT(DNS_ADMIN_NME, 30) AS DNS_ADMIN_NME,
LEFT(DNS_ADMIN_PHN_NBR, 15) AS DNS_ADMIN_PHN_NBR,
LEFT(DNS_ADMIN_EMAIL_ADDR, 128) AS DNS_ADMIN_EMAIL_ADDR,
LEFT(CONTACT, 30) AS CONTACT,
LEFT(GOVT_CD, 10) AS GOVT_CD,
LEFT(SOTS_ID, 30) AS SOTS_ID,
LEFT(RAS_USER_BLK_NBR, 20) AS RAS_USER_BLK_NBR,
LEFT(VSYS_QTY, 10) AS VSYS_QTY,
LEFT(ZONE_QTY, 10) AS ZONE_QTY,
LEFT(PLCY_QTY, 10) AS PLCY_QTY,
LEFT(PIC_CODE, 6) AS PIC_CODE,
LEFT(SO_Order_Entry_Nbr, 15) as SO_Order_Entry_Nbr,
LEFT(SO_Rlat_Order_Entry_Nbr, 15) as SO_Rlat_Order_Entry_Nbr,
'' '' as filler
From PROD_ORACLE..RDBADM.CUST_SRVC_ORDER_V')


Here is Query Analyzers response:

Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB provider 'OraOLEDB.Oracle'.
[OLE/DB provider returned message: ORA-00936: missing expression]
OLE DB error trace [OLE/DB Provider 'OraOLEDB.Oracle' ICommandPrepare:repare returned 0x80040e14].

ANY help is greatly appreciated!!

View 5 Replies View Related

Linked Server Oracle Tables - Not Able To Add To Query Designers Show Diagram Pane Via Add Table Dialogue

Apr 18, 2008

I am new to sqlserver.


1)I created a linked server to a oracle database, works fine. Now I am writing queries, using "Query Desgner", when I do a "Add table" linked server tables do not appear. Is this a limitation. I can get around the problem by creating a view.

2) When I use "Microsoft OLE DB Provider for Oracle" for linked server, some times connection seems to get lost. On one occassion, the next day it was fine, it re-established itself.

Any ideas thnx.

View 5 Replies View Related

Setting Up Oracle Linked Server : Need Help : Sql2005 Running On XP Linking In Oracle 10.2

Oct 26, 2006

Is there any step by step help sites for setting up SQL 2005 linked (oracle 10) server?

I find MSDN articles but they referance winNT and 2000, I'm not getting very far and I'm not a DBA but need to get this working asap.

View 1 Replies View Related

Trouble With: Linked Server To Oracle Using OraOLEDB.ORacle Provider

Jan 11, 2007

Hi--

 

I am running SQL Server 2005 on Win2k3:

Microsoft SQL Server Management Studio      9.00.2047.00
Microsoft Analysis Services Client Tools      2005.090.2047.00
Microsoft Data Access Components (MDAC)      2000.086.1830.00 (srv03_sp1_rtm.050324-1447)
Microsoft MSXML      2.6 3.0 4.0 6.0
Microsoft Internet Explorer      6.0.3790.1830
Microsoft .NET Framework      2.0.50727.42
Operating System      5.2.3790


I have the OraOLEDB.Oracle provider installed to the (C:oraclexe) directory.

I am having problems querying from linked oracle server.  When i setup oracle as a linked server and purposely enter an incorrect password the query i run tells me i have an incorrect password.   So it at least knows that.  when i set the correct password and run a query I get this error:

(i replaced the real server name with "someServer".)

Msg 7399, Level 16, State 1, Line 1

The OLE DB provider "OraOLEDB.Oracle" for linked server "SomeServer" reported an error. The provider did not give any information about the error.

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "SomeServer".

 

This is how I set up my Linked server:

Provider: "Oracle Provider for OLE DB"

Product Name: SomeServer

Data Source: SomeServer

Provider String:  "Provider=OraOLEDB.Oracle;Data Source=SomeServer;User Id=MyLogin;Password=MyPassword"

 

 

The query I run is:

Select * from [Someserver].[schema or database]..[tbl_name]

 

Any help???  What am i missing?

View 3 Replies View Related

Linked Server - Delete Hangs

Sep 8, 2014

I have a procedure on SQLSERVER DB1 where i insert into few tables on SQL SERVER DB1 and delete a table on remote server SQL SERVER DB2 via linked server. Unfortunately, the delete is taking for ever. Procedure never completes. Data in that table is close to 500 records.

I have delete statement like
Exec(delete linkserv.onedb.stg.tab1)

Later i modified the delete query as below but no luck

DELETE OPENQUERY(linkserv, 'Select * from onedb.stg.tab1')

What can i do here to get this fixed?
Please see linked server properties below
Enable promotion of distributed transactions for RPC:True
Use Remote Collation: True
All other properties : False

How can i debug my SQL Server procedure and find the issue. I came to know that i do not have permission to use debug feature on SSMS.

View 2 Replies View Related

SQL 2000 Linked Server Hangs Due To Trigger

Jul 23, 2005

Hi -We have two SQL 2000 Servers. We have the linked server setup and wecan perform updates and inserts between the databases. But when we adda trigger and insert something into a table, the database hangs. Thereare NO processes blocking or being block in either database. This ONLYoccurs when we have one OS as Windows 2000 Server and the other OS asWindows 2003 Server. This problem does not occur when both servers areWindows 2000. Has anyone ran into anything similar to this???*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 2 Replies View Related

Connection To Oracle Sometimes Hangs

Jan 3, 2006

Hi,For a customer we have implemented a datawarehouse with a connection toOracle. From the beginning of the project the connection to Oraclegives troubles. The next morning is the connection still active andwhen the customer looks in the processes of SQL Server a " Wait type,RESOURCE_SEMAPHORE." is shown. For what i know. SQL Server is waitingfor a resource, in this case Oracle but doesn't tell me anything aboutwhat could be the problem.The customer uses the Oracle driver instead of a microsft oracledriver.What could it be? and how can we tackle this problem? Are there ways tolook from Oracle point of view? Can we monitor something?Greetz,Hennie

View 2 Replies View Related

Linked Server In NT To Oracle

Jul 15, 2002

Hi:

I configured SQL Server 7.0 by Linked Server to a Oracle db. What I found was I could select data from SQL Enterprise Manage but fail to insert any data through Query Analyst from SQL Server to Oracle. The platform for the SQL Server is NT 4.0 SP6.

Could you point out what I missed while inserting data from Query Analyst to Oracle?

Thank you very much.

Rick

View 1 Replies View Related

Linked Server To Oracle

Jul 20, 2005

Hi,I have an Oracle (8.1) & a SQL Server 2000 database withProduction data. There are situations when I need data from both thedatabases. My first choice was to link Oracle to SQL and run DTSovernight. But this would have a 1 day latency not to mention the timeit would take.1. Has any one tried real time access via Linked server to Oracle?How good is the performance?2. The Oracle db is fairly big, so I'm kinda not in favor ofcopying the whole thing over into SQL overnight. Is there an easierway to just get only the changed records from Oracle?3. Is there a better solution to this?4. Lastly, if I use OPENROWSET or OPENQUERY, can I dynamicallychange the SQL that you pass it? e.g. can the query accept aparameter?Thanks in advanceSudhesh

View 14 Replies View Related

Linked Server To Oracle

Jul 20, 2005

Hello,I have a linked server to oracle 7.1 from SQL 2000. when I try toexecute simple select statement which returns one row of data usingopenquery is not fetching the data. After 30 minutes SQL Queryanalyser is hanging. This is happening on the production server and itis working from last 6 months. I have tried by deleting and recreatingthe linked server, but no use. Please helpThanks,Regards,Pardhasaradhy

View 2 Replies View Related

Linked Server (Oracle 9i)

Jul 20, 2005

Hello all,Having problems connecting to an Oracle 9i database from withinSQL/Server 2000 using the Security/Linked Servers feature.Server1 (SQL/Server)-----------Windows Server 2003, Standard editionMS SQL/Server 2000Oracle 9i Client kit (OLEDB & ODBC) & Enterprise management toolsMicrosoft ODBC for OracleOracle OLEDBMDAC 2.8 RTMServer2 (Oracle)-----------Windows 2000 - Advanced ServerOracle 9i database (v9.2.0.1.0)Two nodes clustered using Microsoft cluster manager. (Nodes areDATABASE01 & DATABASE02 - Cluster is WMCLUSTER)When I try to connect to the linked server in Enterprise Manager I getthe following error messages.Error 7399 OLE DB provider 'MSDAORA' reported an error. Authenticationfailed.OLE DB error trace [OLE/DB Provider 'MSDAORA'IDBInitialize::Initialize returned 0x80040e4d: Authenticationfailed.].From within Query analyzer I get a slightly different messagereporting that the username/password are incorrect.dbcc traceon(7399)select * from TURLIVE..SONICA.INV_LOCServer: Msg 7399, Level 16, State 1, Line 3OLE DB provider 'MSDAORA' reported an error. Authentication failed.[OLE/DB provider returned message: ORA-01017: invalidusername/password; logon denied]OLE DB error trace [OLE/DB Provider 'MSDAORA'IDBInitialize::Initialize returned 0x80040e4d: Authenticationfailed.].I know the username/password combination is correct and I can usethese from with Oracle enterprise Manager with sucess.TURLIVE is the name I've given the linked server, SONICA is the nameof the schema on the Oracle database and INV_LOC is a valid table.TURLIVE is also the name of the database instance on Server2.Steps taken so farInstall Oracle client tools (Enterprise Manager, Net manager etc) onServer1.Setup an entry in TNSNAMES.ORA to the cluster that has the Oracledatabase. e.g.TURLIVE =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = WMCLUSTER)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = TURLIVE)))This works fine, I can connect via Oracle Enterprise manager and I canTNSPING WMCLUSTER, DATABASE01 & DATABASE02.Configured an ODBC source to TURLIVE.On Server1 I've configured the linked server using the following SQL.sp_addlinkedserver 'TURLIVE', 'Oracle', 'MSDAORA', 'TURLIVE'sp_addlinkedsrvlogin 'TURLIVE', false, 'sa', 'sonica','******'(password blanked)I then rebooted Server1The properties of the new linked server are:Product name = OracleData Source = TURLIVEProvider String = blankI've modifed the registry on Server1 as instructed by a Microsoft KBarticle.HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSDTCMTxOCI OracleXaLib = "oracleclient8.dll"OracleSqlLib = "orasql8.dll"OracleOciLib = "oci.dll"Still no luck. Can anyone please point out he bleeding obvious? :-)Thanks in advanceAs an aside, has anyone ever configured a linked server to an OracleRdb (Previously DEC Rdb running on OpenVMS and DEC UNIX) database?Are there any HOWTO guides for this type of connectivity?CheersDave.

View 3 Replies View Related

Linked Server For Oracle RDB 6

Oct 10, 2007

Anyone using a SQL Server Linked Server to access Oracle RDB on a VMS/Alpha? What connection are you using? What is reuqired? I am using OLE DB Provider for ODBC to access an ODBC connection I setup using the Oracle ODBC driver for Oracle RDB 2.1 and it seems slow and limited. You can only use the OPENQUERY method to access data, etc.

View 1 Replies View Related

64-bit And Linked Server To Oracle

Oct 23, 2007



We're having some trouble connecting SQL Srvr2005 to Oracle (10g) in our 64-bit environment. We have Oracle's 32-bit Ole Db provider installed and have been able to use that in SSIS to connect and return some data running in 32-bit debug mode (as long as the query isn't long, complicated or using parameters =)

However, we have some hefty queries that we need to gather some data and want to put them in a stored proc on Oracle and call it through SSIS. We tried adding our Oracle DB as a linked server and are getting some errors. I've tried the following code replacing the provider with 'OraOLEDB.Oracle.1', 'OraOLEDB.Oracle' as well as 'MSDAORA':


EXEC sp_addlinkedserver

'ORA_TSTW', 'Oracle',

'OraOLEDB.Oracle.1', 'TSTW'



EXEC sp_addlinkedsrvlogin 'ORA_TSTW', false,

'user', 'lituser',

'pw'



select * from openquery(ORA_TSTW, 'select * from lituser.customer')


We keep getting the error for each of the providers we try. I've tried it in Management Studio as well as in an Exec SQL task (with debug set to 32-bit) to no avail.


Cannot create an instance of OLE DB provider "OraOLEDB.Oracle.1" for linked server "ORA_TSTW".


I've checked and the MSDAORA.dll is registered in both C:Program Files (x86)Common FilesSystemOle DB as well as C:Program FilesCommon FilesSystemOle DB.

If we can't where we can call an Oracle stored proc, we were thinking of just using a script task to connect to Oracle and retrieve the data we need, but I have a feeling performance this way would be degraded.

Anyone have thoughts/suggestions? TIA!

Sabrina

View 6 Replies View Related

Linked Server With Oracle

Aug 22, 2005

I installed the Oracle client on my computer, and I can connect to oracle databases using SqlPlus, however when I try setting up the linked server I get the following error after I try executing a query.

View 3 Replies View Related

Oracle Linked Server TOO SLOW!!

May 30, 2001

I need to push 40k rows daily to an Oracle database. I am on a Win2k Pro box with the 8.1 client and ADO 2.6 loaded. I've configured the linked server with the Oracle as well as the Microsoft provider and it takes over a minute to push just 24 rows, less than 100 bytes each, at it. Any suggestions?

View 1 Replies View Related

Linked Servers SQL Server To Oracle

Aug 10, 2001

Hi All - does anyone have a step by step guide as to what needs to be set up on the Server from the Oracle side, for Oracle linked servers to work ??

I keep getting the Eror 7399 ; OLEDB provider 'MSDAORA' reported an error.

Thanks,Jazz.

View 2 Replies View Related

Adding A Linked Oracle Server To Sql 7.0

Feb 2, 2001

Does anyone know how to link an Oracle (8.0.6.0) database to a MS SQL 7.0 db? I have set up the ODBC and it works with no problem. I can get tables from the oracle db and bring them into MS access with ODBC so I know that it is set up correctly. I just cant get visability to the db in a sql 7 environment. Any help or sugestion would be appreciated.
Thanks
-NES

View 3 Replies View Related

Linked Server, Openquery, Oracle

Jan 20, 2000

Can someone please tell me what oracle software needs to be installed on a sql server machine that will link to an Oracle database on an NT4 machine.

Also can you also confirm if you have successfully executed an oracle stored procedure from sql server using the open query function. If yes, How? because I have read about people having prolems executing stored procedures with arguments using the OPENQUERY Function.

Thanks

View 1 Replies View Related

Linked Oracle Server Performance

Jun 6, 2002

Anyone have any suggestion on increasing the performance going over a linked server? IS this connection persistent? Or does it establish a connection with each reference? Any other Providers for the connection other than Microsofts OLE DB Provider for Oracle? I imagine that building index's on the referenced oracle tables would help?

Any help, input or suggestions would help.

David

View 2 Replies View Related

Linked Servers SQL Server To Oracle

Aug 10, 2001

Hi All - does anyone have a step by step guide as to what needs to be set up on the Server from the Oracle side, for Oracle linked servers to work ??

I keep getting the Eror 7399 ; OLEDB provider 'MSDAORA' reported an error.

Thanks,Jazz.

View 3 Replies View Related

View With Linked Oracle Server

Feb 26, 2008

Hi,I have created a linked server to oracle, which works fine.But when I try and create a view joining the SQL table with the linked Oracle table, it only returns the primary key field in the Oracle table and nothing else.Anyone know why?ThanksN.B. I'm using SQL Server 2005 btw.

View 2 Replies View Related

SQL 2012 :: Oracle Linked Server

Jun 8, 2015

I have a SQL Server 2012 instance set up with a linked server to an Oracle Database. I need to build a stored procedure (single NVARCHAR(6) parameter in: @accountID) which executes a select statement against the Oracle DB.

Everything's working fine when testing with 'EXEC (''<oraclecodeblock>'') at LINKEDSERVERNAME' if I hard code the value of @accountID in <oraclecodeblock> but when I encapsulate it all within sp_executesql and attempt to parameterize @accountID it's throwing ORA-01722 'invalid number' errors on the Oracle DB. The parameterized value is NVARCHAR as are the account numbers.

Working:
DECLARE @accountID VARCHAR(6);
SET @accountID = '10842';
DECLARE @sql NVARCHAR(MAX);
SET @sql = N'EXEC (''SELECT * from A.Accounts WHERE ID = ''''10842'''';'') AT LINKEDSERVER';

[code]...

View 0 Replies View Related

Linked Server Problem To Oracle

Sep 7, 2007

Hello,

I have a problem which I have spent the whole day trying to resolve but with little success...

Here is the situation:

I installed the Oracle Client 9.x.x on to my production MS Windows 2003 Server running MS SQL Server 2005 Enterprise (I need to make a Linked Server connnection to an Oracle database). The problem is if I try to create the Linked Server, I get an "Oracle Client software not installed. You must have the Oracle Client software installed to create connection" message from SQL Server. This is frustrating because the software is installed and I am able to make queries through SQL*Plus to the Oracle Database...

Here is my checklist ---

1) the PATH variable on the Windows Server is set correctly to the proper ORACLE HOME directory (with proper /bin directories set as well)
2) I have an updated MDAC component installed
3) registry configuration are correct for Oracle 9i
4) created test Linked Server connections to various datasources (not Oracle)

I am assuming the tsnames.org file is set up correctly or I would be able to make queries from SQL*PLUS, is this assumption correct?

I am at a lost as to what to try next...

Any information would be greatly appreciated,

Thank you,

mgarrettDev

View 1 Replies View Related

MSSQL Linked Server To Oracle RDB

Jul 23, 2005

Hi,I am using MSSQL 2k, and I have a linked server set up to an Oracle RDBversion 7. It goes thru an OLE DB provider for ODBC drivers on a systemDSN, which is using an Oracle RDB ODBC driver version 3.0.2.The problem occurs when I send a query that returns zero rows - queryanalyzer just does not complete nor return. This problem is not seenwhen there are rows being returned.I ran a trace and this is the error message I get-:Non-interface error: OLE DB provider MSDASQL returned an incorrectvalue for DBPROP_CONCATNULLBEHAVIOR which should be eitherDBPROPVAL_CB_NULL or DBPROPVAL_CB_NON_NULLAnybody who experienced this before has a solution?Thanks,Lawrence

View 2 Replies View Related

Linked Server Trouble To Oracle

Aug 11, 2005

I'm currently trying to establish a linked server to an Oracledatabase.Setup:Connecting to 8x version of OracleUsing 9i client tools (Net Manager)SQL-Server 2000Windows 2000I installed the Oracle 9i client tools, and set up a Service for theOracle connection. Testing from the 9i client produces a successfullconnection.I then opened SQL-Server and created a new Linked Server with thefollowing setup:Name - PYR_LinkProvider - Microsoft OLE DB Provider for OracleProduct Name - PYRData Source - PYR (9i Service Name)Provider string - MSDAORAI get the unspecific 7399 error that OLE DB provider MSDAORA reportedan error, trace 'Initialize returned 0x80004005'I've searched through the archives, checked all of the relevantMicrosoft articles I could find, and still have no idea what is wrong.SQL-Server reports that the provider is registered in the system, but Ican't figure out what I'm missing.Help or a guide for troubleshooting would be much appreciated.Tim

View 2 Replies View Related

Linked Server (Oracle) - No Select Possible

Mar 7, 2008

Hello,

I created a linked server to Oracle on SQL-Server 2005. I have stored the remote login username and password in the security settings (option "...Be made using this security context" in the Security tab of the Linked Server Properties.

The "Test connection" function works fine, but a select doesn't for every table the user owns. What we found out is: if the table consists only of columns defined as varchar2, the select works. As soon as the table contains only one column defined as number (without scale and precision), it doesn't work. The error displayed is:

The OLE DB provider "MSDAORA" for linked server "NEXUS_FVADM" supplied inconsistent metadata for a column. The column "WEBVORZUGSTYP" (compile-time ordinal 2) of object ""FVADM"."AKZ"" was reported to have a "DBTYPE" of 130 at compile time and 5 at run time.

The Column WEBVORZUGSTYP is defined as number.

Any ideas?

Regards,
Ralf

View 1 Replies View Related

Transactions Using Oracle RDB Linked Server

Feb 7, 2008

I have a SQL Server 2005 with a linked server to an Oracle RDB 6.0, using the Microsoft OLE DB for ODBC provider. I would like to select some rows from the Oracle RDB and then Update those specific rows afterwards. Whenever I try to do this in a transaction (BEGIN TRAN) I get an error "Driver not capable". Is there any way to do this in a single transaction?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved