Discussion:
[Firebird-odbc-devel] Execute Firebird procedure from Oracle
Buchas
2011-08-02 12:50:17 UTC
Permalink
Hello,

I have the following procedure in Firebird:

Code: [Select all] [Show/ hide]

SET TERM ^ ;
ALTER PROCEDURE PINGAS
RETURNS (
RESULT Smallint )
AS
begin
Result = 1;
SUSPEND;
end^
SET TERM ; ^


GRANT EXECUTE
ON PROCEDURE PINGAS TO SYSDBA;




I have created a DB_LINKas from Oracle to Firebird connected to user SYSDBA,
and I am able to access tables from Firebird.

How can I execute the procedure? (It should return 1)

Those tries do not work:

declare
i int;
begin
i:= ***@STEKAS ;
--Error: identifier '***@DB_LINKas' must be declared.
end;


declare
begin
***@STEKAS ;
--Error: identifier '***@DB_LINKas' must be declared.
end;


SELECT p.RESULT FROM ***@DB_LINKas p
--Error: Table or view does not exist


--
View this message in context: http://firebird.1100200.n4.nabble.com/Execute-Firebird-procedure-from-Oracle-tp3712219p3712219.html
Sent from the firebird-odbc-devel mailing list archive at Nabble.com.
NickUpson
2011-08-10 14:42:32 UTC
Permalink
such a procedure needs to be called as if it were a table

select * from <myprocname>

--
View this message in context: http://firebird.1100200.n4.nabble.com/Execute-Firebird-procedure-from-Oracle-tp3712219p3733098.html
Sent from the firebird-odbc-devel mailing list archive at Nabble.com.
Buchas
2011-08-11 14:04:44 UTC
Permalink
It does not work. Oracle says "Table or view does not exist."

--
View this message in context: http://firebird.1100200.n4.nabble.com/Execute-Firebird-procedure-from-Oracle-tp3712219p3735927.html
Sent from the firebird-odbc-devel mailing list archive at Nabble.com.
NickUpson
2011-08-11 14:10:08 UTC
Permalink
that is a different issue, if you run the "select ...." against the firebird
database directly it will work

--
View this message in context: http://firebird.1100200.n4.nabble.com/Execute-Firebird-procedure-from-Oracle-tp3712219p3735943.html
Sent from the firebird-odbc-devel mailing list archive at Nabble.com.
Buchas
2011-08-11 14:14:18 UTC
Permalink
Yeah, I know that it works from FB.
But I want an application which is running on Oracle to access the logic of
some other application that is based on Firebird procedures. I was wondering
if it can be made using DB link from Oracle to FireBird.

--
View this message in context: http://firebird.1100200.n4.nabble.com/Execute-Firebird-procedure-from-Oracle-tp3712219p3735963.html
Sent from the firebird-odbc-devel mailing list archive at Nabble.com.
Dimitry Sibiryakov
2011-08-11 14:11:30 UTC
Permalink
Post by Buchas
It does not work. Oracle says "Table or view does not exist."
Use DBMS_HS_PASSTHROUGH package.
--
SY, SD.
Loading...