Solved

Calling Remote data types in PL/SQL

Posted on 2004-09-13
2
1,194 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.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now