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
Solved

Calling Remote data types in PL/SQL

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

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…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

860 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