How to call an Oracle Stored procedure from MSSQL Server Stored Procedure

How to call an Oracle Stored procedure from MSSQL Server Stored Procedure

Post by Eric Levinso » Fri, 18 Oct 2002 07:57:50



Anyone on this list know how to call an Oracle Stored procedure (a function
which returns a number) from within a Microsoft SQL Server stored procedure?

We are just using plain ODBC connections.  We have a function called func
and it takes 3 parameters, and returns a number.

The function is defined as:

func (str1, str2, str3) return NUMBER;

How, in SQL Server do I set up the three strings, then make the call, then
get the NUMBER.  I have seen a few articles on various web pages, but they
are primarily for procedures, not functions, and they use ADO.  I'm only
really interested in an ODBC  solution at the present time.

If you have any suggestions, or links, please email me at ericl at
broderbund dot com, or post your responses here.

Thanks!

 
 
 

How to call an Oracle Stored procedure from MSSQL Server Stored Procedure

Post by Anith Se » Fri, 18 Oct 2002 11:51:20


I have not done this but you should be able to use
OPENQUERY to accomplish what you are trying to do. Take a
peek at :
http://tinyurl.com/216p

--
- Anith

 
 
 

How to call an Oracle Stored procedure from MSSQL Server Stored Procedure

Post by Eric Levinso » Sun, 20 Oct 2002 02:21:36


Does the OpenQUERY allow the call of stored procedures with parameters and
return values from functions?  It doesn't look like it from the examples.

I can't really find many examples which show in MSSQL Transaction SQL how to
populate parameters, call the function/procedures, and then bind back the
OUT parameters or returned values in functions.  Anyone know where I can get
examples of this?  I have been looking on websites, etc.  Do I have to use
ADO, or can I just use straight ODBC?

Eric


Quote:> I have not done this but you should be able to use
> OPENQUERY to accomplish what you are trying to do. Take a
> peek at :
> http://tinyurl.com/216p

> --
> - Anith

 
 
 

1. Calling Oracle Stored Procedure from within SQL Server Stored Procedure

I am attempting to execute a Oracle stored procedure from with in a
sql server stored procedure via a linked server. The oracle procedure
is expecting two date parameters. I receive the follwing error message
when I execute the below. I have tested the oracle stored procedure
from within VB and returns resultset correctly as expected.

Stuart

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '20030720'.






BusUnit, Participant, State, RegionID, Status, PeriodEnd, DB_MW,
RRN_MW})}'')'


2. Revolutionary Mass Mailing Software

3. Calling Stored Procedure that calls Stored Procedure in ASP

4. FAST with Universe on AIX ???

5. Calling a Java Stored Procedure from another Java Stored Stored Procedure

6. Winsock TCP Communications for Windows V7/v8 - (DLL or VBX?)

7. Calling a stored procedure on another server from within a stored procedure

8. Tool for converting Store Procedure in SQL Server to Oracle Store Procedures

9. Stored Procedure calling Stored Procedure

10. Call a stored procedure from another stored procedure

11. Calling a stored procedure with parameters from another stored procedure

12. Calling a Stored Procedure from a Stored Procedure