Solved

Calling Remote data types in PL/SQL

Posted on 2004-09-13
2
1,217 Views
Last Modified: 2008-01-16
Hi All,
        Table data type exists on a Remote Database. How can I acess this in my local database through PL/SQL.
        Example  In Remote Database:

 CREATE OR REPLACE
          TYPE ABC
          AS TABLE OF TEST.info

         CREATE OR REPLACE
TYPE info
AS OBJECT
(                                  
   x number,
    y varchar2(115),
   STATIC FUNCTION Construct RETURN info
)

CREATE OR REPLACE
TYPE BODY info IS
   STATIC FUNCTION CONSTRUCT RETURN  info  IS
   BEGIN
     RETURN info(null,null);
   END;
END;


How can I acess "ABC" type on my local database. I have created an synonym on the remote database and have execute privilages. I have created the DBlink on my local database.  When I declare it in my local database I will get PLS-00331
illegal reference. Can you let me know what I am missing.

Thanks,
cavaturu



0
Comment
Question by:cavaturu
2 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 150 total points
ID: 12049702
You have to define the same type on the local database completely independantly of the remote database.  You cannot refer to remote objects via DBlink to do the definition.  And, of course it has to be defined identically.

Even with all that, it still may not work but give that a try.

Bill.
0
 
LVL 9

Assisted Solution

by:konektor
konektor earned 100 total points
ID: 12053423
synonyms on objects doesn't work ! you allways need to use object owner's name to access the object.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert Oracle data into XML document 2 65
dates - loop 12 66
How can I rollback insert statements after commit in oracle? 7 132
join 2 views with 5 conditions 3 54
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question