Home » SQL & PL/SQL » SQL & PL/SQL » Accessing Package.procedure across database links
Accessing Package.procedure across database links [message #23354] Wed, 04 December 2002 02:20 Go to next message
prashant
Messages: 122
Registered: September 2000
Senior Member
Hi all,

I have a package in one database and i want to use a function of that package in another database via a database link. However when i issue a command as

SQL> exec trigtest.getdebug@replica1.diotekonline.com
I get the following error :

ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00221: 'GETDEBUG' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Re: Accessing Package.procedure across database links [message #23356 is a reply to message #23354] Wed, 04 December 2002 02:27 Go to previous messageGo to next message
Anuka
Messages: 5
Registered: July 2002
Junior Member
Hi,
U have to create a synonym of that package in the second db from where u r trying to call the function.

Anu
Re: Accessing Package.procedure across database links [message #23374 is a reply to message #23354] Wed, 04 December 2002 11:12 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
The error has nothing to do with a synonym. If GetDebug is a function, the error is because you are trying to execute it as a procedure. The function syntax would be:

exec :x := pkg.function@dblink


where x is a SQL*Plus variable you have defined.
Previous Topic: case statement
Next Topic: Is bind var required in side procedure ?
Goto Forum:
  


Current Time: Wed May 15 06:45:46 CDT 2024