473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

I am trying to define a variable using an object created in other schema

E.G.
in DB1 I have created an object using "Create type" named as t_obj
in DB2 I have a package in which I have to
define a variable refering to DB1@t_obj
but each time error is thrown
pls-00331 illegal reference to t_obj@DB1_link (I am using Database Link)
Is it possible to do so?
Actual problem is that I have to pass certain sets of records from DB1 to DB2 in t_obj.
If not possible can you suggest an alternate way to do so?
Jan 14 '10 #1
3 5751
amitpatel66
2,367 Expert 2GB
Restriction on Using User-Defined Types with a Remote Database

User-defined types (specifically, types declared with a SQL CREATE TYPE statement, as opposed to types declared within a PL/SQL package) are currently useful only within a single database.

You cannot use a database link to do any of the following:

Connect to a remote database to query, insert, or update a user-defined type or an object REF on a remote table

Use database links within PL/SQL code to declare a local variable of a remote user-defined type

Convey a user-defined type argument or return value in a PL/SQL remote procedure call

Can you elaborate on your requirement? What you mean by certain set of records?... Can you think of creating a View in remote database and using a DB LINK to read from the View from remote database in your source database?
Jan 14 '10 #2
The requirement is : There is a procedure in DB1 which has input as table of object type. These records are processed in DB1 and a final list is prepared which is forwarded to DB2 procedure and further processing is done in DB2 and returned to DB1 procedure call.
Jan 14 '10 #3
amitpatel66
2,367 Expert 2GB
You can try something like:

1. Create a database link in DB2 connecting to database DB1
2. Create a procedure proc1 in DB1 which takes input parameter of type table
3. From DB2 call proc1 in DB1 using DB link
4. Store the processed records in some temporary table
5. Call proc2 in database DB2
6. Use the temporary table that holds the processed records using database link
Jan 14 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Eric Liu | last post by:
Hi, Can anyone explain why the following code works? The static object creation is via the private ctor. If I try to define a X object in the mainline, of course I will get complaint about...
0
by: William Wong | last post by:
Hello. How to build a XMLDocument Object with embedded schema? Would you mind to give me some simple example, or point to somewhere to learn about such a technique? Thanks a lot William
4
by: Andres | last post by:
Hi all, I have the problem to assign a variable of type object to a specific class at runtime. I want to use a string variable that specify the class a want to set this object. Is something...
10
by: Blaxer | last post by:
There is probably a really easy way to do this, so please forgive me but I would like to set the value of a variable from a variable, an example would be... function Calculate_Something(ByVal...
6
by: andrea | last post by:
I want to setup properties value to an object created by reference. I do the following. T t = Activator.CreateInstance<T>(); Type newItem = typeof(T);...
7
by: Harris | last post by:
Dear all, I have the following codes: ====== public enum Enum_Value { Value0 = 0, Value1 = 10,
4
by: recurr | last post by:
How to get what a variable is dimmed as? How to get what an object is declared as? If variable or object is Nothing? I want to do something like the following, but TypeOf and GetType doesn't...
0
by: RaviEruvuru | last post by:
XSDObjectgen is having the capability of creating the classes with the XSD having another XSD imported in it. when I populate the objects of the class and trying to deserialize the object it is not...
1
by: =?Utf-8?B?VGVycmFuY2U=?= | last post by:
Good Morning. I'm trying to create a xml file and schema file for my boss to upload the information into Sharepoint. Everytime when he uploads the xml file it notices there's no schema and I'm...
3
Atli
by: Atli | last post by:
Hi everybody. This is not so much a problem, since I have already managed to find a solution, but my solution requires the use of the eval() function, which I just hate to use. The problem is...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.