Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Calling Remote data types in PL/SQL

Posted on 2004-09-13
2
Medium Priority
?
1,352 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 450 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 300 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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 how to recover a database from a user managed backup

598 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