Re: Using the same type in 2 instance

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 13 Jul 2004 08:43:24 -0700
Message-ID: <2687bb95.0407130743.d709579_at_posting.google.com>


kleinstephane_at_netscape.net (Steph) wrote in message news:<e033c553.0407120857.36b6a447_at_posting.google.com>...
> Hi,
> On my first oracle instance, I have a global type 'productarray'
> (CREATE OR REPLACE TYPE productarray AS TABLE OF VARCHAR(30)), I have
> a package procedure having myArray OUT productarray as parameter.
> No problem to manage this OUT parameter from a function or procedure
> in the same instance, even if schemas are different.
> But if I try to use this package procedure from procedure in another
> instance, I have the error :
> PLS-00306 : wrong number or types of arguments in call of
> 'myfunction'.
>
> the strict same global type has been created in both instances and the
> package 1 is visible in instance 2 via a synonym, user 2 has execute
> right on package 1.
>
> Anyone has an idea about what is wrong ?
>
> Thanks a lot.
>
> Stephane

Steph, I do not think you want to create the same type in both instances. Doing so would not guarentee to Oracle that the two objects matched. I believe what you want to do is reference the same type definition from both instances. You normally define the base type in a package specification and then reference this, %type, when you allocate and pass the array. Try it that way.

If this change does not eliminate your problem then when you repost please include the actual Oracle error message and matching code pieces to increase the odds someone will be able to spot the problem.

HTH -- Mark D Powell -- Received on Tue Jul 13 2004 - 17:43:24 CEST

Original text of this message