Solved

Calling Remote data types in PL/SQL

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

705 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